W3C home > Mailing lists > Public > public-webrtc@w3.org > November 2019

[mediacapture-main] Only Firefox turns off device on disabled track. Stronger language needed? (#642)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Mon, 18 Nov 2019 19:45:12 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-524580147-1574106311-sysbot+gh@w3.org>
jan-ivar has just created a new issue for https://github.com/w3c/mediacapture-main:

== Only Firefox turns off device on disabled track. Stronger language needed? ==
[Live](https://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediastreamtrackstate-live) camera/mic tracks can be turned on/off with the [enabled](https://w3c.github.io/mediacapture-main/getusermedia.html#dom-mediastreamtrack-enabled) attribute.

The obvious (and only?) use-case is the [mute button](https://jsfiddle.net/jib1/ru16j2y8/):
muted.onclick = () => { video.srcObject.getVideoTracks()[0].enabled = !muted.checked; }

Unfortunately, only Firefox [turns off the device](https://blog.mozilla.org/webrtc/better-privacy-on-camera-mute-in-firefox-60/) (and hardware light) in this case.

This has led to web compat issues:

Sites like Hangouts use a hack to get this desired property on Chrome: relinquish camera track on mute, and reacquire it w/`getUserMedia` on unmute (the microphone track is left alone, presumably because few mics have a light?)

The hack backfires in Firefox, where Hangouts users get a needless extra prompt on unmute. Frustratingly, it would have worked beautifully in Firefox without the hack.

We worked hard to get this right in https://github.com/w3c/mediacapture-main/issues/389, but do we need stronger language to fix this web compat issue?

Right now [we have](https://www.w3.org/TR/mediacapture-streams/#life-cycle-and-media-flow): _"when a track becomes either muted or disabled, and this brings all tracks connected to the device to be either muted, disabled, or stopped, then the UA MAY, using the device's deviceId, deviceId, set [[devicesLiveMap]][deviceId] to false"_

Should this be a MUST? And do we need to say something about actually relinquishing the device?

If we can't get consensus on compatible behavior, should we scrap `enabled`?

Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/642 using your GitHub account
Received on Monday, 18 November 2019 19:45:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:18:50 UTC