Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 321003e22c50fc0c6997243a1a81cca118d16645
      
https://github.com/WebKit/WebKit/commit/321003e22c50fc0c6997243a1a81cca118d16645
  Author: Jean-Yves Avenard <j...@apple.com>
  Date:   2024-03-15 (Fri, 15 Mar 2024)

  Changed paths:
    A LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt
    A LayoutTests/media/media-source/worker/media-managedmse-worker.html
    A LayoutTests/media/media-source/worker/worker.js
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/Modules/mediasource/MediaSourceHandle.cpp
    M Source/WebCore/Modules/mediasource/MediaSourceHandle.h
    M Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.cpp

  Log Message:
  -----------
  [MSE] ManagedMediaSource isn't usable in a DedicatedWorker
https://bugs.webkit.org/show_bug.cgi?id=270891
rdar://124499286

Reviewed by Youenn Fablet.

The HTMLMediaElement was never attached to the MediaSource (or 
ManagedMediaSource) running
in the dedicated worker.
While this didn't prevent MediaSource to work, it would have caused the 
ManagedMediaSource
to never move to the `Open` readyState as the MMS need to check the 
HTMLMediaElement if
an AirPlay alternative is present.
The MediaSourceHandle uses the ensureOnDispatcher utility to dispatch to the 
MediaSource
dispatcher, which will not run the function should MediaSource::isClosed() 
return true.
We need to force the function to run when we attach the HTMLMediaElement which 
in turn
will move the readyState to `open`.

Added test.

* LayoutTests/media/media-source/worker/media-managedmse-worker-expected.txt: 
Added.
* LayoutTests/media/media-source/worker/media-managedmse-worker.html: Added.
* LayoutTests/media/media-source/worker/worker.js: Added.
(logToMain):
(onmessage):
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/Modules/mediasource/MediaSourceHandle.cpp:
(WebCore::MediaSourceHandle::ensureOnDispatcher const):
* Source/WebCore/Modules/mediasource/MediaSourceHandle.h:
* Source/WebCore/Modules/mediasource/MediaSourceInterfaceWorker.cpp:
(WebCore::MediaSourceInterfaceWorker::attachToElement):

Canonical link: https://commits.webkit.org/276140@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to