Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Decrease flicker when changing video presentation mode.
https://bugs.webkit.org/show_bug.cgi?id=158148
rdar://problem/24476949

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-05-27
Source/WebCore:

Reviewed by Jer Noble.

No new tests because there is no behavior change. This change is about the timing of
moving AVPlayerLayers between layers to prevent flicker.

1) Moving an AVPlayerLayer between CAContexts can flicker. So always keep two
AVPlayerLayers around and add and remove them from the inline and fullscreen contexts.
2) Wait to show the inline placeholder until the fullscreen video layer has been installed.
3) Wait to remove the fullscreen video layer until the placeholder has been removed.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::isVideoLayerInline): Expose isVideoLayerInline to the shadow DOM.
(WebCore::MediaControlsHost::setPreparedForInline): Expose setPreparedForInline to the shadow DOM.
* Modules/mediacontrols/MediaControlsHost.h: Add setPreparedForInline and isVideoLayerInline
* Modules/mediacontrols/MediaControlsHost.idl: Add setPreparedForInline and isVideoLayerInline
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.showInlinePlaybackPlaceholderWhenSafe): Wait to show placeholder when entering fullscreen.
(Controller.prototype.handlePresentationModeChange): Wait to show placeholder, and notify when placeholder is removed.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setPreparedForInline):
(WebCore::HTMLMediaElement::waitForPreparedForInlineThen): Used to delay fullscreen cleanup until placeholder is removed.
(WebCore::HTMLMediaElement::setVideoFullscreenLayer): Add a callback so we can wait until this completes before continuing.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::isVideoLayerInline):
(WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer): Add completionHandler.
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
(WebCore::WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): Add completionHandler.
(WebCore::WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen): Added.
* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): Add completionHandler.
(WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayer::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Create two video layers.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Allow two video layers.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Add completionHandler.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): Allow two video layers.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Allow two video layers.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Allow two video layers.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h:
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoLayers): Allow two video layers.
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): Add completionHandler.
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame): Allow two video layers.
(WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer): Allow two video layers.
(WebCore::VideoFullscreenLayerManager::setVideoLayer): Deleted.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::didSetupFullscreen): Use completionHandler.
(WebVideoFullscreenControllerContext::didExitFullscreen): Use completionHandler.

Source/WebKit2:

Reviewed by Tim Horton.

Prevent flicker by using setVideoFullscreenLayer with a completion handler to delay
enter fullscreen and cleanup fullscreen until the video layer has completely been
installed or removed.

* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
(WebKit::WebVideoFullscreenManager::didExitFullscreen):

Canonical link: https://commits.webkit.org/176274@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Jeremy Jones authored and webkit-commit-queue committed May 27, 2016
1 parent 233c46a commit e7154dc
Show file tree
Hide file tree
Showing 23 changed files with 315 additions and 80 deletions.
69 changes: 69 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,72 @@
2016-05-27 Jeremy Jones <jeremyj@apple.com>

Decrease flicker when changing video presentation mode.
https://bugs.webkit.org/show_bug.cgi?id=158148
rdar://problem/24476949

Reviewed by Jer Noble.

No new tests because there is no behavior change. This change is about the timing of
moving AVPlayerLayers between layers to prevent flicker.

1) Moving an AVPlayerLayer between CAContexts can flicker. So always keep two
AVPlayerLayers around and add and remove them from the inline and fullscreen contexts.
2) Wait to show the inline placeholder until the fullscreen video layer has been installed.
3) Wait to remove the fullscreen video layer until the placeholder has been removed.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::isVideoLayerInline): Expose isVideoLayerInline to the shadow DOM.
(WebCore::MediaControlsHost::setPreparedForInline): Expose setPreparedForInline to the shadow DOM.
* Modules/mediacontrols/MediaControlsHost.h: Add setPreparedForInline and isVideoLayerInline
* Modules/mediacontrols/MediaControlsHost.idl: Add setPreparedForInline and isVideoLayerInline
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.showInlinePlaybackPlaceholderWhenSafe): Wait to show placeholder when entering fullscreen.
(Controller.prototype.handlePresentationModeChange): Wait to show placeholder, and notify when placeholder is removed.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setPreparedForInline):
(WebCore::HTMLMediaElement::waitForPreparedForInlineThen): Used to delay fullscreen cleanup until placeholder is removed.
(WebCore::HTMLMediaElement::setVideoFullscreenLayer): Add a callback so we can wait until this completes before continuing.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::isVideoLayerInline):
(WebCore::HTMLMediaElement::waitForPreparedForInlineThen):
(WebCore::HTMLMediaElement::setVideoFullscreenLayer): Add completionHandler.
* platform/cocoa/WebVideoFullscreenModelVideoElement.h:
(WebCore::WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): Add completionHandler.
(WebCore::WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen): Added.
* platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): Add completionHandler.
(WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayer::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Create two video layers.
(WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Allow two video layers.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Add completionHandler.
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): Allow two video layers.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer): Allow two video layers.
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createPreviewLayers): Allow two video layers.
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVideoFullscreenLayer): Add completionHandler.
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h:
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoLayers): Allow two video layers.
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer): Add completionHandler.
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame): Allow two video layers.
(WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer): Allow two video layers.
(WebCore::VideoFullscreenLayerManager::setVideoLayer): Deleted.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::didSetupFullscreen): Use completionHandler.
(WebVideoFullscreenControllerContext::didExitFullscreen): Use completionHandler.

