
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
react-native-bridtv-sdk-module
Advanced tools
BridTV SDK player for react native
npm install react-native-bridtv-sdk-module
or
yarn add react-native-bridtv-sdk-module
IOS
After NPM, cd to IOS and run pod install
Android
To update dependencies and fetch the latest packages open Android Studio and run Gradle Sync. By performing the Gradle sync, you ensure that your Android project is up to date with the latest packages and dependencies, which can help resolve compatibility issues and provide access to new features and bug fixes.
import { BridPlayer } from "react-native-bridtv-sdk-module";
// ...
const App = () => {
const bridPlayerRef = React.useRef<BridPlayer>(null);
const handleAllPlayerEvents = (eventData) => {
console.log(eventData);
};
const handleVideoLoad = (eventData) => {cd
console.log('VIDEO LOADED' + '-' + eventData.playerReference);
};
<BridPlayer
ref={bridPlayerRef3}
style={styles.square}
bridPlayerConfig={{
playerReference: 'player_3', // Player reference important for Events
playerID: xxxx, // PlayerID from BridTV cms
mediaID: xxxxxxxx, //VideoID or PlaylistID from BridTv cms
typeOfPlayer: 'Single', // Single or Playlist
controlAutoplay: false, //enables the client to take control over autoplay
scrollOnAd: true, //This option enables scrolling during ad and is specific to the iOS platform. By default, Android has scrolling enabled during ads.
creditsLabelColor: '614BC3', // To achieve color modification for credits label, it is necessary to provide a sequence of six hexadecimal characters, excluding the '#' symbol.
setCornerRadius: 30, //This property enables setting the corner radius to the player itself. Its value is in pixels.
localization: 'en', //This property allows selecting the language in which the player and IMA will operate.
doubleTapSeek: 10, // This property set seek seconds for double tap seek player UI. - from version 1.1.1
setSeekPreview: 1, // When set to 1, the feature is enabled and will be visible in all operational modes of the player. When set to 2 the thumbnail image preview during seeking will be available exclusively when the player is in fullscreen mode. - from version 1.1.1
setSeekSeconds:5,// The number of seconds to seek when user double tap on player view.
setControllerTimeoutMS:5000,//Timeout for player controller in milliseconds
setCcBottomOffset:16 //Change Closed Captions bottom offset - in pixels
}}
//Callback for Events from all players in one Activity {"message": "video/ad event", "playerReference": "reverence to player from props"}
handleAllPlayerEvents={(eventData) =>handleAllPlayerEvents(eventData)}
//Video
handleVideoLoad={(eventData) => handleVideoLoad(eventData)}
handleVideoStart={(eventData) => handleVideoStart(eventData)}
//Error
handleVideoError={(eventData) => handleVideoError(eventData)}
/>
The BridPlayer component accepts the following props:
style (optional): Specifies the style for the player component.
bridPlayerConfig: An object that contains configuration options for the player. It includes properties playerID, mediaID, typeOfPlayer, useVPAIDSupport, playerReference, controlAutoplay, scrollOnAd, creditsLabelColor, setCornerRadius, localization. Explanations for each of the properties are given in the section above.
localization - Supported languages::
handleAllPlayerEvents : Callback for Events from all players in one Activity {"name": "video/ad event", "playerReference": "reverence to player from props"}
Video event callbacks: These props allow you to specify callback functions for various video events like:
Ad event callbacks: These props allow you to specify callback functions for various ad events like:
handleVideoError: A callback function that handles video errors. It receives an errorEvent object. These are the error event types that can occur with the BridPlayer:
adError:
videoBadUrl:
unsupportedFormat:
protectedContent:
lostIntenetConnection:
liveStreamError:
These error types represent various issues that can occur during the playback of videos or ads with the BridPlayer. By handling these error events appropriately, you can provide better error feedback and take necessary actions to address the specific error conditions encountered during playback.
Please note that these methods should be called on an instance of the BridPlayer class.
Take a look at our Example App for best practices while implementing BridPlayer RN module.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made by Brid.tv
FAQs
React native module for Android/IOS BridTV SDK
We found that react-native-bridtv-sdk-module demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.