|
|
|
@ -214,20 +214,12 @@ export function createVideoStateProvider( |
|
|
|
? "inline" |
|
|
|
? "inline" |
|
|
|
: "picture-in-picture" |
|
|
|
: "picture-in-picture" |
|
|
|
); |
|
|
|
); |
|
|
|
state.interface.isPictureInPicture = |
|
|
|
|
|
|
|
webkitPlayer.webkitPresentationMode === "picture-in-picture"; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (canPictureInPicture()) { |
|
|
|
if (canPictureInPicture()) { |
|
|
|
if (player !== document.pictureInPictureElement) { |
|
|
|
if (player !== document.pictureInPictureElement) { |
|
|
|
try { |
|
|
|
player.requestPictureInPicture(); |
|
|
|
player.requestPictureInPicture(); |
|
|
|
|
|
|
|
state.interface.isPictureInPicture = true; |
|
|
|
|
|
|
|
} catch { |
|
|
|
|
|
|
|
state.interface.isPictureInPicture = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
document.exitPictureInPicture(); |
|
|
|
document.exitPictureInPicture(); |
|
|
|
state.interface.isPictureInPicture = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|