-
Notifications
You must be signed in to change notification settings - Fork 15
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
MediaStreamTrack does not dispatch "ended" event at Chromium when src of HTMLMediaElement is changed, Firefox does dispatch "ended" event; which implementation is correct? #78
Comments
This is known bug in Chromium (https://crbug.com/854991). |
That is the purpose of filing this issue and w3c/mediacapture-main#583. While english is an equivocal language, capable of having differing definitions for the same term, technical specifications should try to avoid ambiguity where possible; e.g., From perspective here (front-end) when an |
This issue and the muted attribute issue are completely different. Issue #583 is about attributes with the same name but on different types and I don't see why they should match, especially when a media element can have a mediastream with multiple tracks, some muted and some not muted. Anyway, I think we should close this bug since the question was which implementation is correct and the answer is that the Firefox implementation matches the spec and Chrome's implementation doesn't. Concerns about the HTML ended attribute can be discussed in other bugs such as #536 and others linked from there. |
Note that there was a misunderstanding on my part since I thought this bug referred to the ended event and attribute of the HTML element in mediacapture-main, but this is about mediacapture from element. I'll check the issue again and will get back to you. |
The spec says
So this makes it clear that the Firefox behavior is spec compliant and Chrome's is not. |
@guidou Just wanted to confirm that Chromium/Chrome implementation of Found another Chromium bug that will file shortly. When a |
@guidou If you find the time could you also look into the ongoing issue of Chromium tab crashing when |
From #78 (comment) it sounds like Firefox's implementation is the correct one. |
At Chromium 73
ended
event is not dispatched atHTMLVideoElement
whensrc
attribute is changed.mute
event is dispatched at Chromium 73. Firefox 68 does dispatchended
event whensrc
attribute ofHTMLVideoElement
is changed. Chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=957340.Relevant specifications:
https://www.w3.org/TR/mediacapture-fromelement/
A captured MediaStreamTrack ends when playback ends (and the ended event fires) or when the track that it captures is no longer selected or enabled for playback. A track is no longer selected or enabled if the source is changed by setting the src or srcObject attributes of the media element. The steps in MediaStreamTrack.stop() are performed on the MediaStreamTrack when it ends.
https://www.w3.org/TR/mediacapture-streams/
A MediaStreamTrack object is said to end when the source of the track is disconnected or exhausted.
When a MediaStreamTrack track ends for any reason other than the stop() method being invoked, the User Agent MUST queue a task that runs the following steps:
Related:
#77
Which implementation of the specifications is correct?
The text was updated successfully, but these errors were encountered: