[iOS] Cancel AirPlay explicitly when exiting from full screen
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jul 2015 16:54:53 +0000 (16:54 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jul 2015 16:54:53 +0000 (16:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146902
<rdar://problem/20923632>

Reviewed by Brent Fulgham.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit): Call setExternalPlayback(false)
  if playing to an external screen.

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

Source/WebCore/ChangeLog
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm

index 757695d..a54f2f9 100644 (file)
@@ -1,3 +1,16 @@
+2015-07-13  Eric Carlson  <eric.carlson@apple.com>
+
+        [iOS] Cancel AirPlay explicitly when exiting from full screen
+        https://bugs.webkit.org/show_bug.cgi?id=146902
+        <rdar://problem/20923632>
+
+        Reviewed by Brent Fulgham.
+
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
+        (WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit): Call setExternalPlayback(false)
+          if playing to an external screen.
+
 2015-07-12  Chris Fleizach  <cfleizach@apple.com>
 
         AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
index 9e7df6f..6fefdc0 100644 (file)
@@ -75,7 +75,7 @@ public:
     {
         return adoptRef(*new WebVideoFullscreenInterfaceAVKit());
     }
-    virtual ~WebVideoFullscreenInterfaceAVKit() { }
+    virtual ~WebVideoFullscreenInterfaceAVKit();
     WEBCORE_EXPORT void setWebVideoFullscreenModel(WebVideoFullscreenModel*);
     WEBCORE_EXPORT void setWebVideoFullscreenChangeObserver(WebVideoFullscreenChangeObserver*);
     
index 74b1c19..3dbea57 100644 (file)
@@ -751,6 +751,13 @@ WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit()
     [m_playerController setFullscreenInterface:this];
 }
 
+WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit()
+{
+    WebAVPlayerController* playerController = m_playerController.get();
+    if (playerController && playerController.externalPlaybackActive)
+        setExternalPlayback(false, TargetTypeNone, "");
+}
+
 void WebVideoFullscreenInterfaceAVKit::resetMediaState()
 {
     if (!m_playerController) {