How to add - Mute Audio and Video to simple streamer example.

Max

Administrator
Staff member
Good day.
You can add stream.muteVideo() and stream.muteAudio() functions on some button press as like as in Media Devices example
Code:
function muteAudio() {
    if (publishStream) {
        publishStream.muteAudio();
    }
}

function unmuteAudio() {
    if (publishStream) {
        publishStream.unmuteAudio();
    }
}

function muteVideo() {
    if (publishStream) {
        publishStream.muteVideo();
    }
}

function unmuteVideo() {
    if (publishStream) {
        publishStream.unmuteVideo();
    }
}
 
Top