W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > February 2020

Re: [mediacapture-main] Relinquish device when all tracks are muted or disabled. (#662)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Wed, 26 Feb 2020 22:06:39 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-591668771-1582754797-sysbot+gh@w3.org>
I don't think we should introduce new APIs without a need. And I don't understand the need here.

> Add void mute() that tells the user agent to set track.muted to true (guaranteed to succeed)

Why would JS ever mute? Seems confusing.

I like our separation where [muted](https://w3c.github.io/mediacapture-main/getusermedia.html#track-muted) is controlled by the user agent and [enabled](https://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediastreamtrack-enabled) is controlled by JS.

We even leverage that in webrtc-pc.

> Add Promise unmute() that asks the user agent to set track.muted to false (no guarantee to succeed but guaranteed to have an answer).

If you need a promise, just do
new Promise(r => track.onunmute = r);

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/pull/662#issuecomment-591668771 using your GitHub account
Received on Wednesday, 26 February 2020 22:06:40 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:50 UTC