Note: A working live example to demonstrate live WebRTC publishing and subscribe features.
WebRTC Subscriber configuration for Dolby.io. The account ID is required to be configured. A static list of Ice servers is also required.
If WebRTC simulcast bitrate configurations is being published. A bitrate menu will be displayed for layer selection or switch back to auto selection.
Dolbio.io with DVR Streaming
Dolby.io Re-Stream feature allows to push publish SRT/RTMP to another streaming service that supports live HLS DVR to play back recorded areas of a live WebRTC stream.
Configuring a secondary HLS source features have already been enabled to use it as a fallback in case of errors. Configuring a DVR HLS stream will be used to play back recorded parts of the stream.
Video.JS supports Live DVR UI features to be able to rewind to recorded parts of a live stream using HLS/Dash. Features have been implemented to play back Dolby.io WebRTC at the Live Edge. And initially seeking backwards will load a backup HLS DVR source of the re-stream. Clicking the Live button will switch back to the WebRTC live edge stream.
Enable the live dvr UI to turn on live dvr features.
{
"liveui": true,
"liveTracker": {
"trackingThreshold": 20,
"liveTolerance": 15
}
}
:::json
{
"rtcsubscriber": {
"dolbyio": {
"accountId": "",
"subToken": ""
},
"iceServers": [
{
"urls": [
"stun:stun.l.google.com:19302",
"stun:stun1.l.google.com:19302",
"stun:stun2.l.google.com:19302",
"stun:stun3.l.google.com:19302",
"stun:stun4.l.google.com:19302"
]
}
]
}
}
<div class="flex w-full h-auto my-auto">
<video class="video-js vjs-default-skin vjs-fluid " crossorigin="anonymous" controls="" id="dolbyio-dvr"></video>
</div>
<script type="text/javascript">
var player = videojs("dolbyio-dvr", {
"live": true,
"liveTracker": {
"liveTolerance": 15,
"trackingThreshold": 20
},
"liveui": true,
"plugins": {
"qualitymenu": {},
"rtcsubscriber": {
"dolbyio": {
"accountId": "huaHNT",
"subToken": "b23ebffd67a92feff751983ad91c4ddfd83285b5a3b899cffbab1d28275dce44"
},
"iceServers": [
{
"urls": [
"stun:stun.l.google.com:19302",
"stun:stun1.l.google.com:19302",
"stun:stun2.l.google.com:19302",
"stun:stun3.l.google.com:19302",
"stun:stun4.l.google.com:19302"
]
}
],
"server": "dolbyio"
}
},
"sources": [
{
"src": "C6Lx6ku6FEXgKtt",
"type": "application/webrtc"
},
{
"src": "http://localhost:1935/livedvr/livestream/playlist.m3u8?DVR",
"type": "application/x-mpegurl"
}
]
});
</script>