- From: youennf via GitHub <sysbot+gh@w3.org>
- Date: Wed, 26 Feb 2020 21:52:20 +0000
- To: public-webrtc-logs@w3.org
As I said in the issue thread, I am not sure @enabled is the right API for requesting to capture again after some time has passed. For instance, if the user agent decides to not allow to unmute the track, it can either decide to leave it muted or end the track, which requires the application to look for both events and maybe decide to call getUserMedia after some timeouts or after receiving the end event. A promise-based API would seem more natural. We could gate it as we do for other APIs, for instance by requiring focus or user activation. Also, it might be used for other purposes. For instance, Safari is muting a page track if user grants another web page access to the camera/microphone. This API could be used by the other page to request access again instead of calling getUserMedia again. How about the following: 1. Leave @enabled as it is defined 2. Add void mute() that tells the user agent to set track.muted to true (guaranteed to succeed) 3. Add Promise unmute() that asks the user agent to set track.muted to false (no guarantee to succeed but guaranteed to have an answer). -- GitHub Notification of comment by youennf Please view or discuss this issue at https://github.com/w3c/mediacapture-main/pull/662#issuecomment-591663077 using your GitHub account
Received on Wednesday, 26 February 2020 21:52:22 UTC