...
Code Block | ||||
---|---|---|---|---|
| ||||
var options = { unmutePlayOnStart: true, constraints: { audio: { deviceId: 'default' } } }; // Leave participant.getStreams()[0].play(display).on(STREAM_STATUS.PLAYING, function (playingStream) { stream muted in Android Edge browser #WCS-3445 if (Browser.isChromiumEdge() && Browser.isAndroid()) { options.unmutePlayOnStart = false; } participant.getStreams()[0].play(display, options).on(STREAM_STATUS.PLAYING, function (playingStream) { var video = document.getElementById(playingStream.id()) video.addEventListener('resize', function (event) { resizeVideo(event.target); }); // Set up participant Stop/Play button if (playBtn) { $(playBtn).text("Stop").off('click').click(function() { $(this).prop('disabled', true); playingStream.stop(); }).prop('disabled', false); } // Set up participant audio toggle button #WCS-3445 if (audioBtn) { $(audioBtn).text("Audio").off('click').click(function() { if (playingStream.isRemoteAudioMuted()) { playingStream.unmuteRemoteAudio(); document.getElementById(playingStream.id()).addEventListener('resize', function (event) } else { resizeVideo(event.target); }playingStream.muteRemoteAudio(); if (button) { $(button).text("Stop").off('click').click(function(){} $(this}).prop('disabled', truefalse); } playingStream.stop(); // Start participant }).prop('disabled', false); audio state checking timer #WCS-3445 } participantState.startMutedCheck(playingStream); }).on(STREAM_STATUS.STOPPED, function () { onParticipantStopped(participant); }).on(STREAM_STATUS.FAILED, function () { onParticipantStopped(participant); }); |
12. Stop of streaming.
...