@maas/vue-equipment 1.0.0-beta.2 → 1.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/composables/index.d.ts +5 -5
- package/dist/composables/index.js +23 -13
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.d.mts +2 -1
- package/dist/nuxt/module.json +2 -2
- package/dist/nuxt/module.mjs +9 -2
- package/dist/nuxt/types.d.mts +3 -1
- package/dist/plugins/.turbo/turbo-lint.log +2 -10
- package/dist/plugins/MagicAccordion/nuxt.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue +59 -82
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +35 -22
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue +17 -31
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +12 -21
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +57 -62
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +23 -59
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +34 -45
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +17 -22
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionView.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/composables/useMagicAccordion.mjs +1 -0
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +146 -152
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +24 -13
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue +42 -52
- package/dist/plugins/MagicCommand/src/components/MagicCommandDrawer.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +72 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +29 -28
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue +37 -47
- package/dist/plugins/MagicCommand/src/components/MagicCommandModal.vue.d.ts +12 -21
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +61 -77
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +23 -39
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +80 -86
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +25 -60
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue +36 -48
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +15 -22
- package/dist/plugins/MagicCommand/src/composables/private/useCommandScroll.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/composables/private/useCommandState.mjs +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.d.ts +1 -1
- package/dist/plugins/MagicCommand/src/composables/private/useCommandTrigger.mjs +1 -0
- package/dist/plugins/MagicCommand/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicCookie/nuxt.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue +34 -41
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +13 -22
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue +19 -36
- package/dist/plugins/MagicCookie/src/components/MagicCookieProvider.vue.d.ts +9 -21
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue +40 -72
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +21 -12
- package/dist/plugins/MagicCookie/src/composables/private/useCookieItem.mjs +0 -1
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +81 -100
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +94 -22
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +43 -63
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +2 -15
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +117 -64
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableState.mjs +6 -5
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +2 -1
- package/dist/plugins/MagicDraggable/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/MagicDrawer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +271 -308
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +165 -23
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDOM.mjs +34 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerDrag.mjs +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerGuards.mjs +28 -10
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerProgress.d.ts +2 -2
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.d.ts +3 -3
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerSnap.mjs +16 -14
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/composables/private/useDrawerWheel.mjs +1 -1
- package/dist/plugins/MagicDrawer/src/types/index.mjs +1 -0
- package/dist/plugins/MagicEmitter/nuxt.d.ts +1 -1
- package/dist/plugins/MagicEmitter/src/composables/useMagicEmitter.d.ts +100 -100
- package/dist/plugins/MagicMarquee/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue +38 -72
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +14 -25
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.d.ts +1 -1
- package/dist/plugins/MagicMarquee/src/composables/private/useMarqueeApi.mjs +8 -2
- package/dist/plugins/MagicMarquee/src/composables/useMagicMarquee.d.ts +1 -1
- package/dist/plugins/MagicMenu/nuxt.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue +51 -63
- package/dist/plugins/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +18 -21
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +178 -214
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +41 -24
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +171 -198
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +40 -25
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +87 -113
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +31 -28
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +82 -81
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +12 -58
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +63 -86
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +19 -23
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +94 -97
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +27 -60
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue +49 -61
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +15 -22
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuChannel.mjs +15 -5
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCursor.mjs +4 -4
- package/dist/plugins/MagicMenu/src/composables/private/useMenuDOM.mjs +35 -15
- package/dist/plugins/MagicMenu/src/composables/private/useMenuKeyListener.mjs +1 -0
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/composables/private/useMenuTrigger.mjs +2 -0
- package/dist/plugins/MagicMenu/src/composables/private/useMenuView.mjs +18 -6
- package/dist/plugins/MagicMenu/src/composables/useMagicMenu.mjs +1 -0
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/utils/modeDelayDefaults.mjs +2 -2
- package/dist/plugins/MagicModal/nuxt.d.ts +1 -1
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +133 -168
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +44 -21
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
- package/dist/plugins/MagicModal/src/types/index.mjs +1 -0
- package/dist/plugins/MagicNoise/nuxt.d.ts +1 -1
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +50 -81
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -10
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.d.ts +3 -3
- package/dist/plugins/MagicNoise/src/composables/private/useNoiseApi.mjs +2 -2
- package/dist/plugins/MagicPie/index.d.ts +7 -0
- package/dist/plugins/MagicPie/index.mjs +8 -0
- package/dist/plugins/MagicPie/nuxt.d.ts +2 -0
- package/dist/plugins/MagicPie/nuxt.mjs +23 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue +168 -0
- package/dist/plugins/MagicPie/src/components/MagicPie.vue.d.ts +7 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.d.ts +6 -0
- package/dist/plugins/MagicPie/src/composables/private/usePieState.mjs +33 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.d.ts +13 -0
- package/dist/plugins/MagicPie/src/composables/useMagicPie.mjs +43 -0
- package/dist/plugins/MagicPie/src/types/index.d.ts +9 -0
- package/dist/plugins/MagicPie/src/types/index.mjs +0 -0
- package/dist/plugins/MagicPlayer/nuxt.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue +58 -63
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +99 -127
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +30 -26
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue +32 -42
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +106 -105
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -10
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue +51 -76
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +29 -14
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue +18 -37
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +12 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +41 -55
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +23 -23
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue +60 -109
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +74 -71
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +163 -209
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +63 -33
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +0 -4
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +6 -47
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +7 -34
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +154 -235
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +3 -17
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +17 -157
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +2 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +7 -25
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.d.ts +7 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerState.mjs +56 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +3 -8
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +7 -62
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +32 -51
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.mjs +49 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.d.ts +5 -2
- package/dist/plugins/MagicPlayer/src/symbols/index.mjs +10 -1
- package/dist/plugins/MagicPlayer/src/types/index.d.ts +29 -0
- package/dist/plugins/MagicScroll/nuxt.d.ts +1 -1
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +54 -61
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +56 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +9 -23
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue +26 -33
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +45 -37
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +63 -71
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +13 -24
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +16 -6
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +41 -26
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/nuxt.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +94 -118
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -10
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +54 -81
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +24 -23
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.d.ts +2 -2
- package/dist/plugins/MagicToast/src/composables/private/useToastCallback.mjs +5 -5
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +22 -22
- package/dist/plugins/MagicToast/src/composables/private/useToastListener.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +33 -15
- package/dist/plugins/MagicToast/src/composables/private/useToastView.mjs +1 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.d.ts +1 -0
- package/dist/plugins/MagicToast/src/composables/useMagicToast.mjs +10 -2
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.mjs +1 -0
- package/dist/utils/index.d.ts +9 -4
- package/dist/utils/index.js +39 -3
- package/dist/utils/index.js.map +1 -1
- package/package.json +17 -8
- package/dist/nuxt/module.cjs +0 -5
- package/dist/nuxt/module.d.ts +0 -9
- package/dist/nuxt/types.d.ts +0 -1
- package/dist/plugins/MagicAccordion/demo/data/footer.json +0 -117
- package/dist/plugins/MagicCommand/demo/data/about.json +0 -3
- package/dist/plugins/MagicCommand/demo/data/search.json +0 -594
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.d.ts +0 -15
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerStateEmitter.mjs +0 -9
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<video
|
|
3
|
+
ref="el"
|
|
4
|
+
class="magic-player-video"
|
|
5
|
+
playsinline
|
|
6
|
+
disablePictureInPicture
|
|
7
|
+
:preload="injectedOptions.preload"
|
|
8
|
+
:loop="injectedOptions.loop"
|
|
9
|
+
:muted="muted"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup>
|
|
14
|
+
import {
|
|
15
|
+
toRefs,
|
|
16
|
+
useTemplateRef,
|
|
17
|
+
watch,
|
|
18
|
+
onMounted,
|
|
19
|
+
inject,
|
|
20
|
+
onBeforeUnmount
|
|
21
|
+
} from "vue";
|
|
6
22
|
import {
|
|
7
23
|
useElementVisibility,
|
|
8
24
|
useEventListener,
|
|
@@ -11,76 +27,63 @@ import {
|
|
|
11
27
|
import { usePlayerVideoApi } from "../composables/private/usePlayerVideoApi";
|
|
12
28
|
import { usePlayerMediaApi } from "../composables/private/usePlayerMediaApi";
|
|
13
29
|
import { usePlayerRuntime } from "../composables/private/usePlayerRuntime";
|
|
30
|
+
import { usePlayerState } from "../composables/private/usePlayerState";
|
|
14
31
|
import { MagicPlayerInstanceId, MagicPlayerOptionsKey } from "../symbols";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
const injectedInstanceId = inject(MagicPlayerInstanceId, void 0);
|
|
33
|
+
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
34
|
+
if (!injectedInstanceId) {
|
|
35
|
+
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
36
|
+
}
|
|
37
|
+
if (!injectedOptions) {
|
|
38
|
+
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
39
|
+
}
|
|
40
|
+
const elRef = useTemplateRef("el");
|
|
41
|
+
const isVisible = useElementVisibility(elRef);
|
|
42
|
+
const { initialize, destroy } = usePlayerRuntime({
|
|
43
|
+
id: injectedInstanceId,
|
|
44
|
+
mediaRef: elRef,
|
|
45
|
+
src: injectedOptions.src,
|
|
46
|
+
srcType: injectedOptions.srcType
|
|
47
|
+
});
|
|
48
|
+
const { initializeState } = usePlayerState(injectedInstanceId);
|
|
49
|
+
const state = initializeState();
|
|
50
|
+
const { muted, playing } = toRefs(state);
|
|
51
|
+
usePlayerMediaApi({
|
|
52
|
+
id: injectedInstanceId,
|
|
53
|
+
mediaRef: elRef
|
|
54
|
+
});
|
|
55
|
+
const { play, pause } = usePlayerVideoApi({
|
|
56
|
+
id: injectedInstanceId,
|
|
57
|
+
videoRef: elRef
|
|
58
|
+
});
|
|
59
|
+
function onWindowFocus() {
|
|
60
|
+
if (isVisible.value && !playing.value && injectedOptions?.autoplay) {
|
|
61
|
+
play();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
useEventListener(defaultWindow, "focus", onWindowFocus);
|
|
65
|
+
watch(
|
|
66
|
+
isVisible,
|
|
67
|
+
(value) => {
|
|
68
|
+
if (value && !playing.value && injectedOptions.autoplay) {
|
|
69
|
+
play();
|
|
70
|
+
} else if (!value && playing.value) {
|
|
71
|
+
pause();
|
|
46
72
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
immediate: true
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
onMounted(() => {
|
|
62
|
-
initialize();
|
|
63
|
-
if (injectedOptions.autoplay) {
|
|
64
|
-
muted.value = true;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
onBeforeUnmount(() => {
|
|
68
|
-
destroy();
|
|
69
|
-
});
|
|
70
|
-
return (_ctx, _cache) => {
|
|
71
|
-
return _openBlock(), _createElementBlock("video", {
|
|
72
|
-
ref_key: "elRef",
|
|
73
|
-
ref: elRef,
|
|
74
|
-
class: "magic-player-video",
|
|
75
|
-
playsinline: "",
|
|
76
|
-
disablePictureInPicture: "",
|
|
77
|
-
preload: _unref(injectedOptions).preload,
|
|
78
|
-
loop: _unref(injectedOptions).loop,
|
|
79
|
-
muted: _unref(muted)
|
|
80
|
-
}, null, 8, _hoisted_1);
|
|
81
|
-
};
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
immediate: true
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
onMounted(() => {
|
|
79
|
+
initialize();
|
|
80
|
+
if (injectedOptions.autoplay) {
|
|
81
|
+
muted.value = true;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
+
onBeforeUnmount(() => {
|
|
85
|
+
destroy();
|
|
86
|
+
});
|
|
84
87
|
</script>
|
|
85
88
|
|
|
86
89
|
<style>
|
|
@@ -1,222 +1,176 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="el"
|
|
4
|
+
class="magic-player-video-controls"
|
|
5
|
+
:data-fullscreen="isFullscreen"
|
|
6
|
+
:data-touched="touched"
|
|
7
|
+
:data-playing="playing"
|
|
8
|
+
:data-paused="!playing"
|
|
9
|
+
:data-waiting="waiting"
|
|
10
|
+
:data-muted="muted"
|
|
11
|
+
:data-idle="idle"
|
|
12
|
+
:data-hover="controlsMouseEntered"
|
|
13
|
+
:data-standalone="standalone"
|
|
14
|
+
@mouseenter="onMouseenter"
|
|
15
|
+
@mouseleave="onMouseleave"
|
|
16
|
+
>
|
|
17
|
+
<transition :name="mappedTransition">
|
|
18
|
+
<div v-show="!hidden" class="magic-player-video-controls__bar">
|
|
19
|
+
<div
|
|
20
|
+
v-if="$slots.popover"
|
|
21
|
+
v-show="!!seekedTime && touched"
|
|
22
|
+
ref="popover"
|
|
23
|
+
class="magic-player-video-controls__popover"
|
|
24
|
+
:style="{ marginLeft: `${popoverOffsetX}%` }"
|
|
25
|
+
>
|
|
26
|
+
<slot name="popover" />
|
|
27
|
+
</div>
|
|
28
|
+
<div ref="bar" class="magic-player-video-controls__bar--inner">
|
|
29
|
+
<div class="magic-player-video-controls__item -shrink-0">
|
|
30
|
+
<button v-if="!playing" @click="play">
|
|
31
|
+
<slot name="playIcon">
|
|
32
|
+
<icon-play />
|
|
33
|
+
</slot>
|
|
34
|
+
</button>
|
|
35
|
+
<button v-else @click="pause">
|
|
36
|
+
<slot name="pauseIcon">
|
|
37
|
+
<icon-pause />
|
|
38
|
+
</slot>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="magic-player-video-controls__item -grow">
|
|
42
|
+
<slot name="timelineBefore" />
|
|
43
|
+
<div ref="track" class="magic-player-video-controls__timeline">
|
|
44
|
+
<magic-player-timeline />
|
|
45
|
+
</div>
|
|
46
|
+
<slot name="timelineAfter" />
|
|
47
|
+
</div>
|
|
48
|
+
<div class="magic-player-video-controls__item -shrink-0">
|
|
49
|
+
<button v-if="muted" @click="unmute">
|
|
50
|
+
<slot name="volumeOffIcon">
|
|
51
|
+
<icon-volume-off />
|
|
52
|
+
</slot>
|
|
53
|
+
</button>
|
|
54
|
+
<button v-else @click="mute">
|
|
55
|
+
<slot name="volumeOnIcon">
|
|
56
|
+
<icon-volume-on />
|
|
57
|
+
</slot>
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="magic-player-video-controls__item -shrink-0">
|
|
61
|
+
<button v-if="isFullscreen" @click="exitFullscreen">
|
|
62
|
+
<slot name="fullscreenExitIcon">
|
|
63
|
+
<icon-fullscreen-exit />
|
|
64
|
+
</slot>
|
|
65
|
+
</button>
|
|
66
|
+
<button v-else @click="enterFullscreen">
|
|
67
|
+
<slot name="fullscreenEnterIcon">
|
|
68
|
+
<icon-fullscreen-enter />
|
|
69
|
+
</slot>
|
|
70
|
+
</button>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</transition>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script setup>
|
|
79
|
+
import {
|
|
80
|
+
toRefs,
|
|
81
|
+
computed,
|
|
82
|
+
inject,
|
|
83
|
+
provide,
|
|
84
|
+
useTemplateRef,
|
|
85
|
+
onBeforeUnmount
|
|
86
|
+
} from "vue";
|
|
87
|
+
import { useElementVisibility, useIdle } from "@vueuse/core";
|
|
12
88
|
import IconPlay from "./icons/Play.vue";
|
|
13
89
|
import IconPause from "./icons/Pause.vue";
|
|
14
90
|
import IconVolumeOn from "./icons/VolumeOn.vue";
|
|
15
91
|
import IconVolumeOff from "./icons/VolumeOff.vue";
|
|
16
92
|
import IconFullscreenEnter from "./icons/FullscreenEnter.vue";
|
|
17
93
|
import IconFullscreenExit from "./icons/FullscreenExit.vue";
|
|
18
|
-
import {
|
|
94
|
+
import { usePlayerState } from "../composables/private/usePlayerState";
|
|
19
95
|
import { usePlayerVideoApi } from "../composables/private/usePlayerVideoApi";
|
|
20
96
|
import { usePlayerControlsApi } from "../composables/private/usePlayerControlsApi";
|
|
21
|
-
import {
|
|
97
|
+
import {
|
|
98
|
+
MagicPlayerInstanceId,
|
|
99
|
+
MagicPlayerOptionsKey,
|
|
100
|
+
MagicPlayerTrackRef,
|
|
101
|
+
MagicPlayerPopoverRef,
|
|
102
|
+
MagicPlayerBarRef
|
|
103
|
+
} from "../symbols";
|
|
22
104
|
import "@maas/vue-equipment/utils/css/animations/fade-up-in.css";
|
|
23
105
|
import "@maas/vue-equipment/utils/css/animations/fade-up-out.css";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
return _openBlock(), _createElementBlock("div", {
|
|
85
|
-
class: "magic-player-video-controls",
|
|
86
|
-
"data-fullscreen": _unref(isFullscreen),
|
|
87
|
-
"data-touched": _unref(touched),
|
|
88
|
-
"data-playing": _unref(playing),
|
|
89
|
-
"data-paused": !_unref(playing),
|
|
90
|
-
"data-waiting": _unref(waiting),
|
|
91
|
-
"data-muted": _unref(muted),
|
|
92
|
-
"data-idle": _unref(idle),
|
|
93
|
-
"data-hover": _unref(mouseEntered),
|
|
94
|
-
"data-standalone": _ctx.standalone
|
|
95
|
-
}, [
|
|
96
|
-
_createVNode(_Transition, {
|
|
97
|
-
name: mappedTransition.value,
|
|
98
|
-
persisted: ""
|
|
99
|
-
}, {
|
|
100
|
-
default: _withCtx(() => [
|
|
101
|
-
_withDirectives(_createElementVNode(
|
|
102
|
-
"div",
|
|
103
|
-
_hoisted_2,
|
|
104
|
-
[
|
|
105
|
-
_ctx.$slots.popover ? _withDirectives((_openBlock(), _createElementBlock(
|
|
106
|
-
"div",
|
|
107
|
-
{
|
|
108
|
-
key: 0,
|
|
109
|
-
ref_key: "popoverRef",
|
|
110
|
-
ref: popoverRef,
|
|
111
|
-
class: "magic-player-video-controls__popover",
|
|
112
|
-
style: _normalizeStyle({ marginLeft: `${_unref(popoverOffsetX)}%` })
|
|
113
|
-
},
|
|
114
|
-
[
|
|
115
|
-
_renderSlot(_ctx.$slots, "popover")
|
|
116
|
-
],
|
|
117
|
-
4
|
|
118
|
-
/* STYLE */
|
|
119
|
-
)), [
|
|
120
|
-
[_vShow, !!_unref(seekedTime) && _unref(touched)]
|
|
121
|
-
]) : _createCommentVNode("v-if", true),
|
|
122
|
-
_createElementVNode(
|
|
123
|
-
"div",
|
|
124
|
-
{
|
|
125
|
-
ref_key: "barRef",
|
|
126
|
-
ref: barRef,
|
|
127
|
-
class: "magic-player-video-controls__bar--inner"
|
|
128
|
-
},
|
|
129
|
-
[
|
|
130
|
-
_createElementVNode("div", _hoisted_3, [
|
|
131
|
-
!_unref(playing) ? (_openBlock(), _createElementBlock("button", {
|
|
132
|
-
key: 0,
|
|
133
|
-
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
134
|
-
(...args) => _unref(play) && _unref(play)(...args))
|
|
135
|
-
}, [
|
|
136
|
-
_renderSlot(_ctx.$slots, "playIcon", {}, () => [
|
|
137
|
-
_createVNode(IconPlay)
|
|
138
|
-
])
|
|
139
|
-
])) : (_openBlock(), _createElementBlock("button", {
|
|
140
|
-
key: 1,
|
|
141
|
-
onClick: _cache[1] || (_cache[1] = //@ts-ignore
|
|
142
|
-
(...args) => _unref(pause) && _unref(pause)(...args))
|
|
143
|
-
}, [
|
|
144
|
-
_renderSlot(_ctx.$slots, "pauseIcon", {}, () => [
|
|
145
|
-
_createVNode(IconPause)
|
|
146
|
-
])
|
|
147
|
-
]))
|
|
148
|
-
]),
|
|
149
|
-
_createElementVNode("div", _hoisted_4, [
|
|
150
|
-
_renderSlot(_ctx.$slots, "timelineBefore"),
|
|
151
|
-
_createElementVNode(
|
|
152
|
-
"div",
|
|
153
|
-
{
|
|
154
|
-
ref_key: "trackRef",
|
|
155
|
-
ref: trackRef,
|
|
156
|
-
class: "magic-player-video-controls__timeline"
|
|
157
|
-
},
|
|
158
|
-
[
|
|
159
|
-
_createVNode(_component_magic_player_timeline, { id: _ctx.id }, null, 8, ["id"])
|
|
160
|
-
],
|
|
161
|
-
512
|
|
162
|
-
/* NEED_PATCH */
|
|
163
|
-
),
|
|
164
|
-
_renderSlot(_ctx.$slots, "timelineAfter")
|
|
165
|
-
]),
|
|
166
|
-
_createElementVNode("div", _hoisted_5, [
|
|
167
|
-
_unref(muted) ? (_openBlock(), _createElementBlock("button", {
|
|
168
|
-
key: 0,
|
|
169
|
-
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
170
|
-
(...args) => _unref(unmute) && _unref(unmute)(...args))
|
|
171
|
-
}, [
|
|
172
|
-
_renderSlot(_ctx.$slots, "volumeOffIcon", {}, () => [
|
|
173
|
-
_createVNode(IconVolumeOff)
|
|
174
|
-
])
|
|
175
|
-
])) : (_openBlock(), _createElementBlock("button", {
|
|
176
|
-
key: 1,
|
|
177
|
-
onClick: _cache[3] || (_cache[3] = //@ts-ignore
|
|
178
|
-
(...args) => _unref(mute) && _unref(mute)(...args))
|
|
179
|
-
}, [
|
|
180
|
-
_renderSlot(_ctx.$slots, "volumeOnIcon", {}, () => [
|
|
181
|
-
_createVNode(IconVolumeOn)
|
|
182
|
-
])
|
|
183
|
-
]))
|
|
184
|
-
]),
|
|
185
|
-
_createElementVNode("div", _hoisted_6, [
|
|
186
|
-
_unref(isFullscreen) ? (_openBlock(), _createElementBlock("button", {
|
|
187
|
-
key: 0,
|
|
188
|
-
onClick: _cache[4] || (_cache[4] = //@ts-ignore
|
|
189
|
-
(...args) => _unref(exitFullscreen) && _unref(exitFullscreen)(...args))
|
|
190
|
-
}, [
|
|
191
|
-
_renderSlot(_ctx.$slots, "fullscreenExitIcon", {}, () => [
|
|
192
|
-
_createVNode(IconFullscreenExit)
|
|
193
|
-
])
|
|
194
|
-
])) : (_openBlock(), _createElementBlock("button", {
|
|
195
|
-
key: 1,
|
|
196
|
-
onClick: _cache[5] || (_cache[5] = //@ts-ignore
|
|
197
|
-
(...args) => _unref(enterFullscreen) && _unref(enterFullscreen)(...args))
|
|
198
|
-
}, [
|
|
199
|
-
_renderSlot(_ctx.$slots, "fullscreenEnterIcon", {}, () => [
|
|
200
|
-
_createVNode(IconFullscreenEnter)
|
|
201
|
-
])
|
|
202
|
-
]))
|
|
203
|
-
])
|
|
204
|
-
],
|
|
205
|
-
512
|
|
206
|
-
/* NEED_PATCH */
|
|
207
|
-
)
|
|
208
|
-
],
|
|
209
|
-
512
|
|
210
|
-
/* NEED_PATCH */
|
|
211
|
-
), [
|
|
212
|
-
[_vShow, !hidden.value]
|
|
213
|
-
])
|
|
214
|
-
]),
|
|
215
|
-
_: 3
|
|
216
|
-
/* FORWARDED */
|
|
217
|
-
}, 8, ["name"])
|
|
218
|
-
], 8, _hoisted_1);
|
|
219
|
-
};
|
|
106
|
+
const {
|
|
107
|
+
id,
|
|
108
|
+
standalone = false,
|
|
109
|
+
transition
|
|
110
|
+
} = defineProps({
|
|
111
|
+
id: { type: String, required: false },
|
|
112
|
+
standalone: { type: Boolean, required: false },
|
|
113
|
+
transition: { type: String, required: false }
|
|
114
|
+
});
|
|
115
|
+
const injectedInstanceId = inject(MagicPlayerInstanceId, void 0);
|
|
116
|
+
const mappedInstanceId = computed(() => id ?? injectedInstanceId);
|
|
117
|
+
if (!mappedInstanceId.value) {
|
|
118
|
+
throw new Error(
|
|
119
|
+
"MagicPlayerVideoControls must be nested inside MagicPlayerProvider or be passed an id as a prop."
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
const injectedOptions = inject(MagicPlayerOptionsKey, void 0);
|
|
123
|
+
const mappedTransition = computed(
|
|
124
|
+
() => transition ?? injectedOptions?.transition?.videoControls
|
|
125
|
+
);
|
|
126
|
+
const barRef = useTemplateRef("bar");
|
|
127
|
+
const trackRef = useTemplateRef("track");
|
|
128
|
+
const popoverRef = useTemplateRef("popover");
|
|
129
|
+
const { initializeState } = usePlayerState(mappedInstanceId.value);
|
|
130
|
+
const state = initializeState();
|
|
131
|
+
const {
|
|
132
|
+
playing,
|
|
133
|
+
waiting,
|
|
134
|
+
muted,
|
|
135
|
+
touched,
|
|
136
|
+
mouseEntered,
|
|
137
|
+
controlsMouseEntered,
|
|
138
|
+
isFullscreen,
|
|
139
|
+
popoverOffsetX,
|
|
140
|
+
seekedTime
|
|
141
|
+
} = toRefs(state);
|
|
142
|
+
const { play, pause, mute, unmute, enterFullscreen, exitFullscreen } = usePlayerVideoApi({ id: mappedInstanceId.value });
|
|
143
|
+
const { initialize, destroy, onMouseenter, onMouseleave } = usePlayerControlsApi({
|
|
144
|
+
id: mappedInstanceId.value,
|
|
145
|
+
barRef,
|
|
146
|
+
trackRef,
|
|
147
|
+
popoverRef
|
|
148
|
+
});
|
|
149
|
+
const elRef = useTemplateRef("el");
|
|
150
|
+
const isVisible = useElementVisibility(elRef);
|
|
151
|
+
const { idle } = useIdle(3e3);
|
|
152
|
+
const hidden = computed(() => {
|
|
153
|
+
switch (true) {
|
|
154
|
+
case standalone:
|
|
155
|
+
return false;
|
|
156
|
+
case (playing.value && idle.value):
|
|
157
|
+
return true;
|
|
158
|
+
case (playing.value && !controlsMouseEntered.value && !mouseEntered.value):
|
|
159
|
+
return true;
|
|
160
|
+
case !isVisible.value:
|
|
161
|
+
return true;
|
|
162
|
+
case !touched.value:
|
|
163
|
+
return true;
|
|
164
|
+
default:
|
|
165
|
+
return false;
|
|
220
166
|
}
|
|
221
167
|
});
|
|
168
|
+
initialize();
|
|
169
|
+
onBeforeUnmount(() => {
|
|
170
|
+
destroy();
|
|
171
|
+
});
|
|
172
|
+
provide(MagicPlayerInstanceId, mappedInstanceId.value);
|
|
173
|
+
provide(MagicPlayerTrackRef, trackRef);
|
|
174
|
+
provide(MagicPlayerPopoverRef, popoverRef);
|
|
175
|
+
provide(MagicPlayerBarRef, barRef);
|
|
222
176
|
</script>
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import IconPlay from './icons/Play.vue.js';
|
|
2
|
+
import IconPause from './icons/Pause.vue.js';
|
|
3
|
+
import IconVolumeOn from './icons/VolumeOn.vue.js';
|
|
4
|
+
import IconVolumeOff from './icons/VolumeOff.vue.js';
|
|
5
|
+
import IconFullscreenEnter from './icons/FullscreenEnter.vue.js';
|
|
6
|
+
import IconFullscreenExit from './icons/FullscreenExit.vue.js';
|
|
1
7
|
import '@maas/vue-equipment/utils/css/animations/fade-up-in.css';
|
|
2
8
|
import '@maas/vue-equipment/utils/css/animations/fade-up-out.css';
|
|
3
9
|
interface MagicPlayerControlsProps {
|
|
@@ -5,40 +11,64 @@ interface MagicPlayerControlsProps {
|
|
|
5
11
|
standalone?: boolean;
|
|
6
12
|
transition?: string;
|
|
7
13
|
}
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
declare const mappedTransition: import("vue").ComputedRef<string | undefined>;
|
|
15
|
+
declare const playing: import("vue").Ref<boolean, boolean>, waiting: import("vue").Ref<boolean, boolean>, muted: import("vue").Ref<boolean, boolean>, touched: import("vue").Ref<boolean, boolean>, controlsMouseEntered: import("vue").Ref<boolean, boolean>, isFullscreen: import("vue").Ref<boolean, boolean>, popoverOffsetX: import("vue").Ref<number, number>, seekedTime: import("vue").Ref<number, number>;
|
|
16
|
+
declare const play: () => void, pause: () => void, mute: () => void, unmute: () => void, enterFullscreen: () => void, exitFullscreen: () => void;
|
|
17
|
+
declare const onMouseenter: () => void, onMouseleave: () => void;
|
|
18
|
+
declare const idle: import("vue").ShallowRef<boolean>;
|
|
19
|
+
declare const hidden: import("vue").ComputedRef<boolean>;
|
|
20
|
+
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
21
|
+
declare var __VLS_5: {}, __VLS_7: {}, __VLS_12: {}, __VLS_17: {}, __VLS_23: {}, __VLS_25: {}, __VLS_30: {}, __VLS_35: {}, __VLS_40: {};
|
|
22
|
+
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
23
|
+
popover?: (props: typeof __VLS_5) => any;
|
|
24
|
+
} & {
|
|
25
|
+
playIcon?: (props: typeof __VLS_7) => any;
|
|
26
|
+
} & {
|
|
27
|
+
pauseIcon?: (props: typeof __VLS_12) => any;
|
|
28
|
+
} & {
|
|
29
|
+
timelineBefore?: (props: typeof __VLS_17) => any;
|
|
30
|
+
} & {
|
|
31
|
+
timelineAfter?: (props: typeof __VLS_23) => any;
|
|
32
|
+
} & {
|
|
33
|
+
volumeOffIcon?: (props: typeof __VLS_25) => any;
|
|
34
|
+
} & {
|
|
35
|
+
volumeOnIcon?: (props: typeof __VLS_30) => any;
|
|
36
|
+
} & {
|
|
37
|
+
fullscreenExitIcon?: (props: typeof __VLS_35) => any;
|
|
38
|
+
} & {
|
|
39
|
+
fullscreenEnterIcon?: (props: typeof __VLS_40) => any;
|
|
40
|
+
}>;
|
|
41
|
+
declare const __VLS_self: import("vue").DefineComponent<MagicPlayerControlsProps, {
|
|
42
|
+
IconPlay: typeof IconPlay;
|
|
43
|
+
IconPause: typeof IconPause;
|
|
44
|
+
IconVolumeOn: typeof IconVolumeOn;
|
|
45
|
+
IconVolumeOff: typeof IconVolumeOff;
|
|
46
|
+
IconFullscreenEnter: typeof IconFullscreenEnter;
|
|
47
|
+
IconFullscreenExit: typeof IconFullscreenExit;
|
|
48
|
+
mappedTransition: typeof mappedTransition;
|
|
49
|
+
playing: typeof playing;
|
|
50
|
+
waiting: typeof waiting;
|
|
51
|
+
muted: typeof muted;
|
|
52
|
+
touched: typeof touched;
|
|
53
|
+
controlsMouseEntered: typeof controlsMouseEntered;
|
|
54
|
+
isFullscreen: typeof isFullscreen;
|
|
55
|
+
popoverOffsetX: typeof popoverOffsetX;
|
|
56
|
+
seekedTime: typeof seekedTime;
|
|
57
|
+
play: typeof play;
|
|
58
|
+
pause: typeof pause;
|
|
59
|
+
mute: typeof mute;
|
|
60
|
+
unmute: typeof unmute;
|
|
61
|
+
enterFullscreen: typeof enterFullscreen;
|
|
62
|
+
exitFullscreen: typeof exitFullscreen;
|
|
63
|
+
onMouseenter: typeof onMouseenter;
|
|
64
|
+
onMouseleave: typeof onMouseleave;
|
|
65
|
+
idle: typeof idle;
|
|
66
|
+
hidden: typeof hidden;
|
|
67
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicPlayerControlsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
69
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
31
70
|
export default _default;
|
|
32
|
-
type
|
|
33
|
-
type __VLS_TypePropsToOption<T> = {
|
|
34
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
35
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
36
|
-
} : {
|
|
37
|
-
type: import('vue').PropType<T[K]>;
|
|
38
|
-
required: true;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
71
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
72
|
new (): {
|
|
43
73
|
$slots: S;
|
|
44
74
|
};
|