...
Note that Foirefox can exclude the camera from the list while requesting camera and microphone access if camera driver does not provide a required combination of resolution and FPS. Also, Firefox can change a publishing resolution if there is only one resolution with required FPS in camera driver response.
Stereo audio publishing
Audio bitrate should be more than 60000 bps to publish stereo in Opus codec from browser. This can be done by setting Opus codec parameters on server side
Code Block | ||
---|---|---|
| ||
opus_formats = maxaveragebitrate=64000;stereo=1;sprop-stereo=1; |
In this case, Firefox browser publishes stereo audio without additional setup.
Stereo audio pub;lishing from Chrome based browsers
A certain client setup is required to publish stereo audio from Chrome. Thre is two ways to set this up depending on client implementation
Using Web SDK
If Web SDK is used in project, it is necessary to set the fiollowing constraint option:
Code Block | ||||
---|---|---|---|---|
| ||||
session.createStream({
name: streamName,
display: remoteVideo,
constraints: {
audio: {
stereo: true
},
...
}
...
}).publish(); |
Using Websocket API
If only Websocket API is used in project, it is necessary to disable echo cancellation
Code Block | ||||
---|---|---|---|---|
| ||||
session.createStream({
name: streamName,
display: remoteVideo,
constraints: {
audio: {
echoCancellation: false,
googEchoCancellation: false
},
...
}
...
}).publish(); |
If echo cancellation is enabled, Chrome will publish mono audio even if stereo is set in Opus codec options.
Known issues
1. If the web app is inside an iframe element, publishing of the video stream may fail.
...