Title: [284837] branches/safari-612-branch/Source/WebKit
Revision
284837
Author
[email protected]
Date
2021-10-25 14:51:20 -0700 (Mon, 25 Oct 2021)

Log Message

Cherry-pick r284294. rdar://problem/84630302

    [iOS] Screen Sharing doesn't switch to AirPlay when <video> enters fullscreen mode
    https://bugs.webkit.org/show_bug.cgi?id=231807
    <rdar://82995799>

    Reviewed by Eric Carlson.

    WebKit will allow AVPlayer to switch to AirPlay Video mode from Screen Sharing when a
    <video> element is in fullscreen mode. However, the fullscreen state this code depends on
    is not stored in the GPU process.

    Implement RemoteMediaPlayerProxy::mediaPlayerFullscreenMode()
    and ::mediaPlayerIsVideoFullscreenStandby().

    * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
    (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
    (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
    (WebKit::RemoteMediaPlayerProxy::mediaPlayerFullscreenMode const):
    (WebKit::RemoteMediaPlayerProxy::mediaPlayerIsVideoFullscreenStandby const):
    * GPUProcess/media/RemoteMediaPlayerProxy.h:
    * GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
    * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
    (WebKit::MediaPlayerPrivateRemote::videoFullscreenStandbyChanged):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284294 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WebKit/ChangeLog (284836 => 284837)


--- branches/safari-612-branch/Source/WebKit/ChangeLog	2021-10-25 21:51:17 UTC (rev 284836)
+++ branches/safari-612-branch/Source/WebKit/ChangeLog	2021-10-25 21:51:20 UTC (rev 284837)
@@ -1,5 +1,60 @@
 2021-10-25  Null  <[email protected]>
 
+        Cherry-pick r284294. rdar://problem/84630302
+
+    [iOS] Screen Sharing doesn't switch to AirPlay when <video> enters fullscreen mode
+    https://bugs.webkit.org/show_bug.cgi?id=231807
+    <rdar://82995799>
+    
+    Reviewed by Eric Carlson.
+    
+    WebKit will allow AVPlayer to switch to AirPlay Video mode from Screen Sharing when a
+    <video> element is in fullscreen mode. However, the fullscreen state this code depends on
+    is not stored in the GPU process.
+    
+    Implement RemoteMediaPlayerProxy::mediaPlayerFullscreenMode()
+    and ::mediaPlayerIsVideoFullscreenStandby().
+    
+    * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+    (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
+    (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
+    (WebKit::RemoteMediaPlayerProxy::mediaPlayerFullscreenMode const):
+    (WebKit::RemoteMediaPlayerProxy::mediaPlayerIsVideoFullscreenStandby const):
+    * GPUProcess/media/RemoteMediaPlayerProxy.h:
+    * GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
+    * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+    (WebKit::MediaPlayerPrivateRemote::videoFullscreenStandbyChanged):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-10-15  Jer Noble  <[email protected]>
+
+            [iOS] Screen Sharing doesn't switch to AirPlay when <video> enters fullscreen mode
+            https://bugs.webkit.org/show_bug.cgi?id=231807
+            <rdar://82995799>
+
+            Reviewed by Eric Carlson.
+
+            WebKit will allow AVPlayer to switch to AirPlay Video mode from Screen Sharing when a
+            <video> element is in fullscreen mode. However, the fullscreen state this code depends on
+            is not stored in the GPU process.
+
+            Implement RemoteMediaPlayerProxy::mediaPlayerFullscreenMode()
+            and ::mediaPlayerIsVideoFullscreenStandby().
+
+            * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+            (WebKit::RemoteMediaPlayerProxy::setVideoFullscreenMode):
+            (WebKit::RemoteMediaPlayerProxy::videoFullscreenStandbyChanged):
+            (WebKit::RemoteMediaPlayerProxy::mediaPlayerFullscreenMode const):
+            (WebKit::RemoteMediaPlayerProxy::mediaPlayerIsVideoFullscreenStandby const):
+            * GPUProcess/media/RemoteMediaPlayerProxy.h:
+            * GPUProcess/media/RemoteMediaPlayerProxy.messages.in:
+            * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+            (WebKit::MediaPlayerPrivateRemote::videoFullscreenStandbyChanged):
+
+2021-10-25  Null  <[email protected]>
+
         Cherry-pick r284102. rdar://problem/84630200
 
     WebGL video texture upload is very slow due to excessive transfer of the video pixel buffer

Modified: branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (284836 => 284837)


--- branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2021-10-25 21:51:17 UTC (rev 284836)
+++ branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2021-10-25 21:51:20 UTC (rev 284837)
@@ -319,12 +319,13 @@
 
 void RemoteMediaPlayerProxy::setVideoFullscreenMode(MediaPlayer::VideoFullscreenMode mode)
 {
+    m_fullscreenMode = mode;
     m_player->setVideoFullscreenMode(mode);
-
 }
 
-void RemoteMediaPlayerProxy::videoFullscreenStandbyChanged()
+void RemoteMediaPlayerProxy::videoFullscreenStandbyChanged(bool standby)
 {
+    m_videoFullscreenStandby = standby;
     m_player->videoFullscreenStandbyChanged();
 }
 #endif
@@ -817,14 +818,12 @@
 #if ENABLE(VIDEO_PRESENTATION_MODE)
 MediaPlayerEnums::VideoFullscreenMode RemoteMediaPlayerProxy::mediaPlayerFullscreenMode() const
 {
-    notImplemented();
-    return MediaPlayerEnums::VideoFullscreenModeNone;
+    return m_fullscreenMode;
 }
 
 bool RemoteMediaPlayerProxy::mediaPlayerIsVideoFullscreenStandby() const
 {
-    notImplemented();
-    return false;
+    return m_videoFullscreenStandby;
 }
 #endif
 

Modified: branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h (284836 => 284837)


--- branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h	2021-10-25 21:51:17 UTC (rev 284836)
+++ branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h	2021-10-25 21:51:20 UTC (rev 284837)
@@ -103,7 +103,7 @@
 #if ENABLE(VIDEO_PRESENTATION_MODE)
     void updateVideoFullscreenInlineImage();
     void setVideoFullscreenMode(WebCore::MediaPlayer::VideoFullscreenMode);
-    void videoFullscreenStandbyChanged();
+    void videoFullscreenStandbyChanged(bool);
 #endif
 
     void setBufferingPolicy(WebCore::MediaPlayer::BufferingPolicy);
@@ -354,6 +354,8 @@
 
     bool m_bufferedChanged { true };
     bool m_renderingCanBeAccelerated { false };
+    WebCore::MediaPlayer::VideoFullscreenMode m_fullscreenMode { WebCore::MediaPlayer::VideoFullscreenModeNone };
+    bool m_videoFullscreenStandby { false };
 
 #if ENABLE(LEGACY_ENCRYPTED_MEDIA) && ENABLE(ENCRYPTED_MEDIA)
     bool m_shouldContinueAfterKeyNeeded { false };

Modified: branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in (284836 => 284837)


--- branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in	2021-10-25 21:51:17 UTC (rev 284836)
+++ branches/safari-612-branch/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in	2021-10-25 21:51:20 UTC (rev 284837)
@@ -60,7 +60,7 @@
     UpdateVideoFullscreenInlineImage()
     SetVideoFullscreenMode(WebCore::MediaPlayer::VideoFullscreenMode mode)
     SetVideoFullscreenGravity(enum:uint8_t WebCore::MediaPlayerEnums::VideoGravity gravity)
-    VideoFullscreenStandbyChanged()
+    VideoFullscreenStandbyChanged(bool standby)
 #endif
 
     SetBufferingPolicy(WebCore::MediaPlayer::BufferingPolicy policy)

Modified: branches/safari-612-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (284836 => 284837)


--- branches/safari-612-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2021-10-25 21:51:17 UTC (rev 284836)
+++ branches/safari-612-branch/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2021-10-25 21:51:20 UTC (rev 284837)
@@ -850,7 +850,11 @@
 
 void MediaPlayerPrivateRemote::videoFullscreenStandbyChanged()
 {
-    connection().send(Messages::RemoteMediaPlayerProxy::VideoFullscreenStandbyChanged(), m_id);
+    RefPtr player = m_player.get();
+    if (!player)
+        return;
+
+    connection().send(Messages::RemoteMediaPlayerProxy::VideoFullscreenStandbyChanged(player->isVideoFullscreenStandby()), m_id);
 }
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to