Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mute Yourself #42

Open
erikzenker opened this issue May 21, 2020 · 6 comments
Open

Mute Yourself #42

erikzenker opened this issue May 21, 2020 · 6 comments
Labels

Comments

@erikzenker
Copy link
Member

Currently it is only possible to mute other conference participants. It would be nice to provide a self mute button.

@thammi
Copy link
Member

thammi commented May 21, 2020

Calling toggleMute() on LocalPeer should work. It sends silence/black.

For not sending anything we need to call replaceTrack(null) on the corresponding RTCRtpSender (which is not distinguishable from connection problems) or we have to set direction to recvonly on the corresponding RTCRtpTransceiver (which requires renegotiation).

@janlelis
Copy link
Member

I agree, this is an urgently needed feature.

Related front-end issue: palavatv/palava-web#9

This API also looks promising:

Also, we need to decide if this should be implemented in the front-end or in the client-library

@erikzenker
Copy link
Member Author

erikzenker commented May 22, 2020

Also, we need to decide if this should be implemented in the front-end or in the client-library

What does make sense to you?

IMHO providing the feature in the client-library make sense to me.

@thammi
Copy link
Member

thammi commented May 22, 2020

Muting tracks using enabled, as described in the links, is implemented in palava-client. It is available as toggleMute() on LocalPeer as mentioned above.

@janlelis
Copy link
Member

Muting tracks using enabled, as described in the links, is implemented in palava-client. It is available as toggleMute() on LocalPeer as mentioned above.

Awesome, didn't notice this was possible already! Should work in the same way for video tracks, too, shouldn't it?

For not sending anything

Could you elaborate a little, what anything means here? Something in the direction of only a null value is sent instead of not sending anything?

@thammi
Copy link
Member

thammi commented May 22, 2020

enabled makes video tracks send (and display) black and audio tracks send (and play) silence. This is not reversible by remote peers and does not consume much bandwidth. It is not possible to distinguish between this and a normal track on the remote peer though afaik. I was assuming toggleMute() could handle both already, but that is easy to extend.

Not sending anything means either just stopping to send the track using replaceTrack(null) (which sets mute on the remote track and triggers associated events and is not distinguishable from losing the network packages) or setting the direction to recvonly and renegotiating which stops the remote track and removes it from the remote stream.

Both methods would require a way to get the transceiver/sender of the track which would require some new concepts in palava-client or some rather hacky workarounds. rtc-lib has the ability to add custom transceivers while adding a stream to support these use cases for example. A workaround could be searching the corresponding sender for a track in the PeerConnection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants