Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSE: Fix rare flaky changeType-play-* failures
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}
- Loading branch information