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.
OBS RTMP Encoder to WebRTC subscribing is supported if Browser based WebRTC publishing is not desired. See the [Dolby.io Encoder Settings](https://docs.dolby.io/streaming-apis/docs/using-obs documentation for setting up the encoder.
A subcriber token is desirable to restrict WebRTC plaback. A supplied script is supplied to generate the subscriber token with domain restriction. That can be used to configure the subToken
config. See the Dolby.io API Docs for generating these tokens.
{
"dolbyio": {
"accountId": "",
"publishToken": ""
},
"rtc": {
"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">
<div id="dolbyio-altaudio" class=""></div>
</div>
<script type="text/javascript">
var player = flowplayer("#dolbyio-altaudio", {
"clip": {
"live": true,
"sources": [
{
"src": "NrD6zA75oEgY",
"type": "application/webrtc"
}
]
},
"dolbyio": {
"accountId": "huaHNT",
"subToken": "b23ebffd67a92feff751983ad91c4ddfd83285b5a3b899cffbab1d28275dce44"
},
"rtc": {
"altaudio": true,
"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"
},
"share": false
});
</script>