As the streaming media industry becomes more mature, video analytics have become a key element to building an online video solution. To provide advanced video analytics with our player we support out-of-the-box integration with Bitmovin Analytics. Our integration has been tested for Bitmovin Analytics v2 (Analytics Web Collector 2). The following features are supported:
setSrc
API method)bitmovinAnalyticsConfig: Object
Pass Bitmovin
Analytics config metadata
to the player to enable Bitmovin Analytics support. A key
property for the
bitmovinAnalyticsConfig
object is required for Bitmovin Analytics support to be enabled
in our player. See below for a complete example. The videoId
, title
and
cdnProvider
properties are also recommended. Default: {}
.
<!-- Include Bitmovin Analytics v2 library --> <script src="https://cdn.bitmovin.com/analytics/web/2/bitmovinanalytics.min.js"></script> <!-- Include Radiant Media Player library --> <script src="https://cdn.radiantmediatechs.com/rmp/10.1.4/js/rmp.min.js"></script> <div id="rmp"></div> <script> const src = { hls: 'https://your-hls-url.m3u8' }; // Define Bitmovin Analytics settings const analyticsConfig = { key: 'your-bitmovin-key', videoId: 'your-video-id', debug: false, title: 'your-video-title' }; const settings = { licenseKey: 'your-radiant-media-player-key', src, width: 640, height: 360, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] }, // Pass Bitmovin Analytics settings bitmovinAnalyticsConfig: analyticsConfig }; const rmp = new RadiantMP('rmp'); // Initialization ... and done! async function initRmpPlayer() { try { await rmp.init(settings); } catch(error) { console.error('Radiant Media Player failed to initialize', error); } } initRmpPlayer(); </script>
<!-- Include Bitmovin Analytics v2 library --> <script src="https://cdn.bitmovin.com/analytics/web/2/bitmovinanalytics.min.js"></script> <!-- Include Radiant Media Player library --> <script src="https://cdn.radiantmediatechs.com/rmp/10.1.4/js/rmp.min.js"></script> <div id="rmp"></div> <script> const src = { dash: 'https://your-hls-url.mpd' }; // Define Bitmovin Analytics settings const analyticsConfig = { key: 'your-bitmovin-key', videoId: 'your-video-id', debug: false, title: 'your-video-title' }; const settings = { licenseKey: 'your-radiant-media-player-key', src, width: 640, height: 360, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] }, // Pass Bitmovin Analytics settings bitmovinAnalyticsConfig: analyticsConfig }; const rmp = new RadiantMP('rmp'); // Initialization ... and done! async function initRmpPlayer() { try { await rmp.init(settings); } catch(error) { console.error('Radiant Media Player failed to initialize', error); } } initRmpPlayer(); </script>
For playlist and related the player will automatically source change data to
Bitmovin Analytics based on each playlist item title and id (if no id is provided one will be generated by the
player). Therefore for
playlist and related you only need pass a key
property to the
bitmovinAnalyticsConfig
setting.
For custom
integration using the setSrc
API
here is an example of
source change handling. Note the use of the bitmovinAnalyticsConfiguration
getter|setter.
const src = { hls: 'https://your-hls-url.m3u8' }; const analyticsConfig = { key: 'your-bitmovin-key', videoId: 'your-video-id', title: 'your-video-title' }; const settings = { licenseKey: 'your-radiant-media-player-key', src, width: 640, height: 360, autoplay: true, // Pass Bitmovin Analytics settings bitmovinAnalyticsConfig: analyticsConfig }; const rmp = new RadiantMP('rmp'); // Example for changing source with a delay setTimeout(() => { rmp.setSrc({ hls: 'https://your-new-hls-url.m3u8' }).then(() => { console.log('setSrc has completed'); }).catch(warningOrError => { // something went wrong with setSrc - it could be fatal error or warning if (warningOrError.code < 1000) { // this is a fatal error console.error(warningOrError); } else { // this is just a warning console.warn(warningOrError); } }); }, 10000); const container = document.getElementById('rmp'); rmp.on('srcchanging', () => { // Example for checking the current bitmovinAnalyticsConfig setting let analytics = rmp.bitmovinAnalyticsConfiguration; console.log(analytics); // Set new bitmovinAnalyticsConfig just before the source change moves forward - e.g. srcchanging API event rmp.bitmovinAnalyticsConfiguration = { key: 'your-bitmovin-key', // Note you need to pass your Bitmovin key each time you call bitmovinAnalyticsConfiguration setter videoId: 'your-new-video-id', title: 'your-new-video-title' }; // If needs be we can check the new bitmovinAnalyticsConfig object analytics = rmp.bitmovinAnalyticsConfiguration; console.log(analytics); }); // Initialization ... and done! async function initRmpPlayer() { try { await rmp.init(settings); } catch(error) { console.error('Radiant Media Player failed to initialize', error); } } initRmpPlayer();
©2015-2025 Radiant Media Player. All Rights Reserved. ✝