Live streaming has become increasingly popular over the past few years in the streaming media industry. Radiant Media Player supports live video & audio streaming with the following streaming protocols:
You can use a full HLS solution or a combination of DASH & 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. Upon startup the player will detect if the stream is a live stream or an on-demand stream.
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.
Documentation for using Radiant Media Player with DVR streams can be found here.
Using HLS you can reach all supported devices by Radiant Media Player for live streaming.
<!-- Include Radiant Media Player - here we use the optimised build for hls.js --> <script src="https://cdn.radiantmediatechs.com/rmp/9.1.1/js/rmp-hlsjs.min.js"></script> <!-- Player container element --> <div id="rmp"></div> <!-- Set up player configuration options --> <script> // Live HLS streaming source const src = { hls: 'https://your-live-hls-url.m3u8' }; // Your player settings const settings = { licenseKey: 'your-license-key', src: src, width: 640, height: 360, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] } }; const rmp = new RadiantMP('rmp'); rmp.init(settings); </script>
We support Low-Latency HLS (LL-HLS) according to Apple HLS specification. This includes support for the new Media Playlist Tags:
LL-HLS streams are automatically detected by the player and when this happens playback is automatically optimised for low-latency live streaming.
Here are our recommendations for LL-HLS to work best in our player:
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/9.1.1/js/rmp-shaka.min.js"></script> <!-- Player container element --> <div id="rmp"></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 const src = { dash: 'https://your-live-dash-url.mpd', hls: 'https://your-live-hls-url.m3u8' }; // Your player settings const settings = { licenseKey: 'your-license-key', src: src, width: 640, height: 360, // We tell the player to use DASH first over HLS when both are available dashFirst: true, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] } }; const rmp = new RadiantMP('rmp'); rmp.init(settings); </script>
We support Low-Latency DASH (LL-DASH) (CMAF-CTE - Chunked Transfer Encoding) according to DASH-IF requirements.
When streaming live, content is sent in segments that are each a few seconds long. These segments shouldn’t be shorter than 2 to 4 seconds or there could be a risk of poor performance/playback quality. With LL-DASH, if the player requests a segment which is not completed, chunks will be delivered as soon as they are available using Chunked Transfer Encoding. As media can be delivered to the client as soon as it is generated on the server side, overhead is reduced, allowing to reduce the client buffer and, as a result, latency.
LL-DASH streams are automatically detected by the player and when this happens playback is automatically optimised for low-latency live streaming.
Here are our recommendations for LL-DASH to work best in our player:
liveOnResumeKeepSyncWithEdge: Boolean
By default, the player will try to remain as close as possible to the live edge when a paused live event is resumed. Setting liveOnResumeKeepSyncWithEdge
to false will cause the player to fill its buffer with live content while pause
and when resumed will consume its buffer in attempt to provide continuity of playback - it will only jump to edge if there is a discontinuity of segments in buffer. This does not apply to DVR streams. Note that this does not apply to live HLS
streaming to Apple devices as Apple uses its own HLS streaming engine that we have no control over. Default: true.
hlsJSLiveSyncDurationCount: Number
With live HLS (live that is not low-latency HLS live content), the player will give itself some space from the live edge to avoid playback issues. The space is 3 * segment length in seconds. So if you have 10 seconds length segments, live will
start 30 seconds from edge. If you have 4 seconds length segments, live will start 12 seconds from edge. hlsJSLiveSyncDurationCount
allows to tune this behavior to increase or reduce space to the live edge. Lower values will reduce
latency at the likely cost of playback issues due to buffer starvation. If low-latency streaming is your goal, please consider using Apple
low-latency HLS streaming. Default: 3.
getLivePresentationStartTimeAsDate()
rmp.getLivePresentationStartTimeAsDate()
Returns String
(ISO/IEC 8601:2004), the presentation start time date for the live stream. For HLS this is the EXT-X-PROGRAM-DATETIME value of the manifest. For DASH this is the presentationTimeOffset|availabilityStartTime value. Returns
''
if not available. For an epoch time in milliseconds use:
new Date(rmp.getLivePresentationStartTimeAsDate()).getTime()
getLiveCurrentTime()
rmp.getLiveCurrentTime()
Returns Number
, the current time in milliseconds for the live stream. This value is relative to the current timestamp in the player (this is not an absolute value) and may only be used for relative computation. Returns -1
if player is not in live mode.
getLiveDuration()
rmp.getLiveDuration()
Returns Number
, the duration in milliseconds for the live stream. This value is relative to the current timestamp in the player (this is not an absolute value) and may only be used for relative computation. Returns -1
if player is not in live mode.
syncToLiveEdge()
rmp.syncToLiveEdge()
Forces the player to resync with live edge. This can be used with live or DVR streaming (HLS or MPEG-DASH). Note that this does not apply to live HLS streaming to Apple devices as Apple uses its own HLS streaming engine that we have no control over.
©2015-2023 Radiant Media Player. All Rights Reserved.