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

[video-rvfc] Fix src switch after 1 frame issue #29023

Merged
merged 1 commit into from May 18, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 18, 2021

Since we don't reset |last_presented_frame_| when switching sources on
a video element, if we update video.src from the first rVFC callback,
the first frame of the src will appear to be "stale". This is because
its |presented_frames| matches |last_presented_frames_| (with a value of
1, but it could technically happen with any number). This results in the
rVFC callback never running, and is especially easy to run into when
writing tests, which will time out.

This CL fixes the issue by clearing |last_presented_frame_| when the
video element's media player is cleared.

It also adds a WPT that switches between two video sources.

Bug: 1201211
Change-Id: I80519c1b19adcbb97ebcd94202e7df1df685d240
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2901601
Auto-Submit: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#884026}

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.

Since we don't reset |last_presented_frame_| when switching sources on
a video element, if we update video.src from the first rVFC callback,
the first frame of the src will appear to be "stale". This is because
its |presented_frames| matches |last_presented_frames_| (with a value of
1, but it could technically happen with any number). This results in the
rVFC callback never running, and is especially easy to run into when
writing tests, which will time out.

This CL fixes the issue by clearing |last_presented_frame_| when the
video element's media player is cleared.

It also adds a WPT that switches between two video sources.

Bug: 1201211
Change-Id: I80519c1b19adcbb97ebcd94202e7df1df685d240
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2901601
Auto-Submit: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#884026}
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