MenuMenu

RTCMultiConnection.mute

Mute i.e. disable audio, video or screen track

How to use

var localStream = connection.attachStreams[0];
localStream.mute('both');

// or
var firstRemoteStream = connection.streamEvents.selectFirst({ remote: true }).stream;
firstRemoteStream.mute();

// or
var streamByUserId = connection.streamEvents.selectFirst({ userid: 'remote-userid' }).stream;
streamByUserId.mute();

You can pass "audio", "video" or "both" on "stream.mute" method.