Title: [187071] branches/safari-601.1-branch/Source/WebCore
Revision
187071
Author
matthew_han...@apple.com
Date
2015-07-20 21:37:32 -0700 (Mon, 20 Jul 2015)

Log Message

Merge r186979. rdar://problem/19192076

Modified Paths

Diff

Modified: branches/safari-601.1-branch/Source/WebCore/ChangeLog (187070 => 187071)


--- branches/safari-601.1-branch/Source/WebCore/ChangeLog	2015-07-21 04:37:29 UTC (rev 187070)
+++ branches/safari-601.1-branch/Source/WebCore/ChangeLog	2015-07-21 04:37:32 UTC (rev 187071)
@@ -1,5 +1,30 @@
 2015-07-20  Matthew Hanson  <matthew_han...@apple.com>
 
+        Merge r186979. rdar://problem/19192076
+
+    2015-07-17  Dean Jackson  <d...@apple.com>
+
+            Picture in Picture interacts poorly with AirPlay/HDMI
+            https://bugs.webkit.org/show_bug.cgi?id=147061
+            <rdar://problem/19192076>
+
+            Reviewed by Tim Horton.
+
+            When we are actively playing to an external target, the
+            picture in picture button should be hidden.
+
+            Also, the availability of picture in picture is also
+            dependent on AirPlay, so that we don't auto-pip when
+            we're displaying on a TV.
+
+            * Modules/mediacontrols/mediaControlsiOS.js:
+            (ControllerIOS.prototype.configureInlineControls): Call the update function.
+            (ControllerIOS.prototype.updatePictureInPictureButton): Add or remove a hidden class.
+            * html/MediaElementSession.cpp:
+            (WebCore::MediaElementSession::allowsPictureInPicture): Check Airplay status.
+
+2015-07-20  Matthew Hanson  <matthew_han...@apple.com>
+
         Merge r186978. rdar://problem/21643094
 
     2015-07-17  Tim Horton  <timothy_hor...@apple.com>

Modified: branches/safari-601.1-branch/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (187070 => 187071)


--- branches/safari-601.1-branch/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js	2015-07-21 04:37:29 UTC (rev 187070)
+++ branches/safari-601.1-branch/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js	2015-07-21 04:37:32 UTC (rev 187071)
@@ -193,8 +193,7 @@
             // Hide the scrubber on audio until the user starts playing.
             this.controls.timelineBox.classList.add(this.ClassNames.hidden);
         } else {
-            if (Controller.gSimulatePictureInPictureAvailable || ('webkitSupportsPresentationMode' in this.video && this.video.webkitSupportsPresentationMode('picture-in-picture')))
-                this.controls.panel.appendChild(this.controls.pictureInPictureButton);
+            this.updatePictureInPictureButton();
             this.controls.panel.appendChild(this.controls.fullscreenButton);
         }
     },
@@ -573,6 +572,16 @@
         Controller.prototype.setShouldListenForPlaybackTargetAvailabilityEvent.call(this, shouldListen);
     },
 
+    updatePictureInPictureButton: function()
+    {
+        var shouldShowPictureInPictureButton = Controller.gSimulatePictureInPictureAvailable || ('webkitSupportsPresentationMode' in this.video && this.video.webkitSupportsPresentationMode('picture-in-picture'));
+        if (shouldShowPictureInPictureButton) {
+            this.controls.panel.appendChild(this.controls.pictureInPictureButton);
+            this.controls.pictureInPictureButton.classList.remove(this.ClassNames.hidden);
+        } else
+            this.controls.pictureInPictureButton.classList.add(this.ClassNames.hidden);
+    },
+
     handlePresentationModeChange: function(event)
     {
         var presentationMode = this.presentationMode();

Modified: branches/safari-601.1-branch/Source/WebCore/html/MediaElementSession.cpp (187070 => 187071)


--- branches/safari-601.1-branch/Source/WebCore/html/MediaElementSession.cpp	2015-07-21 04:37:29 UTC (rev 187070)
+++ branches/safari-601.1-branch/Source/WebCore/html/MediaElementSession.cpp	2015-07-21 04:37:32 UTC (rev 187071)
@@ -382,7 +382,7 @@
 bool MediaElementSession::allowsPictureInPicture(const HTMLMediaElement& element) const
 {
     Settings* settings = element.document().settings();
-    return settings && settings->allowsPictureInPictureMediaPlayback();
+    return settings && settings->allowsPictureInPictureMediaPlayback() && !element.webkitCurrentPlaybackTargetIsWireless();
 }
 
 #if ENABLE(MEDIA_SOURCE)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to