Allow for overriding reasons tracks stay muted#335
Conversation
| <ol> | ||
| <li> | ||
| Provided <var>track</var> is not [=MediaStreamTrack/muted=] | ||
| by the user agent for reasons that override its [=pausing all |
There was a problem hiding this comment.
In this case, we might be again in capture state UI out of sync with the device mute state.
It seems to me that, in the usual case of capturing with only one device, UA should instead deny the request.
It is really only when there are multiple capture devices that is fine to do what you are suggesting (In that case the capture state UI will also be in sync since at least one device will restart capture).
It seems a note for implementors stating the reasons to override and/or deny might be helpful.
|
@jan-ivar, do you plan to move forward with this PR? |
There was a problem hiding this comment.
Pull Request Overview
This PR addresses issue #332 by allowing user agents to override the media session's pausing policy when tracks are muted for other reasons. The change ensures that tracks muted by external factors (like hardware mute buttons) are not affected by the session's pause/resume behavior.
- Renames
applyPausePolicyvariable toimplementPausePolicyfor clarity - Adds conditional logic to prevent overriding track muted states when tracks are already muted for reasons beyond the pausing policy
- Includes explanatory note about overriding reasons such as physical mute buttons
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <li> | ||
| Provided <var>track</var> is not [=MediaStreamTrack/muted=] | ||
| by the user agent for reasons that override its [=pausing all | ||
| input sources | pausing policy=], |
There was a problem hiding this comment.
The reference '[=pausing all input sources | pausing policy=]' appears to have inconsistent linking syntax. Consider using consistent reference formatting throughout the specification.
| input sources | pausing policy=], | |
| by the user agent for reasons that override its [=pausing all input sources=], |
|
@jan-ivar, is this still something worth integrating? If yes, rebase please? 🙏 |
Fixes #332 (also renames a variable to improve clarity). cc @youennf PTAL.
Preview | Diff