[webkit-changes] [WebKit/WebKit] b2a703: Youtube 360° video goes black

Jer Noble noreply at github.com
Wed Jul 19 09:26:13 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b2a7036dc8ddf82a440919da370702bd4c402854
      https://github.com/WebKit/WebKit/commit/b2a7036dc8ddf82a440919da370702bd4c402854
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-07-19 (Wed, 19 Jul 2023)

  Changed paths:
    A LayoutTests/media/media-source/media-source-paint-after-display-none-expected.txt
    A LayoutTests/media/media-source/media-source-paint-after-display-none.html
    M LayoutTests/media/video-test.js
    M LayoutTests/platform/mac/TestExpectations
    M Source/WebCore/html/HTMLMediaElement.cpp
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

  Log Message:
  -----------
  Youtube 360° video goes black
https://bugs.webkit.org/show_bug.cgi?id=259298
rdar://112239644

Reviewed by Eric Carlson.

YouTube, when pre-rolling an advertisement before a 360 video, will start with
an element that's displayed normally, but will hide the video with display:none
when switching to canvas-based rendering for 360 videos. But at this point, the
MediaPlayerPrivate's layer has already been created and sized, and nothing will
force it to switch back to a decompression session (which is the only way for
frames to be extracted during playback).

When a video element's renderer is detached, queue a task to notify the media
player that the accelerated rendering state has changed. Similarly, do so when
changing the fullscreen mode. In MediaPlayerPrivateMediaSourceAVFObjC, use this
signal to tear down the AVSBDL when it is no longer needed.

* LayoutTests/media/media-source/media-source-paint-after-display-none-expected.txt: Added.
* LayoutTests/media/media-source/media-source-paint-after-display-none.html: Added.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::didDetachRenderers):
(WebCore::HTMLMediaElement::setFullscreenMode):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::shouldEnsureLayer const):

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




More information about the webkit-changes mailing list