Versions Compared

Key

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

...

Code Block
languagejs
themeRDark
    stream = session.createStream(options).on(STREAM_STATUS.PENDING, function (stream) {
        ...
    }).on(STREAM_EVENT, function(streamEvent){
        if (STREAM_EVENT_TYPE.NOT_ENOUGH_BANDWIDTH === streamEvent.type) {
            ...
        } else if (STREAM_EVENT_TYPE.RESIZE === streamEvent.type) {
            ...
        } else if (STREAM_EVENT_TYPE.UNMUTE_REQUIRED === streamEvent.type) {
            console.log("Stream is muted by autoplay policy, user action required to unmute");
            $("#unmute").show();
        }
    });
    stream.play();

Пример обработки нажатия кнопки Unmute 

...