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

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
```js
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