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

MSE: Fix rare flaky changeType-play-* failures #29052

Merged
merged 1 commit into from
May 25, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

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

Unless the app explicitly sets mediaSource.duration,
HTMLMediaElement.duration remains NaN until initial HAVE_METADATA is
reached, even if the attached mediaSource has already buffered media
well beyond the initialization segment(s) necessary to begin transition
to HAVE_METADATA. In Chromium, that transition is begun asynchronously,
letting thread hop through the pipeline thread complete while letting
the app continue. Eventually, the media element transitions, but in the
interim, its value for duration could still be NaN, even if mediaSource
has a duration value.

This change relaxes the changeType-play-* utility's reliance on strict
matching of mediaElement.duration and mediaSource.duration, instead
relying on the latter for use in trimming the buffered duration.

I've filed MSE spec issue #275 to discuss this behavior:
w3c/media-source#275

This change also reports more details in changeType web-test assertion
failures, which also enabled finding the suspected root cause of the
tests' flakiness.

Bug: 1184745

Change-Id: I208cbfbbc60776366a16b6a3e79f52480df5be37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2906776
Auto-Submit: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Ted Meyer <tmathmeyer@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#886148}

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-2906776 branch 2 times, most recently from 87182e9 to 51d0821 Compare May 21, 2021 23:42
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title MSE: Report more details in changeType web-test assertion failures MSE: Fix rare flaky changeType-play-* failures May 22, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2906776 branch from 51d0821 to 94fb8f7 Compare May 22, 2021 01:13
Unless the app explicitly sets `mediaSource.duration`,
`HTMLMediaElement.duration` remains NaN until initial HAVE_METADATA is
reached, even if the attached mediaSource has already buffered media
well beyond the initialization segment(s) necessary to begin transition
to HAVE_METADATA. In Chromium, that transition is begun asynchronously,
letting thread hop through the pipeline thread complete while letting
the app continue. Eventually, the media element transitions, but in the
interim, its value for duration could still be NaN, even if mediaSource
has a duration value.

This change relaxes the changeType-play-* utility's reliance on strict
matching of mediaElement.duration and mediaSource.duration, instead
relying on the latter for use in trimming the buffered duration.

I've filed MSE spec issue #275 to discuss this behavior:
w3c/media-source#275

This change also reports more details in changeType web-test assertion
failures, which also enabled finding the suspected root cause of the
tests' flakiness.

Bug: 1184745

Change-Id: I208cbfbbc60776366a16b6a3e79f52480df5be37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2906776
Auto-Submit: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Ted Meyer <tmathmeyer@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#886148}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2906776 branch from 94fb8f7 to bace54f Compare May 25, 2021 02:30
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 04c1391 into master May 25, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-2906776 branch May 25, 2021 02:43
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.

3 participants