Bug 1767499 [wpt PR 33915] - MSE-in-Workers: Enable explicit durationchange before...
commit8cccb880e3159190c5cc475942986778a46e11d7
authorMatt Wolenetz <wolenetz@chromium.org>
Sun, 8 May 2022 17:47:06 +0000 (8 17:47 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Sun, 15 May 2022 20:20:51 +0000 (15 20:20 +0000)
treefecf8a6cb971beaea61653491080f6b24a49755d
parent70d1dd8fa7c42a87b32837dc3846c54edfd7c8ad
Bug 1767499 [wpt PR 33915] - MSE-in-Workers: Enable explicit durationchange before HAVE_METADATA, a=testonly

Automatic update from web-platform-tests
MSE-in-Workers: Enable explicit durationchange before HAVE_METADATA

Once the media player has reached at least HAVE_METADATA, the pipeline
will service MSE-attached media element's player duration queries from
the MediaSource's current duration or recent duration. However, before
reaching HAVE_METADATA, any explicit change of MediaSource duration by
the app needs special handling to let the attached media element know
the updated duration, because the element's notion of media duration
change is not signaled by the WebMediaPlayer before reaching
HAVE_METADATA.

This change fixes the MSE-in-Workers implementation to explicitly
notify the media element of application's explicit duration update if
such update's delivery in a cross-thread-task posted to the media
element's context finds that the media element's readyState is
HAVE_NOTHING. This mimics existing SameThreadMediaSourceAttachment
functionality while maintaining the high-resolution timer mitigations
in CrossThreadMediaSourceAttachment.

BUG=1318634,878133

Change-Id: If8e47959a4267a6891edfc883e657613c8182709
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3611185
Reviewed-by: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Commit-Queue: Matthew Wolenetz <wolenetz@chromium.org>
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
Auto-Submit: Matthew Wolenetz <wolenetz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#999586}

--

wpt-commits: cd9875da212edeaea17a63b27e6e183ef145e972
wpt-pr: 33915
testing/web-platform/tests/media-source/dedicated-worker/mediasource-message-util.js
testing/web-platform/tests/media-source/dedicated-worker/mediasource-worker-duration.html [new file with mode: 0644]
testing/web-platform/tests/media-source/dedicated-worker/mediasource-worker-duration.js [new file with mode: 0644]