DVR streaming offers the possibility to rewind into a live stream to watch recorded content. Radiant Media Player features a specific DVR UI, including intuitive in-stream navigation and jump-to-live functionalities. DVR streaming with Radiant Media Player is supported for the following streaming protocol:
DVR for audio-only streaming is also supported.
Radiant Media Player sports a variety of optimisations for DVR streaming. DVR streams are automatically
detected based on the dvrUIThreshold
setting.
You may also insert video ads, use DRM or 360 video content and query our dedicated DVR API to fine tune your DVR player.
dvrUIThreshold: Number
Minimum time in second for the DVR window for the DVR UI to be shown. Default: 300.
<!-- Include Radiant Media Player - here we use the optimised build for hls.js --> <script src="https://cdn.radiantmediatechs.com/rmp/9.16.6/js/rmp-hlsjs.min.js"></script> <!-- Player container element --> <div id="rmp"></div> <!-- Set up player configuration options --> <script> // DVR HLS source const src = { hls: 'https://your-dvr-hls-url.m3u8' }; // Your player settings const settings = { licenseKey: 'your-license-key', src: src, width: 640, height: 360, // To enable full DVR UI on Apple devices forceHlsJSOnAppleDevices: true, dvrUIThreshold: 300, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] } }; const rmp = new RadiantMP('rmp'); rmp.init(settings); </script>
<!-- Include Radiant Media Player - here we use the optimised build for Shaka player --> <script src="https://cdn.radiantmediatechs.com/rmp/9.16.6/js/rmp-shaka.min.js"></script> <!-- Player container element --> <div id="rmp"></div> <!-- Set up player configuration options --> <script> // DVR MPEG-DASH source const src = { dash: 'https://your-dvr-dash-url.m3u8' }; // Your player settings const settings = { licenseKey: 'your-license-key', src: src, width: 640, height: 360, // Here we tell the player to enable DVR UI and optimisations dvrUIThreshold: 300, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] } }; const rmp = new RadiantMP('rmp'); rmp.init(settings); </script>
On iOS where media source extensions are not available we rely on Apple QuickTime-based embedded player for providing DVR controls with HLS. DVR controls are only available in fullscreen mode on iOS 12+.
When casting a DVR stream through Google Cast, the player handles the DVR stream as a simple live stream. This is because DVR controls in our custom receiver application is currently unavailable.
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 2 seconds will cause the player to seek to
10 seconds within the DVR sliding window.
syncToLiveEdge()
rmp.syncToLiveEdge();
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.
getCurrentTime()
rmp.getCurrentTime();
This getter returns a Number
expressed in milliseconds
representing the
relative
time from the start of the DVR current window while the player is in DVR recorded mode. In
DVR live
mode or if this value is not available, -1
is returned.
getStreamMode()
rmp.getStreamMode();
This getter returns a String
stating the current streaming
mode. Possible
values are:
'livedvr'
, 'voddvr'
, 'live'
, 'vod'
,
'unresolved'
.
dvrislive
This event fires when the DVR stream becomes live due to a user interaction or a call to
syncToLiveEdge
API method
dvrisvod
This event fires when the DVR stream becomes VOD due to a user interaction or a call to
dvrSeekTo
API method
©2015-2024 Radiant Media Player. All Rights Reserved.