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

Give blink::CueTimeline a timer for precisely handling cue events #22071

Merged
merged 1 commit into from Aug 20, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 3, 2020

Cue-related events (enter, exit, cuechange) are fired up to 250ms late,
and there is a similar latency in their display which is quite
noticeable.

The underlying problem is that we only update cues alongside the
timeupdate event, which is fixed at 4 Hz.

My solution is to add a separate timer to CueTimeline
(CueTimeline::cue_event_timer_) which is given a timeout for the
next cue event based on the current playback position and rate. This
allows for significantly more precise cue timing accuracy without a
significant performance penalty.

Additionally, several web tests were written with the expectation that
the 'time marches on' algorithm is run before video playback begins
(ie, upon loading text track cues). This behavior is not in accordance
with the spec (as outlined in crbug/1050767), so this CL fixes those
expectations and adds a new test to prevent regressing.

Bug: 576310, 1050767
Change-Id: I675f5f030a68ba9cee10e12b3e79a9b174048193
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2008079
Commit-Queue: Will Cassella <cassew@google.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#800148}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2008079 branch 2 times, most recently from e015616 to 9604976 Compare March 6, 2020 02:47
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2008079 branch 2 times, most recently from fc797fa to 8ceafc0 Compare April 18, 2020 06:02
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2008079 branch 5 times, most recently from 0950827 to b971e23 Compare August 1, 2020 04:13
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2008079 branch 3 times, most recently from ad2369e to 9a7a8ff Compare August 20, 2020 14:42
Cue-related events (enter, exit, cuechange) are fired up to 250ms late,
and there is a similar latency in their display which is quite
noticeable.

The underlying problem is that we only update cues alongside the
`timeupdate` event, which is fixed at 4 Hz.

My solution is to add a separate timer to CueTimeline
(`CueTimeline::cue_event_timer_`) which is given a timeout for the
next cue event based on the current playback position and rate. This
allows for significantly more precise cue timing accuracy without a
significant performance penalty.

Additionally, several web tests were written with the expectation that
the 'time marches on' algorithm is run before video playback begins
(ie, upon loading text track cues). This behavior is not in accordance
with the spec (as outlined in crbug/1050767), so this CL fixes those
expectations and adds a new test to prevent regressing.

Bug: 576310, 1050767
Change-Id: I675f5f030a68ba9cee10e12b3e79a9b174048193
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2008079
Commit-Queue: Will Cassella <cassew@google.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#800148}
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.

None yet

3 participants