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

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

From: youennf via GitHub <sysbot+gh@w3.org>
Date: Mon, 02 Mar 2020 09:26:50 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-593305593-1583141209-sysbot+gh@w3.org>
> There's no reason we couldn't gate `track.enabled = true` on user activation if we want.

We should first see whether that is web compatible.
We should also decide whether that is desirable for non capture tracks.
I do not see why we should require user activation for a web audio track or a remote audio track for instance.

It is also unclear to me whether we want to restart capturing for getDisplayMedia tracks.
Should there be an indicator when enabled=false? 

> But why doesn't Safari automatically unmute the first window when I close the second? Or at least when I focus the first window again?

The user can perfectly do that with the camera/mic icon to switch capture between pages.

> It seems obvious to me that it wants to be unmuted, so why not just assume it does?

I do not think that switching to a page that was capturing an hour ago is sufficient information to know whether the user wants to restart capturing for this page.
The intent is much clearer if user clicks on a button and the web page is asked to unmute.

Some more thoughts:

Safari camera/mic icon exposes the information of whether the page has a live capture track and if all tracks are muted or not. This proposal introduces a third variable (enabled) that should be taken into consideration in the computation of the page capture state, which does seem unnecessarily complex. It seems more consistent with how the spec is currently defined to piggy back on the muted state.

This PR is also not very clear in how should be treated the case where unmuting is denied by the user agent.
The typical case is a user agent denying recapture for a page that did not capture for several minutes/hours. It could also be that the user agent has a global switch that disables capture for all pages.
The current PR allows two possibilities: keep the track muted or end the track.
A promise-based approach allows to reject with various errors (device no longer there, access denied...).

GitHub Notification of comment by youennf
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/pull/662#issuecomment-593305593 using your GitHub account
Received on Monday, 2 March 2020 09:26:52 UTC

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