]
}
Note: Not a live demo, server configuration is just for example. For live working example try the Dolby.io Publisher and Subscriber example. Or AWS Kinesis Publisher and Subscriber example.
WebRTC Subscriber configuration for Wowza Media Server. Wowza Media Developer and full licence works with WebRTC.
Configured is a custom subscribe token that is verified with the custom Wowza webrtc provider module using a configured shared secret.
Wowza WebRTC with DVR Streaming
Wowza nDVR feature allows to play back recorded parts of a live stream as HLS. nDVB can be configured and setup in the application config. Once enabled the "?DVR" param enables playing back DVR HLS.
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 Wowza WebRTC at the Live Edge. And initially seeking backwards will load a backup HLS DVR source of the stream. Clicking the Live button will switch back to the WebRTC live edge stream.
Setting up HLS/WebRTC subscribing
The setup for HLS/WebRTC multi subscribing is a process and requires two applications configured. One application which ingests RTMP/SRT is used as the nDVR HLS packetizer application. A transcoder configured on the ingest application to pass through video and transcode AAC audio to Opus. A stream target on the ingest application to take in the transcoder name and push publish to the WebRTC application where WebRTC subscribing will take place.
Enable the live dvr UI to turn on live dvr features.
{
"liveui": true,
"liveTracker": {
"trackingThreshold": 20,
"liveTolerance": 15
}
}
<div class="flex w-full h-auto my-auto">
<video class="video-js vjs-default-skin vjs-fluid " crossorigin="anonymous" controls="" id="wowza-dvr"></video>
</div>
<script type="text/javascript">
var player = videojs("wowza-dvr", {
"live": true,
"liveTracker": {
"liveTolerance": 15,
"trackingThreshold": 20
},
"liveui": true,
"plugins": {
"rtcsubscriber": {
"applicationName": "livertmp",
"server": "wowza",
"serverURL": "rtc.electroteque.org",
"subscribeToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ3ZWJydGMifQ.MjehxjweF5tPPqUJQjHEHdHLz4sjaXkTkJh0dkM8w9_M5PMKoyzUJZPYyYtgT1qn17eDZlUOUeIeyr37z-KhN1u66L2ScVCwvs0dBjf6s2ZSIw0shvKmCdq7u5bd5llWTY0FDbbtFA1l60CkfOsTd0_dQpeyKm3Y94XgIaPyJB_PCCezO8V1xmcyMT1aqPfwr99AmM8s_P_8nuDL6A1HHppImwZL550AnTjuPQaAMRSVSNuzlLrwFXBA1SRaKOa2AVkIzP0tYkqWCYd03Gvn_CpxZ5dhk5s4UYSoYeK2FX4nz4khn_k8loFO-vDu2M-1r7dvFXnt8iNYWGTzDxPNuQ"
}
},
"sources": [
{
"src": "livestream",
"type": "application/webrtc"
},
{
"src": "http://localhost:1935/livedvr/livestream/playlist.m3u8?DVR",
"type": "application/x-mpegurl"
}
]
});
</script>