Dipak Pakhale
Dipak Pakhale

Reputation: 11

Is It possible to mute all participants audio and video in mediasoup in flutter?

I am developing a video-conferencing application in flutter using mediasoup WebRTC. I can implement producer and consumer mute and unmute audio/video by themself. I would like to implement mute all participants through a host. So Please provide an answer if you have one.

Upvotes: 1

Views: 750

Answers (2)

ugonner
ugonner

Reputation: 1

I believe you need to do that from the server side - pausing all producers - on an event triggered from a client as follows:

  1. CLIENT: Socket.emit("muteAll");

  2. SERVER: For all producers do: await producer.pause(); // Notify clients and handle UI effects.

Upvotes: 0

Ashok Songara
Ashok Songara

Reputation: 160

Yes you can mute all using below properties

mediaStream.getVideoTracks()[0].enabled = !(mediaStream.getVideoTracks()[0].enabled);

Upvotes: 0

Related Questions