Documentation sections

Live streaming support in Radiant Media Player

Live streaming has become increasingly popular over the past few years in the streaming media industry. Radiant Media Player supports live video &AMP; audio streaming with the following streaming protocols:

HLS

DASH

You can use a full HLS solution or a combination of DASH &AMP; HLS depending on your project requirements. Our general recommendations and advanced player settings for
HLS streaming and
DASH streaming also apply to live streaming.

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

You can also insert video ads (including through VMAP or our ad scheduler), use DRM or AES encrypted content, stream 360 video content and query our
player API with live streaming to our player.

Player settings

isLive: Boolean

Enables or not live UI and live streaming optimisations. Note that the player does not auto-apply live UI and optimisations when a live stream is detected it must be explicitly enable with
isLive setting. Default: false.

liveRetries: Number

A live stream may become temporarily or permanently unavailable after having successfully started. By default the player will try indefinitely to reconnect to the live stream when this happens. By setting liveRetries to a finite Number
value, the player will only make a limited number of attempts to reconnect to the live stream when it fails to reconnect to it. When the finite value for liveRetries has been reached, an error event will fire. Default:
Infinity.

Live HLS streaming player code example

Using HLS you can reach all supported devices by Radiant Media Player for live streaming.

Live DASH streaming player code example

iOS Safari requires HLS to stream live content so including an HLS fallback when using live DASH streaming is recommended.

<!-- Include Radiant Media Player - here we use the optimised build for Shaka player -->
<script src="https://cdn.radiantmediatechs.com/rmp/5.4.11/js/rmp-shaka.min.js"></script>
<!-- Player container element -->
<div id="rmpPlayer"></div>
<!-- Set up player configuration options -->
<script>
// Live DASH streaming source// For iOS and older devices where DASH is not supported we use a live HLS fallback
var src = {
dash: 'https://your-live-dash-url.mpd',
hls: 'https://your-live-hls-url.m3u8'
};
// Your player settings
var settings = {
licenseKey: 'your-license-key',
src: src,
width: 640,
height: 360,
// Here we tell the player to enable live UI and optimisations
isLive: true,
// We tell the player to use DASH first over HLS when both are available
dashFirst: true,
poster: 'https://your-poster-url.jpg'
};
var elementID = 'rmpPlayer';
var rmp = new RadiantMP(elementID);
rmp.init(settings);
</script>