]
}
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.
JWPlayer 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.
<div class="flex w-full h-auto my-auto">
<div id="wowza-dvr" class=""></div>
</div>
<script type="text/javascript">
var player = jwplayer("wowza-dvr").setup({
"aspectratio": "16:9",
"dvr": true,
"playbackRateControls": true,
"plugins": {
"../../js/webrtcsubscriber.js": {}
},
"sources": [
{
"appName": "livertmp",
"file": "livestream",
"live": true,
"publisher": false,
"type": "mp4"
},
{
"file": "http://localhost:1935/livedvr/livestream/playlist.m3u8?DVR",
"type": "application/x-mpegurl"
}
],
"subscriber": {
"applicationName": "livertmp",
"debug": true,
"server": "wowza",
"serverURL": "rtc.electroteque.org",
"subscribeToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJ3ZWJydGMifQ.MjehxjweF5tPPqUJQjHEHdHLz4sjaXkTkJh0dkM8w9_M5PMKoyzUJZPYyYtgT1qn17eDZlUOUeIeyr37z-KhN1u66L2ScVCwvs0dBjf6s2ZSIw0shvKmCdq7u5bd5llWTY0FDbbtFA1l60CkfOsTd0_dQpeyKm3Y94XgIaPyJB_PCCezO8V1xmcyMT1aqPfwr99AmM8s_P_8nuDL6A1HHppImwZL550AnTjuPQaAMRSVSNuzlLrwFXBA1SRaKOa2AVkIzP0tYkqWCYd03Gvn_CpxZ5dhk5s4UYSoYeK2FX4nz4khn_k8loFO-vDu2M-1r7dvFXnt8iNYWGTzDxPNuQ",
"userData": {
"param1": "value1"
}
},
"width": "100%"
});
</script>