From 65581958e137fbed83d88d060856fd759b3ad9ed Mon Sep 17 00:00:00 2001 From: Anthony Lavado Date: Sun, 3 Feb 2019 03:34:50 -0500 Subject: [PATCH] Enable and fix PiP for Safari This enables the previously commented out lines that would enable Picture in Picture support for Safari. Also fixed IF condition to match the Apple developer reccomendation: https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls --- .../emby-webcomponents/htmlvideoplayer/plugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bower_components/emby-webcomponents/htmlvideoplayer/plugin.js b/src/bower_components/emby-webcomponents/htmlvideoplayer/plugin.js index 10d32bc9b..b52e31792 100644 --- a/src/bower_components/emby-webcomponents/htmlvideoplayer/plugin.js +++ b/src/bower_components/emby-webcomponents/htmlvideoplayer/plugin.js @@ -1443,9 +1443,9 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa var list = []; var video = document.createElement('video'); - //if (video.webkitSupportsPresentationMode && video.webkitSupportsPresentationMode('picture-in-picture') && typeof video.webkitSetPresentationMode === "function") { - // list.push('PictureInPicture'); - //} + if (video.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === "function") { + list.push('PictureInPicture'); + } if (document.pictureInPictureEnabled) { list.push('PictureInPicture'); } @@ -1849,4 +1849,4 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa } return HtmlVideoPlayer; -}); \ No newline at end of file +});