- Revision
- 195693
- Author
- [email protected]
- Date
- 2016-01-27 14:31:17 -0800 (Wed, 27 Jan 2016)
Log Message
Move some logic related to the presentation mode button from mediaControlsiOS.js to mediaControlsApple.js
https://bugs.webkit.org/show_bug.cgi?id=153476
Reviewed by Eric Carlson.
Also, add the necessary styles to support that control in mediaControlsApple.css.
* Modules/mediacontrols/mediaControlsApple.css:
(video::-webkit-media-controls-panel.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
(audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
(video::-webkit-media-controls-panel .picture-in-picture-button):
Use the same mask image as iOS, but with a different size and a background color specified
(since there's another rule that makes buttons within the panel have a transparent
background color).
(video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.addVideoListeners):
(Controller.prototype.removeVideoListeners):
Listen for (and stop listening for) the webkitpresentationmodechanged event if presentation
mode is supported for this video element.
(Controller.prototype.createControls):
Add a class name to the pictureInPictureButton so we can query for it in the stylesheet.
(Controller.prototype.configureInlineControls):
Call updatePictureInPictureButton().
(Controller.prototype.presentationMode):
Moved from mediaControlsiOS.js.
(Controller.prototype.isFullScreen):
Ditto, with a bug fix to not call presentationMode(), since that method calls isFullScreen(),
resulting in infinite recursion.
(Controller.prototype.updatePictureInPictureButton):
Ditto.
(Controller.prototype.handlePresentationModeChange):
Ditto.
(Controller.prototype.handleFullscreenChange):
Call handlePresentationModeChanged() if presentation mode is supported for this video element.
(Controller.prototype.controlsAlwaysVisible):
Ditto.
(Controller.prototype.handlePictureInPictureButtonClicked):
Ditto.
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.handlePresentationModeChange):
Most logic has been moved to the same method in mediaControlsApple.js, except
updating the style of the panelContainer, which doesn't exist in the Mac controls.
(ControllerIOS.prototype.addVideoListeners): Deleted.
(ControllerIOS.prototype.removeVideoListeners): Deleted.
(ControllerIOS.prototype.presentationMode): Deleted.
(ControllerIOS.prototype.isFullScreen): Deleted.
(ControllerIOS.prototype.handlePictureInPictureButtonClicked): Deleted.
(ControllerIOS.prototype.updatePictureInPictureButton): Deleted.
(ControllerIOS.prototype.handleFullscreenChange): Deleted.
(ControllerIOS.prototype.controlsAlwaysVisible): Deleted.
Delete all code that's already handled in the Controller.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (195692 => 195693)
--- trunk/Source/WebCore/ChangeLog 2016-01-27 22:23:36 UTC (rev 195692)
+++ trunk/Source/WebCore/ChangeLog 2016-01-27 22:31:17 UTC (rev 195693)
@@ -1,3 +1,61 @@
+2016-01-27 Ada Chan <[email protected]>
+
+ Move some logic related to the presentation mode button from mediaControlsiOS.js to mediaControlsApple.js
+ https://bugs.webkit.org/show_bug.cgi?id=153476
+
+ Reviewed by Eric Carlson.
+
+ Also, add the necessary styles to support that control in mediaControlsApple.css.
+
+ * Modules/mediacontrols/mediaControlsApple.css:
+ (video::-webkit-media-controls-panel.picture-in-picture):
+ (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
+ (audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
+ (audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
+ (video::-webkit-media-controls-panel .picture-in-picture-button):
+ Use the same mask image as iOS, but with a different size and a background color specified
+ (since there's another rule that makes buttons within the panel have a transparent
+ background color).
+ (video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
+
+ * Modules/mediacontrols/mediaControlsApple.js:
+ (Controller.prototype.addVideoListeners):
+ (Controller.prototype.removeVideoListeners):
+ Listen for (and stop listening for) the webkitpresentationmodechanged event if presentation
+ mode is supported for this video element.
+ (Controller.prototype.createControls):
+ Add a class name to the pictureInPictureButton so we can query for it in the stylesheet.
+ (Controller.prototype.configureInlineControls):
+ Call updatePictureInPictureButton().
+ (Controller.prototype.presentationMode):
+ Moved from mediaControlsiOS.js.
+ (Controller.prototype.isFullScreen):
+ Ditto, with a bug fix to not call presentationMode(), since that method calls isFullScreen(),
+ resulting in infinite recursion.
+ (Controller.prototype.updatePictureInPictureButton):
+ Ditto.
+ (Controller.prototype.handlePresentationModeChange):
+ Ditto.
+ (Controller.prototype.handleFullscreenChange):
+ Call handlePresentationModeChanged() if presentation mode is supported for this video element.
+ (Controller.prototype.controlsAlwaysVisible):
+ Ditto.
+ (Controller.prototype.handlePictureInPictureButtonClicked):
+ Ditto.
+ * Modules/mediacontrols/mediaControlsiOS.js:
+ (ControllerIOS.prototype.handlePresentationModeChange):
+ Most logic has been moved to the same method in mediaControlsApple.js, except
+ updating the style of the panelContainer, which doesn't exist in the Mac controls.
+ (ControllerIOS.prototype.addVideoListeners): Deleted.
+ (ControllerIOS.prototype.removeVideoListeners): Deleted.
+ (ControllerIOS.prototype.presentationMode): Deleted.
+ (ControllerIOS.prototype.isFullScreen): Deleted.
+ (ControllerIOS.prototype.handlePictureInPictureButtonClicked): Deleted.
+ (ControllerIOS.prototype.updatePictureInPictureButton): Deleted.
+ (ControllerIOS.prototype.handleFullscreenChange): Deleted.
+ (ControllerIOS.prototype.controlsAlwaysVisible): Deleted.
+ Delete all code that's already handled in the Controller.
+
2016-01-26 Ada Chan <[email protected]>
Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaSourceAVFObjC
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (195692 => 195693)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2016-01-27 22:23:36 UTC (rev 195692)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css 2016-01-27 22:31:17 UTC (rev 195693)
@@ -106,6 +106,10 @@
opacity: 1;
}
+video::-webkit-media-controls-panel.picture-in-picture {
+ pointer-events: none;
+}
+
audio::-webkit-media-show-controls {
display: none !important;
}
@@ -1069,7 +1073,48 @@
display: none;
}
+video::-webkit-media-controls-wireless-playback-status.picture-in-picture,
+audio::-webkit-media-controls-wireless-playback-status.picture-in-picture
+{
+ background-size: 304px auto;
+ background-position: 50% calc(.5 * (100% - 25px));
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 304 150"><g fill="none" stroke="-apple-system-gray" stroke-width="3"><path d="m 172,106 -81,0 c -3.5,0 -6,-2.5 -6,-6 l 0,-89 c 0,-3.5 2.5,-6 6,-6 l 122,0 c 3.5,0 6,2.5 6,6 l 0,57" /><path d="m 233,119 -53,0 c -3,0 -3,-0 -3,-3 l 0,-40 c 0,-3 0,-3 3,-3 l 53,0 c 3,0 3,0 3,3 l 0,40 c 0,3 0,3 -3,3 z" /></g></svg>');
+}
+
+video::-webkit-media-controls-wireless-playback-text-top.picture-in-picture,
+audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture {
+ top: initial;
+ bottom: 0;
+}
+
+video::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture,
+audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture {
+ display: none;
+}
+
video::-webkit-media-controls-wireless-playback-status.hidden,
audio::-webkit-media-controls-wireless-playback-status.hidden {
display: none;
}
+
+video::-webkit-media-controls-panel .picture-in-picture-button {
+ margin-right: 7px;
+ margin-left: 8px;
+ margin-top: 1px;
+ width: 18px;
+ min-width: 18px;
+ height: 14px;
+
+ background-color: rgba(255,255,255,0.45);
+ -webkit-mask-size: 18px 14px;
+ -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAkCAYAAAD2IghRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANhJREFUeNrslzEOwjAMRR2UA3AQ7sLKwsTEglg6sTIgLgs7qCZBRbIsWpDayHH1v/SHJmn0ZFutHYiIqX4F+cDMtCCncgseh1JiLJ5lxH+Br2qGZ2Gpa/IjeVMZ1/ur0ndgLdaeydsvF9/7LrYEz7oo+J0X8Kyz2GuT917As04K/uAFPKtR5xov4FnHLuIy+i7AqavxVr1jAh7H/HbRZE3QZGndBvaW1k1Z6VqdHtjzIBELZrHoKIfRzbpUxqY4IOJzLpWAiAMc4AAHOMAB/m9T9Bn1veklwACtBYmnlYBaIQAAAABJRU5ErkJggg==');
+}
+
+video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture {
+ -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAkCAYAAAD2IghRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOZJREFUeNpiZGBg+M8w+AEjMuf///8MTAxDFAxZh7Pgi5IBBv+HZYgPS4f/JwJ/GA1xCjMnIfAejf9poHPvfyy5GFvS6KdjyYPLXeAKiFiH/0ZiT6GT46ni8CAg/onEn0WH/EEVh4OAL5rjFwIx81BwOAh4APE3JPGlNHQ8VR0OAs5A/BVJbjUQsw0Fh4OAHRB/RpLPG0wOJwSsoTXnfBolF5o5HARUBqL2pYbDB6bGBDqchYYlAk27cqPt8YFuHVIaxYyjIT6ckwrjaIiPOnzU4aMOH3X4qMNHHU5sowjWmxhqACDAAI3lmdvpn4aTAAAAAElFTkSuQmCC');
+}
+
+video::-webkit-media-controls-panel.picture-in-picture {
+ opacity: 0;
+ pointer-events: none;
+}
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (195692 => 195693)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2016-01-27 22:23:36 UTC (rev 195692)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js 2016-01-27 22:31:17 UTC (rev 195693)
@@ -113,6 +113,7 @@
noVideo: 'no-video',
down: 'down',
out: 'out',
+ pictureInPictureButton: 'picture-in-picture-button',
},
KeyCodes: {
enter: 13,
@@ -213,6 +214,9 @@
this.controlsObserver.observe(this.video, { attributes: true, attributeFilter: ['controls'] });
this.listenFor(this.video, 'webkitcurrentplaybacktargetiswirelesschanged', this.handleWirelessPlaybackChange);
+
+ if ('webkitPresentationMode' in this.video)
+ this.listenFor(this.video, 'webkitpresentationmodechanged', this.handlePresentationModeChange);
},
removeVideoListeners: function()
@@ -242,6 +246,9 @@
this.stopListeningFor(this.video, 'webkitcurrentplaybacktargetiswirelesschanged', this.handleWirelessPlaybackChange);
this.setShouldListenForPlaybackTargetAvailabilityEvent(false);
+
+ if ('webkitPresentationMode' in this.video)
+ this.stopListeningFor(this.video, 'webkitpresentationmodechanged', this.handlePresentationModeChange);
},
handleEvent: function(event)
@@ -479,6 +486,7 @@
var pictureInPictureButton = this.controls.pictureInPictureButton = document.createElement('button');
pictureInPictureButton.setAttribute('pseudo', '-webkit-media-controls-picture-in-picture-button');
pictureInPictureButton.setAttribute('aria-label', this.UIString('Display Picture in Picture'));
+ pictureInPictureButton.classList.add(this.ClassNames.pictureInPictureButton);
this.listenFor(pictureInPictureButton, 'click', this.handlePictureInPictureButtonClicked);
var inlinePlaybackPlaceholder = this.controls.inlinePlaybackPlaceholder = document.createElement('div');
@@ -584,8 +592,10 @@
this.controls.muteBox.appendChild(this.controls.muteButton);
this.controls.panel.appendChild(this.controls.wirelessTargetPicker);
this.controls.panel.appendChild(this.controls.captionButton);
- if (!this.isAudio())
+ if (!this.isAudio()) {
+ this.updatePictureInPictureButton();
this.controls.panel.appendChild(this.controls.fullscreenButton);
+ }
this.controls.panel.style.removeProperty('left');
this.controls.panel.style.removeProperty('top');
@@ -785,11 +795,80 @@
this.updateCaptionButton();
},
+ presentationMode: function() {
+ if ('webkitPresentationMode' in this.video)
+ return this.video.webkitPresentationMode;
+
+ if (this.isFullScreen())
+ return 'fullscreen';
+
+ return 'inline';
+ },
+
isFullScreen: function()
{
- return this.video.webkitDisplayingFullscreen;
+ if (!this.video.webkitDisplayingFullscreen)
+ return false;
+
+ if ('webkitPresentationMode' in this.video && this.video.webkitPresentationMode === 'picture-in-picture')
+ return false;
+
+ return true;
},
+ 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();
+
+ switch (presentationMode) {
+ case 'inline':
+ this.controls.panel.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);
+ this.controls.inlinePlaybackPlaceholderTextBottom.classList.remove(this.ClassNames.pictureInPicture);
+
+ this.controls.pictureInPictureButton.classList.remove(this.ClassNames.returnFromPictureInPicture);
+ break;
+ 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.controls.inlinePlaybackPlaceholderTextTop.innerText = this.UIString('This video is playing in Picture in Picture');
+ this.controls.inlinePlaybackPlaceholderTextTop.classList.add(this.ClassNames.pictureInPicture);
+ this.controls.inlinePlaybackPlaceholderTextBottom.innerText = "";
+ this.controls.inlinePlaybackPlaceholderTextBottom.classList.add(this.ClassNames.pictureInPicture);
+
+ this.controls.pictureInPictureButton.classList.add(this.ClassNames.returnFromPictureInPicture);
+ break;
+ default:
+ this.controls.panel.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);
+
+ this.controls.pictureInPictureButton.classList.remove(this.ClassNames.returnFromPictureInPicture);
+ break;
+ }
+
+ this.updateControls();
+ this.updateCaptionContainer();
+ this.resetHideControlsTimer();
+ if (presentationMode != 'fullscreen' && this.video.paused && this.controlsAreHidden())
+ this.showControls();
+ },
+
handleFullscreenChange: function(event)
{
this.updateBase();
@@ -806,6 +885,9 @@
this.controls.fullscreenButton.setAttribute('aria-label', this.UIString('Display Full Screen'));
this.host.exitedFullscreen();
}
+
+ if ('webkitPresentationMode' in this.video)
+ this.handlePresentationModeChange(event);
},
handleShowControlsClick: function(event)
@@ -1520,6 +1602,9 @@
controlsAlwaysVisible: function()
{
+ if (this.presentationMode() === 'picture-in-picture')
+ return true;
+
return this.isAudio() || this.currentPlaybackTargetIsWireless() || this.scrubbing;
},
@@ -1942,6 +2027,13 @@
},
handlePictureInPictureButtonClicked: function(event) {
+ if (!('webkitSetPresentationMode' in this.video))
+ return;
+
+ if (this.presentationMode() === 'picture-in-picture')
+ this.video.webkitSetPresentationMode('inline');
+ else
+ this.video.webkitSetPresentationMode('picture-in-picture');
},
currentPlaybackTargetIsWireless: function() {
@@ -2146,6 +2238,10 @@
styleValues: ["display"],
extraProperties: ["hidden"],
},
+ {
+ name: "Picture-in-picture Button",
+ object: this.controls.pictureInPictureButton
+ },
];
elements.forEach(function (element) {
Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (195692 => 195693)
--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2016-01-27 22:23:36 UTC (rev 195692)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js 2016-01-27 22:31:17 UTC (rev 195693)
@@ -35,22 +35,6 @@
return "ios";
},
- addVideoListeners: function() {
- Controller.prototype.addVideoListeners.call(this);
-
- this.listenFor(this.video, 'webkitbeginfullscreen', this.handleFullscreenChange);
- this.listenFor(this.video, 'webkitendfullscreen', this.handleFullscreenChange);
- this.listenFor(this.video, 'webkitpresentationmodechanged', this.handlePresentationModeChange);
- },
-
- removeVideoListeners: function() {
- Controller.prototype.removeVideoListeners.call(this);
-
- this.stopListeningFor(this.video, 'webkitbeginfullscreen', this.handleFullscreenChange);
- this.stopListeningFor(this.video, 'webkitendfullscreen', this.handleFullscreenChange);
- this.stopListeningFor(this.video, 'webkitpresentationmodechanged', this.handlePresentationModeChange);
- },
-
createBase: function() {
Controller.prototype.createBase.call(this);
@@ -398,21 +382,6 @@
}
},
- presentationMode: function() {
- if ('webkitPresentationMode' in this.video)
- return this.video.webkitPresentationMode;
-
- if (this.isFullScreen())
- return 'fullscreen';
-
- return 'inline';
- },
-
- isFullScreen: function()
- {
- return this.video.webkitDisplayingFullscreen && this.presentationMode() != 'picture-in-picture';
- },
-
handleFullscreenButtonClicked: function(event) {
if ('webkitSetPresentationMode' in this.video) {
if (this.presentationMode() === 'fullscreen')
@@ -446,16 +415,6 @@
return true;
},
- handlePictureInPictureButtonClicked: function(event) {
- if (!('webkitSetPresentationMode' in this.video))
- return;
-
- if (this.presentationMode() === 'picture-in-picture')
- this.video.webkitSetPresentationMode('inline');
- else
- this.video.webkitSetPresentationMode('picture-in-picture');
- },
-
handlePictureInPictureTouchStart: function() {
this.controls.pictureInPictureButton.classList.add('active');
},
@@ -578,76 +537,25 @@
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();
switch (presentationMode) {
case 'inline':
- this.controls.panel.classList.remove(this.ClassNames.pictureInPicture);
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);
- this.controls.inlinePlaybackPlaceholderTextBottom.classList.remove(this.ClassNames.pictureInPicture);
-
- this.controls.pictureInPictureButton.classList.remove(this.ClassNames.returnFromPictureInPicture);
break;
case 'picture-in-picture':
- this.controls.panel.classList.add(this.ClassNames.pictureInPicture);
this.controls.panelContainer.classList.add(this.ClassNames.pictureInPicture);
- this.controls.inlinePlaybackPlaceholder.classList.add(this.ClassNames.pictureInPicture);
- this.controls.inlinePlaybackPlaceholder.classList.remove(this.ClassNames.hidden);
-
- this.controls.inlinePlaybackPlaceholderTextTop.innerText = this.UIString('This video is playing in Picture in Picture');
- this.controls.inlinePlaybackPlaceholderTextTop.classList.add(this.ClassNames.pictureInPicture);
- this.controls.inlinePlaybackPlaceholderTextBottom.innerText = "";
- this.controls.inlinePlaybackPlaceholderTextBottom.classList.add(this.ClassNames.pictureInPicture);
-
- this.controls.pictureInPictureButton.classList.add(this.ClassNames.returnFromPictureInPicture);
break;
default:
- this.controls.panel.classList.remove(this.ClassNames.pictureInPicture);
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);
-
- this.controls.pictureInPictureButton.classList.remove(this.ClassNames.returnFromPictureInPicture);
break;
}
- this.updateControls();
- this.updateCaptionContainer();
- this.resetHideControlsTimer();
- if (presentationMode != 'fullscreen' && this.video.paused && this.controlsAreHidden())
- this.showControls();
+ Controller.prototype.handlePresentationModeChange.call(this, event);
},
- handleFullscreenChange: function(event)
- {
- Controller.prototype.handleFullscreenChange.call(this, event);
- this.handlePresentationModeChange(event);
- },
-
- controlsAlwaysVisible: function()
- {
- if (this.presentationMode() === 'picture-in-picture')
- return true;
-
- return Controller.prototype.controlsAlwaysVisible.call(this);
- },
-
// Due to the bad way we are faking inheritance here, in particular the extends method
// on Controller.prototype, we don't copy getters and setters from the prototype. This
// means we have to implement them again, here in the subclass.