Radiant Media Player

Live and DVR streaming



Sections


Live streaming

At Radiant Media Player we set a specific focus on supporting live media content streaming. Live streaming has become more and more popular over the years and achieving proper live content streaming is now within reach of every company or individual. Radiant Media Player supports live streaming with the following streaming protocols:

  • HLS
  • DASH

You can use a full HLS solution or a combination of HLS & DASH depending on your project requirements. Live audio-only streaming is also possible with HLS or DASH.

Our general recommendations and advanced player settings for HLS streaming and DASH streaming also apply to live streaming.

Read our low-latency live HLS streaming documentation for details about to achieve low-latency with live HLS streams.

Radiant Media Player sports a variety of optimisations for live content streaming and a dedicated UI. They are triggered with the isLive setting set to true.

You can insert video ads (including through VMAP or our customer ad scheduler), use DRM or AES encrypted content or query our player API with live content as well.

Player code example for live video streaming using HLS:

<!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
<script src="https://cdn.radiantmediatechs.com/rmp/4.5.15/js/rmp.min.js" 
  integrity="sha384-UOGahVOpoWqVqcgcNFKFOEWH3RV2PoLAq2jmk8g1u9VR/bL8dqsHAsDGwFHPkmuE"
  crossorigin="anonymous"></script>
<!-- Set up your wrapper div with its unique id -->
<div id="rmpPlayer"></div>
<!-- Set up player configuration options -->
<script>
// First we specify bitrates to feed to the player
// This live stream may not be available 24/7 - use your own
var bitrates = {
  hls: 'https://dqwp3xzzbfhtw.cloudfront.net/testlive/smil:live.smil/playlist.m3u8'
};
// Then we set our player settings
var settings = {
  licenseKey: 'your-license-key',
  bitrates: bitrates,  
  delayToFade: 3000,
  width: 640,
  height: 360,
  isLive: true, 
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg'
};
// Reference to the wrapper div (unique id)
var elementID = 'rmpPlayer';
// Create an object based on RadiantMP constructor
var rmp = new RadiantMP(elementID);
// Initialisation ... test your page and done!
rmp.init(settings);
</script>

Player code example for live video streaming with DASH (w/ HLS fallback)

<!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
<script src="https://cdn.radiantmediatechs.com/rmp/4.5.15/js/rmp.min.js" 
  integrity="sha384-UOGahVOpoWqVqcgcNFKFOEWH3RV2PoLAq2jmk8g1u9VR/bL8dqsHAsDGwFHPkmuE"
  crossorigin="anonymous"></script>
<!-- Set up your wrapper div with its unique id -->
<div id="rmpPlayer"></div>
<!-- Set up player configuration options -->
<script>
// First we specify bitrates to feed to the player
// Those live streams may not be available 24/7 - use your own
var bitrates = {
  dash: 'https://wowzaec2demo.streamlock.net/live/bigbuckbunny/manifest_mpm4sav_mvtime.mpd',
  hls: 'https://dqwp3xzzbfhtw.cloudfront.net/testlive/smil:live.smil/playlist.m3u8'
};
// Then we set our player settings
var settings = {
  licenseKey: 'your-license-key',
  bitrates: bitrates,  
  delayToFade: 3000,
  width: 640,
  height: 360,
  isLive: true,
  // We tell the player to use DASH first over HLS
  dashFirst: true,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg'
};
// Reference to the wrapper div (unique id)
var elementID = 'rmpPlayer';
// Create an object based on RadiantMP constructor
var rmp = new RadiantMP(elementID);
// Initialization ... test your page and done!
rmp.init(settings);
</script>

DVR streaming

DVR streaming offers the possibility to rewind into a live stream to watch previously delivered content. Radiant Media Player features a specific DVR video UI, including intuitive in-stream navigation and jump-to-live functionalities. DVR streaming with Radiant Media Player is supported for the following streaming protocol.

  • HLS

DVR for audio-only streaming is also supported.

Our general recommendations and advanced player settings for HLS streaming also apply to DVR streaming.

Radiant Media Player sports a variety of optimisation for DVR streaming. Those optimisations are triggered with the isLiveDvr setting set to true.

You can insert video ads (only pre-roll or overlay ads are supported for DVR streaming), use AES encrypted content or query our player API with DVR streaming as well.

Player code example for DVR video streaming with HLS:

<!-- Include Radiant Media Player JavaScript file in your <body> or <head> -->
<script src="https://cdn.radiantmediatechs.com/rmp/4.5.15/js/rmp.min.js" 
  integrity="sha384-UOGahVOpoWqVqcgcNFKFOEWH3RV2PoLAq2jmk8g1u9VR/bL8dqsHAsDGwFHPkmuE"
  crossorigin="anonymous"></script>
<!-- Set up your wrapper div with its unique id -->
<div id="rmpPlayer"></div>
<!-- Set up player configuration options -->
<script>
// First we specify bitrates to feed to the player
var bitrates = {
  // This URL is inactive - use your own
  hls: 'http://your-streaming-server/live/stream/playlist.m3u8?DVR'
};
// Then we set our player settings
var settings = {
  licenseKey: 'your-license-key',
  bitrates: bitrates,  
  delayToFade: 3000,
  width: 640,
  height: 360,
  // On macOS Safari DVR support is in BETA - use the below setting to enable it
  // forceHlsJSOnMacOSSafari: true,
  isLiveDvr: true,
  poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg'
};
// Reference to the wrapper div (unique id)
var elementID = 'rmpPlayer';
// Create an object based on RadiantMP constructor
var rmp = new RadiantMP(elementID);
// Initialization ... test your page and done!
rmp.init(settings);
</script>

On iOS where media source extensions are not available we rely on Apple QuickTime-based embedded player for providing the DVR scrub bar in fullscreen mode - in window mode the scrub bar is never displayed and the player handles the DVR stream as a simple live stream. The DVR scrub bar option in fullscreen mode is only available on iOS 11+.

On macOS Safari where media source extensions are somewhat unstable you need to use the forceHlsJSOnMacOSSafari setting to enable DVR functionalities. Otherwise the player will handle the DVR stream as a simple live stream. Note that macOS Safari support in hls.js is still in BETA.


DVR API

dvrSeekTo(ms)
rmp.dvrSeekTo(60000);

This method allows seeking into the recorded DVR sliding window. Input parameter ms is a Number expressed in milliseconds. If the input is greater than the sliding window duration then the player will jump to live. In order to avoid buffering issues seeking to value below 10 seconds will cause the player to seek to 10 seconds within the DVR sliding window.

dvrJumpToLive()
rmp.dvrJumpToLive();

This method will cause the player to exit the recorded DVR sliding window and to jump to live content.

getDuration()
rmp.getDuration();

This getter returns a Number expressed in milliseconds representing the duration of the DVR recorded sliding window. -1 is returned in case the value is not available.

dvrIsLive()
rmp.dvrIsLive();

This getter returns a Boolean stating if the DVR stream on stage is showing live content (true) or on-demand content from the sliding window (false). null is returned in case the value is not available.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.