...
Code Block |
---|
|
session.createStream({
name: streamName,
display: remoteVideo
}).on(STREAM_STATUS.PENDING, function (stream) {
...
}).on(STREAM_STATUS.PLAYING, function (stream) {
setStatus("#playStatus", stream.status());
onPlaying(stream);
if (Browser.isSafariWebRTC() && Browser.isiOS() && Flashphoner.getMediaProviders()[0] === "WebRTC") {
setTimeout(function () {
muteVideo();
unmuteVideo();
}, 1500);
}
...
}).play(); |
Stereo playback in Chrome browser
By default, Chrome browser plays WebRTC stream with stereo sound in Opus codec as mono due to engine bug. Since Web SDK build 0.5.28.2753.151 this can be worked around using the following playback constraint
Code Block |
---|
|
constraints.audio.stereo=true |
for example
Code Block |
---|
|
session.createStream({
name: streamName,
display: remoteVideo,
constraints: {
audio: {
stereo: true
}
}
...
}).play(); |
This tweak works in Chrome 86, Chromium based browsers, and in Safari browser.
Additional video stream playing delay
...