HTMLMediaElement passes currentTime() to CueTimeline::UpdateActiveCues instead of currentPlaybackPosition()
Reported by
mdob...@vewd.com,
Sep 12
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36 Example URL: Steps to reproduce the problem: This can happen when running video starting at time = x > 0 and containing data cues 1. On HTMLMediaElement::SetReadyState(kHaveMetadata) the officialPlaybackPosition is not updated and therefore CueTimeline::UpdateActiveCues(currentTime()) is called with time 0 (currentTime() <- OfficialPlaybackPosition()) 2. If there is a data cue active at time 0 (but not x) at this point it will be placed on active cues list (TextTrack::activeCues()) and can be incorrectly displayed for a while. 3. Finally, on HTMLMediaElement::SetReadyState(kHaveCurrentData) the official playback position will be updated to x and therefore the activeCues will be updated to the "proper" list with UpdateActiveCues. What is the expected behavior? On HTMLMediaElement::SetReadyState(kHaveMetadata) the CueTimeline::UpdateActiveCues should be updated with the "real" current playback position (x) instead of 0. What went wrong? According to: https://www.w3.org/TR/html51/semantics-embedded-content.html#playing-the-media-resource which is referenced in CueTimeline::UpdateActiveCues, the active cues should be updated according to current playback position (currentPlaybackPosition()). But instead currentTime() is passed to UpdateActiveCues(). And please note that currentTime() is not updated yet when kHaveMetadata arrives. Suggested change is attached. Did this work before? N/A Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? N/A Chrome version: 67.0.3396.62 Channel: n/a OS Version: Flash Version: Contents of chrome://gpu: This problem may not be visible when the playback is started from time=0.
,
Sep 14
,
Sep 16
,
Sep 17
One more thought about this problem. Even when currentPlaybackPosition is used when kHaveCurrentData arrives, I think we still may end up with invalid time (web_media_player_ -> CurrentTime() may not be set up yet). To be more specific: CueTimeline::UpdateActiveCues is called by HTMLMediaElement::SetReadyState for all states (the cues are updated only for states != HTMLMediaElement::kHaveNothing though). On the other hand, according to "4.7.14.7. Ready states"(https://www.w3.org/TR/html51/semantics-embedded-content.html#media-timeline) the time marches on steps should only be called for HAVE_ENOUGH_DATA state. So I wonder what is the reason we call it every time we call HTMLMediaElement::SetReadyState.
,
Sep 25
Suggested alternative change according to the last comment.
,
Oct 3
It seems that this updated change wasn't uploaded into the codereview tool. Could you do this?
,
Oct 5
Yes, sorry for the delay. Done: https://chromium-review.googlesource.com/c/chromium/src/+/1264697
,
Jan 11
This issue has been marked as started, but has no owner. Making available. |
||||
►
Sign in to add a comment |
||||
Comment 1 by dalecur...@chromium.org
, Sep 12Components: -Internals>Media Blink>Media>Track