2016-05-26 Ryosuke Niwa <rniwa@webkit.org>

Crash in TreeScope::focusedElement
Expand Down
10 changes: 10 additions & 0 deletions Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
Expand Up @@ -210,6 +210,16 @@ bool MediaControlsHost::supportsFullscreen()
return m_mediaElement->supportsFullscreen(HTMLMediaElementEnums::VideoFullscreenModeStandard);
}

bool MediaControlsHost::isVideoLayerInline()
{
return m_mediaElement->isVideoLayerInline();
}

void MediaControlsHost::setPreparedForInline(bool value)
{
m_mediaElement->setPreparedForInline(value);
}

bool MediaControlsHost::userGestureRequired() const
{
return !m_mediaElement->mediaSession().playbackPermitted(*m_mediaElement);
Expand Down
2 changes: 2 additions & 0 deletions Source/WebCore/Modules/mediacontrols/MediaControlsHost.h
Expand Up @@ -64,7 +64,9 @@ class MediaControlsHost : public RefCounted<MediaControlsHost> {
void updateTextTrackContainer();
bool allowsInlineMediaPlayback() const;
bool supportsFullscreen();
bool isVideoLayerInline();
bool userGestureRequired() const;
void setPreparedForInline(bool);

void updateCaptionDisplaySizes();
void enteredFullscreen();
Expand Down
2 changes: 2 additions & 0 deletions Source/WebCore/Modules/mediacontrols/MediaControlsHost.idl
Expand Up @@ -42,9 +42,11 @@ enum DeviceType {
readonly attribute TextTrack captionMenuAutomaticItem;
readonly attribute DOMString captionDisplayMode;
void setSelectedTextTrack(TextTrack? track);
void setPreparedForInline(boolean prepared);
readonly attribute HTMLElement textTrackContainer;
readonly attribute boolean allowsInlineMediaPlayback;
readonly attribute boolean supportsFullscreen;
readonly attribute boolean isVideoLayerInline;
readonly attribute boolean userGestureRequired;

readonly attribute DOMString externalDeviceDisplayName;
Expand Down
14 changes: 13 additions & 1 deletion Source/WebCore/Modules/mediacontrols/mediaControlsApple.js
Expand Up @@ -82,6 +82,7 @@ Controller.prototype = {
webkitbeginfullscreen: 'handleFullscreenChange',
webkitendfullscreen: 'handleFullscreenChange',
},
PlaceholderPollingDelay: 33,
HideControlsDelay: 4 * 1000,
RewindAmount: 30,
MaximumSeekRate: 8,
Expand Down Expand Up @@ -837,6 +838,16 @@ Controller.prototype = {
this.controls.pictureInPictureButton.classList.add(this.ClassNames.hidden);
},

showInlinePlaybackPlaceholderWhenSafe: function() {
if (this.presentationMode() != 'picture-in-picture')
return;

if (!this.host.isVideoLayerInline)
this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.hidden);
else
setTimeout(this.showInlinePlaybackPlaceholderWhenSafe.bind(this), this.PlaceholderPollingDelay);
},

handlePresentationModeChange: function(event)
{
var presentationMode = this.presentationMode();
Expand All @@ -854,7 +865,7 @@ Controller.prototype = {
case 'picture-in-picture':
this.controls.panel.classList.add(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholder.classList.add(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.hidden);
this.showInlinePlaybackPlaceholderWhenSafe();

this.controls.inlinePlaybackPlaceholderTextTop.innerText = this.UIString('This video is playing in Picture in Picture');
this.controls.inlinePlaybackPlaceholderTextTop.classList.add(this.ClassNames.pictureInPicture);
Expand Down Expand Up @@ -883,6 +894,7 @@ Controller.prototype = {
this.resetHideControlsTimer();
if (presentationMode != 'fullscreen' && this.video.paused && this.controlsAreHidden())
this.showControls();
this.host.setPreparedForInline(presentationMode === 'inline')
},

handleFullscreenChange: function(event)
Expand Down
40 changes: 37 additions & 3 deletions Source/WebCore/html/HTMLMediaElement.cpp
Expand Up @@ -5471,15 +5471,42 @@ PlatformLayer* HTMLMediaElement::platformLayer() const
return m_player ? m_player->platformLayer() : nullptr;
}

void HTMLMediaElement::setPreparedForInline(bool value)
{
m_preparedForInline = value;
if (m_preparedForInline && m_preparedForInlineCompletionHandler) {
m_preparedForInlineCompletionHandler();
m_preparedForInlineCompletionHandler = nullptr;
}
}

void HTMLMediaElement::waitForPreparedForInlineThen(std::function<void()> completionHandler)
{
ASSERT(!m_preparedForInlineCompletionHandler);
if (m_preparedForInline) {
completionHandler();
return;
}

m_preparedForInlineCompletionHandler = completionHandler;
}

#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))

void HTMLMediaElement::setVideoFullscreenLayer(PlatformLayer* platformLayer)
bool HTMLMediaElement::isVideoLayerInline()
{
return !m_videoFullscreenLayer;
};

void HTMLMediaElement::setVideoFullscreenLayer(PlatformLayer* platformLayer, std::function<void()> completionHandler)
{
m_videoFullscreenLayer = platformLayer;
if (!m_player)
if (!m_player) {
completionHandler();
return;
}

m_player->setVideoFullscreenLayer(platformLayer);
m_player->setVideoFullscreenLayer(platformLayer, completionHandler);
setNeedsStyleRecalc(SyntheticStyleChange);
#if ENABLE(VIDEO_TRACK)
updateTextTrackDisplay();
Expand All @@ -5499,6 +5526,13 @@ void HTMLMediaElement::setVideoFullscreenGravity(MediaPlayer::VideoGravity gravi
if (m_player)
m_player->setVideoFullscreenGravity(gravity);
}

#else

bool HTMLMediaElement::isVideoLayerInline()
{
return true;
};

#endif

Expand Down
7 changes: 6 additions & 1 deletion Source/WebCore/html/HTMLMediaElement.h
Expand Up @@ -133,8 +133,11 @@ class HTMLMediaElement

WEBCORE_EXPORT PlatformMedia platformMedia() const;
PlatformLayer* platformLayer() const;
bool isVideoLayerInline();
void setPreparedForInline(bool);
void waitForPreparedForInlineThen(std::function<void()> completionHandler = [] { });
#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
void setVideoFullscreenLayer(PlatformLayer*);
void setVideoFullscreenLayer(PlatformLayer*, std::function<void()> completionHandler = [] { });
PlatformLayer* videoFullscreenLayer() const { return m_videoFullscreenLayer.get(); }
void setVideoFullscreenFrame(FloatRect);
void setVideoFullscreenGravity(MediaPlayerEnums::VideoGravity);
Expand Down Expand Up @@ -847,6 +850,8 @@ class HTMLMediaElement
RefPtr<Node> m_nextChildNodeToConsider;

VideoFullscreenMode m_videoFullscreenMode;
bool m_preparedForInline;
std::function<void()> m_preparedForInlineCompletionHandler;
#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
RetainPtr<PlatformLayer> m_videoFullscreenLayer;
FloatRect m_videoFullscreenFrame;
Expand Down
Expand Up @@ -34,6 +34,7 @@
#include "HTMLMediaElementEnums.h"
#include "PlatformLayer.h"
#include "WebVideoFullscreenModel.h"
#include <functional>
#include <wtf/RefPtr.h>
#include <wtf/RetainPtr.h>
#include <wtf/Vector.h>
Expand All @@ -55,7 +56,8 @@ class WebVideoFullscreenModelVideoElement : public WebVideoFullscreenModel, publ
WEBCORE_EXPORT void setWebVideoFullscreenInterface(WebVideoFullscreenInterface*);
WEBCORE_EXPORT void setVideoElement(HTMLVideoElement*);
WEBCORE_EXPORT HTMLVideoElement* videoElement() const { return m_videoElement.get(); }
WEBCORE_EXPORT void setVideoFullscreenLayer(PlatformLayer*);
WEBCORE_EXPORT void setVideoFullscreenLayer(PlatformLayer*, std::function<void()> completionHandler = [] { });
WEBCORE_EXPORT void waitForPreparedForInlineThen(std::function<void()> completionHandler = [] { });
WebPlaybackSessionModelMediaElement& playbackSessionModel() { return m_playbackSessionModel; }

WEBCORE_EXPORT void handleEvent(WebCore::ScriptExecutionContext*, WebCore::Event*) override;
Expand Down
Expand Up @@ -120,10 +120,12 @@
m_videoFullscreenInterface->setVideoDimensions(true, m_videoElement->videoWidth(), m_videoElement->videoHeight());
}

void WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer(PlatformLayer* videoLayer)
void WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer(PlatformLayer* videoLayer, std::function<void()> completionHandler)
{
if (m_videoFullscreenLayer == videoLayer)
if (m_videoFullscreenLayer == videoLayer) {
completionHandler();
return;
}

m_videoFullscreenLayer = videoLayer;
#if PLATFORM(MAC)
Expand All @@ -133,8 +135,22 @@
#endif
[m_videoFullscreenLayer setBounds:m_videoFrame];

if (m_videoElement)
m_videoElement->setVideoFullscreenLayer(m_videoFullscreenLayer.get());
if (!m_videoElement) {
completionHandler();
return;
}

m_videoElement->setVideoFullscreenLayer(m_videoFullscreenLayer.get(), completionHandler);
}

void WebVideoFullscreenModelVideoElement::waitForPreparedForInlineThen(std::function<void()> completionHandler)
{
if (!m_videoElement) {
completionHandler();
return;
}

m_videoElement->waitForPreparedForInlineThen(completionHandler);
}

void WebVideoFullscreenModelVideoElement::requestFullscreenMode(HTMLMediaElementEnums::VideoFullscreenMode mode)
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/platform/graphics/MediaPlayer.cpp
Expand Up @@ -660,9 +660,9 @@ PlatformLayer* MediaPlayer::platformLayer() const
}

#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
void MediaPlayer::setVideoFullscreenLayer(PlatformLayer* layer)
void MediaPlayer::setVideoFullscreenLayer(PlatformLayer* layer, std::function<void()> completionHandler)
{
m_private->setVideoFullscreenLayer(layer);
m_private->setVideoFullscreenLayer(layer, completionHandler);
}

void MediaPlayer::setVideoFullscreenFrame(FloatRect frame)
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/platform/graphics/MediaPlayer.h
Expand Up @@ -308,7 +308,7 @@ class MediaPlayer : public MediaPlayerEnums {
PlatformLayer* platformLayer() const;

#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
void setVideoFullscreenLayer(PlatformLayer*);
void setVideoFullscreenLayer(PlatformLayer*, std::function<void()> completionHandler = [] { });
void setVideoFullscreenFrame(FloatRect);
using MediaPlayerEnums::VideoGravity;
void setVideoFullscreenGravity(VideoGravity);
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/platform/graphics/MediaPlayerPrivate.h
Expand Up @@ -59,7 +59,7 @@ class MediaPlayerPrivateInterface {
virtual PlatformLayer* platformLayer() const { return 0; }

#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
virtual void setVideoFullscreenLayer(PlatformLayer*) { }
virtual void setVideoFullscreenLayer(PlatformLayer*, std::function<void()> completionHandler) { completionHandler(); }
virtual void setVideoFullscreenFrame(FloatRect) { }
virtual void setVideoFullscreenGravity(MediaPlayer::VideoGravity) { }
virtual void setVideoFullscreenMode(MediaPlayer::VideoFullscreenMode) { }
Expand Down
Expand Up @@ -172,7 +172,7 @@ class MediaPlayerPrivateAVFoundationObjC : public MediaPlayerPrivateAVFoundation
void paintCurrentFrameInContext(GraphicsContext&, const FloatRect&) override;
PlatformLayer* platformLayer() const override;
#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
void setVideoFullscreenLayer(PlatformLayer*) override;
void setVideoFullscreenLayer(PlatformLayer*, std::function<void()> completionHandler) override;
void setVideoFullscreenFrame(FloatRect) override;
void setVideoFullscreenGravity(MediaPlayer::VideoGravity) override;
void setVideoFullscreenMode(MediaPlayer::VideoFullscreenMode) override;
Expand Down Expand Up @@ -329,6 +329,7 @@ class MediaPlayerPrivateAVFoundationObjC : public MediaPlayerPrivateAVFoundation
RetainPtr<AVPlayer> m_avPlayer;
RetainPtr<AVPlayerItem> m_avPlayerItem;
RetainPtr<AVPlayerLayer> m_videoLayer;
RetainPtr<AVPlayerLayer> m_secondaryVideoLayer;
#if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
std::unique_ptr<VideoFullscreenLayerManager> m_videoFullscreenLayerManager;
MediaPlayer::VideoGravity m_videoFullscreenGravity;
Expand Down

0 comments on commit e7154dc

Please sign in to comment.