Skip to content

Commit

Permalink
fix(xgplayer): pip available
Browse files Browse the repository at this point in the history
  • Loading branch information
legolaserea committed Aug 19, 2024
1 parent b431c9e commit 347ef3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions fixtures/xgplayer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ function init(index = 0, config = {}) {
}
},
url: "./heatmap.mp4",
DynamicBg: {
disable: false
},
pip: true,
loop: false,
autoplay: false,
autoplayMuted: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/xgplayer/src/plugins/pip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class PIP extends IconPlugin {

isPIPAvailable () {
const video = this.player.media
const _isEnabled = Util.typeOf(document.pictureInPictureEnabled) === 'Boolean' ? document.pictureInPictureEnabled : true
const _isEnabled = Util.typeOf(document.pictureInPictureEnabled) === 'Boolean' ? document.pictureInPictureEnabled : false
return _isEnabled &&
((Util.typeOf(video.disablePictureInPicture) === 'Boolean' && !video.disablePictureInPicture) ||
(video.webkitSupportsPresentationMode && Util.typeOf(video.webkitSetPresentationMode) === 'Function')) ||
Expand Down

0 comments on commit 347ef3c

Please sign in to comment.