Title: [252365] trunk/Source/WebCore
- Revision
- 252365
- Author
- [email protected]
- Date
- 2019-11-12 07:39:48 -0800 (Tue, 12 Nov 2019)
Log Message
Picture-in-Picture events are not fired if we switch the Picture-in-Picture mode through modern media controls
https://bugs.webkit.org/show_bug.cgi?id=203933
Patch by Peng Liu <[email protected]> on 2019-11-12
Reviewed by Eric Carlson.
When the Picture-in-Picture API is not available, we need to call webkitSetPresentationMode()
of the video element to implement the picture-in-picture feature.
No new tests, covered by test: media/modern-media-controls/pip-support/pip-support-click.html
* Modules/modern-media-controls/media/pip-support.js:
(PiPSupport.prototype.buttonWasPressed):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (252364 => 252365)
--- trunk/Source/WebCore/ChangeLog 2019-11-12 15:27:26 UTC (rev 252364)
+++ trunk/Source/WebCore/ChangeLog 2019-11-12 15:39:48 UTC (rev 252365)
@@ -1,3 +1,18 @@
+2019-11-12 Peng Liu <[email protected]>
+
+ Picture-in-Picture events are not fired if we switch the Picture-in-Picture mode through modern media controls
+ https://bugs.webkit.org/show_bug.cgi?id=203933
+
+ Reviewed by Eric Carlson.
+
+ When the Picture-in-Picture API is not available, we need to call webkitSetPresentationMode()
+ of the video element to implement the picture-in-picture feature.
+
+ No new tests, covered by test: media/modern-media-controls/pip-support/pip-support-click.html
+
+ * Modules/modern-media-controls/media/pip-support.js:
+ (PiPSupport.prototype.buttonWasPressed):
+
2019-11-11 Per Arne Vollan <[email protected]>
Many legacy animation tests are timing out with VS2019
Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/pip-support.js (252364 => 252365)
--- trunk/Source/WebCore/Modules/modern-media-controls/media/pip-support.js 2019-11-12 15:27:26 UTC (rev 252364)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/pip-support.js 2019-11-12 15:39:48 UTC (rev 252365)
@@ -49,6 +49,11 @@
buttonWasPressed(control)
{
const media = this.mediaController.media;
+ if (!document.pictureInPictureEnabled) {
+ media.webkitSetPresentationMode(media.webkitPresentationMode === PiPMode ? InlineMode : PiPMode);
+ return;
+ }
+
if (!document.pictureInPictureElement)
media.requestPictureInPicture();
else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes