Re: [mediacapture-main] Clarification about ended event and attribute on HTML media elements.

I believe we have a couple of issues filed for this already:
 * https://github.com/w3c/mediacapture-main/issues/518 covers *"[overriding] the condition for when the media element has ended playback to support MediaStreams, we'd get the algorithm with events and state for free."* (first questions here)
 * https://github.com/w3c/mediacapture-main/issues/519 is the corollary for states and events when resuming playback from tracks added to a stream.
 * https://github.com/w3c/mediacapture-main/issues/453 is similar to https://github.com/w3c/mediacapture-main/issues/519 but also covers tracks added to a `.srcObject` stream for the first time.

Let's move discussion to the above issues where appropriate, and discuss remaining questions here:

>  ... is this mandating that the element must be paused when it becomes ended?

I believe so. [html](https://html.spec.whatwg.org/multipage/media.html#paused-for-in-band-content) already pauses at the end: *"When the current playback position reaches the end of the media resource when the direction of playback is forwards, ... If the media element has ended playback, the direction of playback is forwards, and paused is false, then ... Fire an event named pause at the media element. ... Fire an event named ended at the media element."*

So it seems reasonable that the playback-ending behavior of a track ending or being removed should have that effect as well.

Unfortunately, an impedance mismatch is the html spec derives a lot of its states from playback position, a concept missing with streams and tracks).

We probably either need to provide alternate prose for all these things, unless we can somehow map stream and track actions to playback position somehow?

> Can it be reset to zero if the stream ends (and possibly restarts)?

Seems sensible to me.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/536#issuecomment-418826794 using your GitHub account

Received on Wednesday, 5 September 2018 18:07:48 UTC