summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkMediaVideo.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/components/MkMediaVideo.vue')
-rw-r--r--packages/frontend/src/components/MkMediaVideo.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkMediaVideo.vue b/packages/frontend/src/components/MkMediaVideo.vue
index 5475e703a5..629679a971 100644
--- a/packages/frontend/src/components/MkMediaVideo.vue
+++ b/packages/frontend/src/components/MkMediaVideo.vue
@@ -171,7 +171,7 @@ const keymap = {
// PlayerElもしくはその子要素にフォーカスがあるかどうか
function hasFocus() {
if (!playerEl.value) return false;
- return playerEl.value === document.activeElement || playerEl.value.contains(document.activeElement);
+ return playerEl.value === window.document.activeElement || playerEl.value.contains(window.document.activeElement);
}
// eslint-disable-next-line vue/no-setup-props-reactivity-loss
@@ -216,7 +216,7 @@ function showMenu(ev: MouseEvent) {
'2.0x': 2,
},
},
- ...(document.pictureInPictureEnabled ? [{
+ ...(window.document.pictureInPictureEnabled ? [{
text: i18n.ts._mediaControls.pip,
icon: 'ti ti-picture-in-picture',
action: togglePictureInPicture,
@@ -384,8 +384,8 @@ function toggleFullscreen() {
function togglePictureInPicture() {
if (videoEl.value) {
- if (document.pictureInPictureElement) {
- document.exitPictureInPicture();
+ if (window.document.pictureInPictureElement) {
+ window.document.exitPictureInPicture();
} else {
videoEl.value.requestPictureInPicture();
}