Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guidance for defining a new source of MediaStreamTrack #988

Merged
merged 9 commits into from
Feb 22, 2024

Conversation

jan-ivar
Copy link
Member

@jan-ivar jan-ivar commented Jan 24, 2024

Fixes #984.


Preview | Diff

@jan-ivar jan-ivar self-assigned this Jan 24, 2024
getusermedia.html Outdated Show resolved Hide resolved
and how they work with this source,
</li>
<li>describe how and when to [=set a track's muted state=] for this
<a>source</a>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it clear enough that, if extension spec is not defining how/when muted changes, then muted will never change for tracks of the given source?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also need to define ended event and what the initial source muted state should be.

Copy link
Member Author

@jan-ivar jan-ivar Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also file issues on other specs to define mute, initial mute and ended.

Copy link
Contributor

@alvestrand alvestrand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worrying about @youennf's comment about defining the default behavior - the current PR doesn't, which may be what we want to do in the first place.

getusermedia.html Outdated Show resolved Hide resolved
getusermedia.html Outdated Show resolved Hide resolved
getusermedia.html Show resolved Hide resolved
jan-ivar and others added 2 commits February 8, 2024 10:51
Co-authored-by: youennf <youennf@users.noreply.github.com>
{{MediaStreamTrack}}. If live samples are not made
available to the {{MediaStreamTrack}} it is muted.</p>
{{MediaStreamTrack}}. Live samples MUST NOT be made available to a
{{MediaStreamTrack}} while it is [=muted=].</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made available to track sinks?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to minimize language changes in this PR, and this seems orthogonal.

Samples are observable through track.stats as well, so I think it's incorrect to say it only affects sinks. I think the existing language covers the track AND sinks, but if you disagree, please open a separate issue to clarify.

to the associated events {{mute}} and {{unmute}}. The reasons for a
{{MediaStreamTrack}} to be muted are defined by its <a>source</a>.</p>
<p>For camera and microphone sources, the reasons to [=muted|mute=] are
[=implementation-defined=]. This allows user agents to implement privacy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a reasonable way to phrase it.

Agent has instructed the track to end for any reason) it is said to be
<p>After the application has invoked the {{MediaStreamTrack/stop()}}
method on a {{MediaStreamTrack}} object, or once the [=source=] of a
{{MediaStreamTrack}} ends production of live samples to its tracks,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clarity, I think this should be "permanently ends production". If production can resume, the source is muted, not ended.

@dontcallmedom-bot
Copy link

This issue had an associated resolution in WebRTC February 2024 meeting – 20 February 2024 (Add guidance for defining a new source of MediaStreamTrack):

RESOLUTION: Bring #988 to editors meeting for merging after having filed issues in source-defining specs

getusermedia.html Outdated Show resolved Hide resolved
@alvestrand alvestrand merged commit da36d40 into w3c:main Feb 22, 2024
1 of 2 checks passed
@jan-ivar jan-ivar deleted the sourcemute branch February 22, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify each source is responsible for specifying mute/unmute/ended and constraints behavior
4 participants