Title: [186183] trunk/Source/WebCore
- Revision
- 186183
- Author
- d...@apple.com
- Date
- 2015-07-01 12:08:22 -0700 (Wed, 01 Jul 2015)
Log Message
Hide the inline controls when going into PiP
https://bugs.webkit.org/show_bug.cgi?id=146487
<rdar://problem/19881159>
Reviewed by Eric Carlson.
When the presentation mode is PiP, toggle a class
on the container element so that we can completely
hide the control toolbar. The placard should still
remain visible.
* Modules/mediacontrols/mediaControlsiOS.css:
(video::-webkit-media-controls-panel-container.picture-in-picture): Add
a rule that hides the toolbar when PiP is active.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.showControls):
(ControllerIOS.prototype.handlePresentationModeChange): Toggle a
class. Also fix a bug I noticed where exiting from PiP was
not auto-hiding the controls until the user tapped.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (186182 => 186183)
--- trunk/Source/WebCore/ChangeLog 2015-07-01 18:44:27 UTC (rev 186182)
+++ trunk/Source/WebCore/ChangeLog 2015-07-01 19:08:22 UTC (rev 186183)
@@ -1,3 +1,25 @@
+2015-06-30 Dean Jackson <d...@apple.com>
+
+ Hide the inline controls when going into PiP
+ https://bugs.webkit.org/show_bug.cgi?id=146487
+ <rdar://problem/19881159>
+
+ Reviewed by Eric Carlson.
+
+ When the presentation mode is PiP, toggle a class
+ on the container element so that we can completely
+ hide the control toolbar. The placard should still
+ remain visible.
+
+ * Modules/mediacontrols/mediaControlsiOS.css:
+ (video::-webkit-media-controls-panel-container.picture-in-picture): Add
+ a rule that hides the toolbar when PiP is active.
+ * Modules/mediacontrols/mediaControlsiOS.js:
+ (ControllerIOS.prototype.showControls):
+ (ControllerIOS.prototype.handlePresentationModeChange): Toggle a
+ class. Also fix a bug I noticed where exiting from PiP was
+ not auto-hiding the controls until the user tapped.
+
2015-07-01 Matthew Daiter <mdai...@apple.com>
Enable MEDIA_STREAM flag
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css (186182 => 186183)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2015-07-01 18:44:27 UTC (rev 186182)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.css 2015-07-01 19:08:22 UTC (rev 186183)
@@ -671,3 +671,9 @@
display: none;
}
+/* When PiP is active, we don't want the controls container showing. */
+video::-webkit-media-controls-panel-container.picture-in-picture {
+ opacity: 0;
+ pointer-events: none;
+}
+
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (186182 => 186183)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-07-01 18:44:27 UTC (rev 186182)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2015-07-01 19:08:22 UTC (rev 186183)
@@ -539,7 +539,7 @@
this.updateShouldListenForPlaybackTargetAvailabilityEvent();
if (!this.video.controls)
return;
-
+
this.updateForShowingControls();
if (this.shouldHaveControls() && !this.controls.panelContainer.parentElement) {
this.base.appendChild(this.controls.inlinePlaybackPlaceholder);
@@ -561,6 +561,7 @@
switch (presentationMode) {
case 'inline':
+ this.controls.panelContainer.classList.remove(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholder.classList.add(this.ClassNames.hidden);
this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholderTextTop.classList.remove(this.ClassNames.pictureInPicture);
@@ -569,6 +570,7 @@
this.controls.pictureInPictureButton.classList.remove(this.ClassNames.returnFromPictureInPicture);
break;
case 'picture-in-picture':
+ this.controls.panelContainer.classList.add(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholder.classList.add(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.hidden);
@@ -580,6 +582,7 @@
this.controls.pictureInPictureButton.classList.add(this.ClassNames.returnFromPictureInPicture);
break;
default:
+ this.controls.panelContainer.classList.remove(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholderTextTop.classList.remove(this.ClassNames.pictureInPicture);
this.controls.inlinePlaybackPlaceholderTextBottom.classList.remove(this.ClassNames.pictureInPicture);
@@ -590,6 +593,7 @@
this.updateControls();
this.updateCaptionContainer();
+ this.resetHideControlsTimer();
if (presentationMode != 'fullscreen' && this.video.paused && this.controlsAreHidden())
this.showControls();
},
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes