Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
themeRDark
    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 audio playback in browser

When a stream captured from RTMP, RTSP or VOD source is plaing in browser, audio is usually transcoded to Opus codec. By default, Opus encoder is configured to play a speech and monophonic audio. Encoder bitrate should be raised to 60 kbps or higher to play stereo in

...

browser

Code Block
themeRDark
opus.encoder.bitrate=60000

Chrome-base browsers

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

...