@maas/vue-equipment 1.0.0-beta.6 → 1.0.0-beta.8
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/dist/composables/index.d.ts +5 -5
- package/dist/composables/index.js +14 -8
- package/dist/composables/index.js.map +1 -1
- package/dist/nuxt/module.json +1 -1
- package/dist/nuxt/module.mjs +2 -2
- package/dist/plugins/.turbo/turbo-lint.log +2 -2
- package/dist/plugins/MagicAccordion/demo/data/footer.json +1 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionContent.vue.d.ts +3 -3
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionProvider.vue.d.ts +2 -2
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue +15 -13
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionTrigger.vue.d.ts +6 -157
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue +2 -1
- package/dist/plugins/MagicAccordion/src/components/MagicAccordionView.vue.d.ts +4 -2
- package/dist/plugins/MagicAccordion/src/composables/private/useAccordionTrigger.d.ts +1 -1
- package/dist/plugins/MagicAccordion/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue +11 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandContent.vue.d.ts +32 -0
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue +0 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandItem.vue.d.ts +3 -8
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue +5 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandProvider.vue.d.ts +3 -87
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue +7 -7
- package/dist/plugins/MagicCommand/src/components/MagicCommandRenderer.vue.d.ts +1 -4
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue +6 -5
- package/dist/plugins/MagicCommand/src/components/MagicCommandTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicCommand/src/components/MagicCommandView.vue.d.ts +3 -3
- 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/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicCommand/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicCookie/src/components/MagicCookieItem.vue.d.ts +3 -3
- package/dist/plugins/MagicCookie/src/components/MagicCookieView.vue.d.ts +3 -3
- package/dist/plugins/MagicCookie/src/symbols/index.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue +10 -12
- package/dist/plugins/MagicDraggable/src/components/MagicDraggable.vue.d.ts +4 -25
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.d.ts +2 -2
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableDrag.mjs +4 -4
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableScrollLock.mjs +34 -14
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.d.ts +3 -3
- package/dist/plugins/MagicDraggable/src/composables/private/useDraggableSnap.mjs +12 -15
- package/dist/plugins/MagicDraggable/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +20 -21
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue.d.ts +188 -0
- 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/MagicMarquee/src/components/MagicMarquee.vue +15 -15
- package/dist/plugins/MagicMarquee/src/components/MagicMarquee.vue.d.ts +25 -0
- 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/MagicMenu/src/components/MagicMenuChannel.vue.d.ts +27 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue +3 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuContent.vue.d.ts +56 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue +5 -7
- package/dist/plugins/MagicMenu/src/components/MagicMenuFloat.vue.d.ts +53 -0
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue +1 -12
- package/dist/plugins/MagicMenu/src/components/MagicMenuItem.vue.d.ts +3 -8
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue +6 -6
- package/dist/plugins/MagicMenu/src/components/MagicMenuProvider.vue.d.ts +1 -85
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue +1 -1
- package/dist/plugins/MagicMenu/src/components/MagicMenuRemote.vue.d.ts +2 -2
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue +3 -4
- package/dist/plugins/MagicMenu/src/components/MagicMenuTrigger.vue.d.ts +3 -157
- package/dist/plugins/MagicMenu/src/components/MagicMenuView.vue.d.ts +3 -3
- package/dist/plugins/MagicMenu/src/composables/private/useMenuCallback.mjs +1 -1
- 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/useMenuTrigger.d.ts +1 -1
- package/dist/plugins/MagicMenu/src/symbols/index.d.ts +4 -4
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +6 -6
- package/dist/plugins/MagicModal/src/components/MagicModal.vue.d.ts +60 -0
- package/dist/plugins/MagicModal/src/composables/private/useModalDOM.mjs +34 -14
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue +13 -13
- package/dist/plugins/MagicNoise/src/components/MagicNoise.vue.d.ts +1 -5
- 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/MagicPlayer/src/components/MagicPlayerAudio.vue +14 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudio.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +29 -29
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue.d.ts +34 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerDisplayTime.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue +19 -8
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerMuxPopover.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerOverlay.vue.d.ts +35 -0
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerPoster.vue.d.ts +5 -5
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerProvider.vue.d.ts +6 -11
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerTimeline.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue +3 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideo.vue.d.ts +1 -4
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +23 -24
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue.d.ts +73 -0
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenEnter.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/FullscreenExit.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Pause.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Play.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOff.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/VolumeOn.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/components/icons/Waiting.vue.d.ts +1 -1
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.d.ts +2 -2
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerAudioApi.mjs +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +10 -10
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +15 -9
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.d.ts +13 -13
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerMediaApi.mjs +18 -11
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.d.ts +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerRuntime.mjs +3 -3
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.d.ts +6 -6
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerVideoApi.mjs +4 -4
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +20 -20
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue +17 -8
- package/dist/plugins/MagicScroll/src/components/MagicScrollCollision.vue.d.ts +4 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue +7 -7
- package/dist/plugins/MagicScroll/src/components/MagicScrollMotion.vue.d.ts +4 -10
- package/dist/plugins/MagicScroll/src/components/MagicScrollProvider.vue.d.ts +3 -3
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue +17 -9
- package/dist/plugins/MagicScroll/src/components/MagicScrollScene.vue.d.ts +4 -9
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.d.ts +2 -2
- package/dist/plugins/MagicScroll/src/composables/private/useCollisionDetection.mjs +3 -3
- package/dist/plugins/MagicScroll/src/composables/private/useScrollApi.mjs +8 -3
- package/dist/plugins/MagicScroll/src/symbols/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue +9 -10
- package/dist/plugins/MagicToast/src/components/MagicToastProvider.vue.d.ts +1 -59
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue +5 -8
- package/dist/plugins/MagicToast/src/components/MagicToastView.vue.d.ts +3 -8
- package/dist/plugins/MagicToast/src/composables/private/useToastDrag.mjs +22 -22
- package/dist/plugins/MagicToast/src/composables/private/useToastScrollLock.mjs +33 -15
- package/dist/plugins/MagicToast/src/types/index.d.ts +1 -1
- package/dist/plugins/MagicToast/src/utils/defaultOptions.mjs +1 -1
- package/dist/utils/index.d.ts +7 -3
- package/dist/utils/index.js +25 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -5,21 +5,16 @@ interface MagicPlayerProps {
|
|
|
5
5
|
options?: MagicPlayerOptions;
|
|
6
6
|
}
|
|
7
7
|
declare const mappedOptions: MagicPlayerOptions;
|
|
8
|
-
declare const
|
|
9
|
-
declare const
|
|
10
|
-
declare const
|
|
11
|
-
declare const onMouseenter: () => void, onMouseleave: () => void, isFullscreen: import("vue").Ref<boolean, boolean>, touched: import("vue").Ref<boolean, boolean>;
|
|
8
|
+
declare const playing: import("vue").ShallowRef<boolean, boolean>, waiting: import("vue").ShallowRef<boolean, boolean>, muted: import("vue").ShallowRef<boolean, boolean>;
|
|
9
|
+
declare const loaded: import("vue").ShallowRef<boolean, boolean>;
|
|
10
|
+
declare const onMouseenter: () => void, onMouseleave: () => void, isFullscreen: import("vue").Ref<boolean, boolean>, touched: import("vue").ShallowRef<boolean, boolean>;
|
|
12
11
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
13
|
-
declare var
|
|
12
|
+
declare var __VLS_1: {};
|
|
14
13
|
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
15
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
16
15
|
}>;
|
|
17
|
-
type __VLS_TemplateRefs = {
|
|
18
|
-
playerRef: typeof __VLS_nativeElements['div'];
|
|
19
|
-
};
|
|
20
16
|
declare const __VLS_self: import("vue").DefineComponent<MagicPlayerProps, {
|
|
21
17
|
mappedOptions: typeof mappedOptions;
|
|
22
|
-
playerRef: typeof playerRef;
|
|
23
18
|
playing: typeof playing;
|
|
24
19
|
waiting: typeof waiting;
|
|
25
20
|
muted: typeof muted;
|
|
@@ -29,7 +24,7 @@ declare const __VLS_self: import("vue").DefineComponent<MagicPlayerProps, {
|
|
|
29
24
|
isFullscreen: typeof isFullscreen;
|
|
30
25
|
touched: typeof touched;
|
|
31
26
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
-
declare const __VLS_component: import("vue").DefineComponent<MagicPlayerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false,
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<MagicPlayerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
28
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
34
29
|
export default _default;
|
|
35
30
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { defineComponent as _defineComponent } from "vue";
|
|
3
3
|
import { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
4
4
|
const _hoisted_1 = ["preload", "loop", "muted"];
|
|
5
|
-
import {
|
|
5
|
+
import { useTemplateRef, watch, onMounted, inject, onBeforeUnmount } from "vue";
|
|
6
6
|
import {
|
|
7
7
|
useElementVisibility,
|
|
8
8
|
useEventListener,
|
|
@@ -23,7 +23,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
23
23
|
if (!injectedOptions) {
|
|
24
24
|
throw new Error("MagicPlayerVideo must be used within a MagicPlayerProvider");
|
|
25
25
|
}
|
|
26
|
-
const elRef =
|
|
26
|
+
const elRef = useTemplateRef("el");
|
|
27
27
|
const isVisible = useElementVisibility(elRef);
|
|
28
28
|
const { initialize, destroy } = usePlayerRuntime({
|
|
29
29
|
id: injectedId,
|
|
@@ -69,8 +69,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
69
69
|
});
|
|
70
70
|
return (_ctx, _cache) => {
|
|
71
71
|
return _openBlock(), _createElementBlock("video", {
|
|
72
|
-
|
|
73
|
-
ref: elRef,
|
|
72
|
+
ref: "el",
|
|
74
73
|
class: "magic-player-video",
|
|
75
74
|
playsinline: "",
|
|
76
75
|
disablePictureInPicture: "",
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
elRef: typeof __VLS_nativeElements['video'];
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, __VLS_TemplateRefs, HTMLVideoElement>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
2
|
export default _default;
|
|
@@ -3,11 +3,19 @@ import { defineComponent as _defineComponent } from "vue";
|
|
|
3
3
|
import { unref as _unref, renderSlot as _renderSlot, vShow as _vShow, normalizeStyle as _normalizeStyle, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, Transition as _Transition, withCtx as _withCtx } from "vue";
|
|
4
4
|
const _hoisted_1 = ["data-fullscreen", "data-touched", "data-playing", "data-paused", "data-waiting", "data-muted", "data-idle", "data-hover", "data-standalone"];
|
|
5
5
|
const _hoisted_2 = { class: "magic-player-video-controls__bar" };
|
|
6
|
-
const _hoisted_3 = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const _hoisted_3 = {
|
|
7
|
+
ref: "bar",
|
|
8
|
+
class: "magic-player-video-controls__bar--inner"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_4 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
11
|
+
const _hoisted_5 = { class: "magic-player-video-controls__item -grow" };
|
|
12
|
+
const _hoisted_6 = {
|
|
13
|
+
ref: "track",
|
|
14
|
+
class: "magic-player-video-controls__timeline"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_7 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
17
|
+
const _hoisted_8 = { class: "magic-player-video-controls__item -shrink-0" };
|
|
18
|
+
import { computed, inject, provide, useTemplateRef } from "vue";
|
|
11
19
|
import { useIdle } from "@vueuse/core";
|
|
12
20
|
import IconPlay from "./icons/Play.vue";
|
|
13
21
|
import IconPause from "./icons/Pause.vue";
|
|
@@ -40,9 +48,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
40
48
|
const mappedTransition = computed(
|
|
41
49
|
() => __props.transition ?? injectedOptions?.transition?.videoControls
|
|
42
50
|
);
|
|
43
|
-
const barRef =
|
|
44
|
-
const trackRef =
|
|
45
|
-
const popoverRef =
|
|
51
|
+
const barRef = useTemplateRef("bar");
|
|
52
|
+
const trackRef = useTemplateRef("track");
|
|
53
|
+
const popoverRef = useTemplateRef("popover");
|
|
46
54
|
const { playing, waiting, muted } = usePlayerMediaApi({
|
|
47
55
|
id: mappedId.value
|
|
48
56
|
});
|
|
@@ -106,8 +114,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
106
114
|
"div",
|
|
107
115
|
{
|
|
108
116
|
key: 0,
|
|
109
|
-
|
|
110
|
-
ref: popoverRef,
|
|
117
|
+
ref: "popover",
|
|
111
118
|
class: "magic-player-video-controls__popover",
|
|
112
119
|
style: _normalizeStyle({ marginLeft: `${_unref(popoverOffsetX)}%` })
|
|
113
120
|
},
|
|
@@ -121,13 +128,9 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
121
128
|
]) : _createCommentVNode("v-if", true),
|
|
122
129
|
_createElementVNode(
|
|
123
130
|
"div",
|
|
124
|
-
|
|
125
|
-
ref_key: "barRef",
|
|
126
|
-
ref: barRef,
|
|
127
|
-
class: "magic-player-video-controls__bar--inner"
|
|
128
|
-
},
|
|
131
|
+
_hoisted_3,
|
|
129
132
|
[
|
|
130
|
-
_createElementVNode("div",
|
|
133
|
+
_createElementVNode("div", _hoisted_4, [
|
|
131
134
|
!_unref(playing) ? (_openBlock(), _createElementBlock("button", {
|
|
132
135
|
key: 0,
|
|
133
136
|
onClick: _cache[0] || (_cache[0] = //@ts-ignore
|
|
@@ -146,15 +149,11 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
146
149
|
])
|
|
147
150
|
]))
|
|
148
151
|
]),
|
|
149
|
-
_createElementVNode("div",
|
|
152
|
+
_createElementVNode("div", _hoisted_5, [
|
|
150
153
|
_renderSlot(_ctx.$slots, "timelineBefore"),
|
|
151
154
|
_createElementVNode(
|
|
152
155
|
"div",
|
|
153
|
-
|
|
154
|
-
ref_key: "trackRef",
|
|
155
|
-
ref: trackRef,
|
|
156
|
-
class: "magic-player-video-controls__timeline"
|
|
157
|
-
},
|
|
156
|
+
_hoisted_6,
|
|
158
157
|
[
|
|
159
158
|
_createVNode(_component_magic_player_timeline)
|
|
160
159
|
],
|
|
@@ -163,7 +162,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
163
162
|
),
|
|
164
163
|
_renderSlot(_ctx.$slots, "timelineAfter")
|
|
165
164
|
]),
|
|
166
|
-
_createElementVNode("div",
|
|
165
|
+
_createElementVNode("div", _hoisted_7, [
|
|
167
166
|
_unref(muted) ? (_openBlock(), _createElementBlock("button", {
|
|
168
167
|
key: 0,
|
|
169
168
|
onClick: _cache[2] || (_cache[2] = //@ts-ignore
|
|
@@ -182,7 +181,7 @@ export default /* @__PURE__ */ _defineComponent({
|
|
|
182
181
|
])
|
|
183
182
|
]))
|
|
184
183
|
]),
|
|
185
|
-
_createElementVNode("div",
|
|
184
|
+
_createElementVNode("div", _hoisted_8, [
|
|
186
185
|
_unref(isFullscreen) ? (_openBlock(), _createElementBlock("button", {
|
|
187
186
|
key: 0,
|
|
188
187
|
onClick: _cache[4] || (_cache[4] = //@ts-ignore
|
|
@@ -0,0 +1,73 @@
|
|
|
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';
|
|
7
|
+
import '@maas/vue-equipment/utils/css/animations/fade-up-in.css';
|
|
8
|
+
import '@maas/vue-equipment/utils/css/animations/fade-up-out.css';
|
|
9
|
+
interface MagicPlayerControlsProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
standalone?: boolean;
|
|
12
|
+
transition?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const mappedTransition: import("vue").ComputedRef<string | undefined>;
|
|
15
|
+
declare const playing: import("vue").ShallowRef<boolean, boolean>, waiting: import("vue").ShallowRef<boolean, boolean>, muted: import("vue").ShallowRef<boolean, boolean>;
|
|
16
|
+
declare const touched: import("vue").ShallowRef<boolean, boolean>, mouseEntered: import("vue").ShallowRef<boolean, boolean>, isFullscreen: import("vue").Ref<boolean, boolean>, play: () => void, pause: () => void, mute: () => void, unmute: () => void, enterFullscreen: () => void, exitFullscreen: () => void;
|
|
17
|
+
declare const popoverOffsetX: import("vue").ShallowRef<number, number>, seekedTime: import("vue").ShallowRef<number, number>;
|
|
18
|
+
declare const idle: import("vue").Ref<boolean, 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
|
+
mouseEntered: typeof mouseEntered;
|
|
54
|
+
isFullscreen: typeof isFullscreen;
|
|
55
|
+
play: typeof play;
|
|
56
|
+
pause: typeof pause;
|
|
57
|
+
mute: typeof mute;
|
|
58
|
+
unmute: typeof unmute;
|
|
59
|
+
enterFullscreen: typeof enterFullscreen;
|
|
60
|
+
exitFullscreen: typeof exitFullscreen;
|
|
61
|
+
popoverOffsetX: typeof popoverOffsetX;
|
|
62
|
+
seekedTime: typeof seekedTime;
|
|
63
|
+
idle: typeof idle;
|
|
64
|
+
hidden: typeof hidden;
|
|
65
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MagicPlayerControlsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
66
|
+
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>;
|
|
67
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
68
|
+
export default _default;
|
|
69
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -3,8 +3,8 @@ export type UsePlayerAudioApiArgs = {
|
|
|
3
3
|
id: MaybeRef<string>;
|
|
4
4
|
};
|
|
5
5
|
export declare function usePlayerAudioApi(args: UsePlayerAudioApiArgs): {
|
|
6
|
-
mouseEntered: import("vue").
|
|
7
|
-
touched: import("vue").
|
|
6
|
+
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
7
|
+
touched: import("vue").ShallowRef<boolean, boolean>;
|
|
8
8
|
play: () => void;
|
|
9
9
|
pause: () => void;
|
|
10
10
|
togglePlay: () => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { shallowRef, watch, toValue } from "vue";
|
|
2
2
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
3
3
|
import { usePlayerMediaApi } from "./usePlayerMediaApi.mjs";
|
|
4
4
|
export function usePlayerAudioApi(args) {
|
|
5
5
|
const { id } = args;
|
|
6
6
|
const { playing, currentTime, muted } = usePlayerMediaApi({ id });
|
|
7
|
-
const touched =
|
|
8
|
-
const mouseEntered =
|
|
7
|
+
const touched = shallowRef(false);
|
|
8
|
+
const mouseEntered = shallowRef(false);
|
|
9
9
|
function play() {
|
|
10
10
|
playing.value = true;
|
|
11
11
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { type MaybeRef, type Ref } from 'vue';
|
|
2
2
|
export type UsePlayerControlsApiArgs = {
|
|
3
3
|
id: MaybeRef<string>;
|
|
4
|
-
barRef?: Ref<HTMLDivElement |
|
|
5
|
-
trackRef?: Ref<HTMLDivElement |
|
|
6
|
-
popoverRef?: Ref<HTMLDivElement |
|
|
4
|
+
barRef?: Ref<HTMLDivElement | null>;
|
|
5
|
+
trackRef?: Ref<HTMLDivElement | null>;
|
|
6
|
+
popoverRef?: Ref<HTMLDivElement | null>;
|
|
7
7
|
};
|
|
8
8
|
export declare function usePlayerControlsApi(args: UsePlayerControlsApiArgs): {
|
|
9
|
-
mouseEntered:
|
|
10
|
-
dragging:
|
|
11
|
-
seekedTime:
|
|
12
|
-
seekedPercentage:
|
|
13
|
-
scrubbedPercentage:
|
|
9
|
+
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
10
|
+
dragging: import("vue").ShallowRef<boolean, boolean>;
|
|
11
|
+
seekedTime: import("vue").ShallowRef<number, number>;
|
|
12
|
+
seekedPercentage: import("vue").ShallowRef<number, number>;
|
|
13
|
+
scrubbedPercentage: import("vue").ShallowRef<number, number>;
|
|
14
14
|
bufferedPercentage: import("vue").ComputedRef<number>;
|
|
15
|
-
thumbPercentage:
|
|
16
|
-
popoverOffsetX:
|
|
15
|
+
thumbPercentage: import("vue").ShallowRef<number, number>;
|
|
16
|
+
popoverOffsetX: import("vue").ShallowRef<number, number>;
|
|
17
17
|
onMouseenter: () => void;
|
|
18
18
|
onMouseleave: () => void;
|
|
19
19
|
onPointerdown: (e: MouseEvent | TouchEvent) => void;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
shallowRef,
|
|
4
|
+
computed,
|
|
5
|
+
watch,
|
|
6
|
+
toValue
|
|
7
|
+
} from "vue";
|
|
2
8
|
import {
|
|
3
9
|
useResizeObserver,
|
|
4
10
|
useEventListener,
|
|
@@ -9,20 +15,20 @@ import { usePlayerMediaApi } from "./usePlayerMediaApi.mjs";
|
|
|
9
15
|
import { usePlayerVideoApi } from "./usePlayerVideoApi.mjs";
|
|
10
16
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
11
17
|
export function usePlayerControlsApi(args) {
|
|
12
|
-
const resumePlay =
|
|
18
|
+
const resumePlay = shallowRef(false);
|
|
13
19
|
const barRect = ref(void 0);
|
|
14
20
|
const trackRect = ref(void 0);
|
|
15
21
|
const popoverRect = ref(void 0);
|
|
16
22
|
const { id, trackRef, barRef, popoverRef } = args;
|
|
17
23
|
const { buffered, duration, playing, currentTime } = usePlayerMediaApi({ id });
|
|
18
24
|
const { play, pause, seek } = usePlayerVideoApi({ id });
|
|
19
|
-
const dragging =
|
|
20
|
-
const mouseEntered =
|
|
21
|
-
const seekedTime =
|
|
22
|
-
const seekedPercentage =
|
|
23
|
-
const scrubbedPercentage =
|
|
24
|
-
const thumbPercentage =
|
|
25
|
-
const popoverOffsetX =
|
|
25
|
+
const dragging = shallowRef(false);
|
|
26
|
+
const mouseEntered = shallowRef(false);
|
|
27
|
+
const seekedTime = shallowRef(0);
|
|
28
|
+
const seekedPercentage = shallowRef(0);
|
|
29
|
+
const scrubbedPercentage = shallowRef(0);
|
|
30
|
+
const thumbPercentage = shallowRef(0);
|
|
31
|
+
const popoverOffsetX = shallowRef(0);
|
|
26
32
|
const bufferedPercentage = computed(() => {
|
|
27
33
|
if (!buffered) return 0;
|
|
28
34
|
const endBuffer = buffered.value?.length > 0 ? buffered.value[0][1] : 0;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
1
|
+
import { type Ref, type MaybeRef } from 'vue';
|
|
2
2
|
import type { Buffered } from '../../types/index.js';
|
|
3
3
|
export type UsePlayerMediaApiArgs = {
|
|
4
4
|
id: MaybeRef<string>;
|
|
5
|
-
mediaRef?:
|
|
5
|
+
mediaRef?: Ref<HTMLMediaElement | null>;
|
|
6
6
|
};
|
|
7
7
|
export declare function usePlayerMediaApi(args: UsePlayerMediaApiArgs): {
|
|
8
|
-
currentTime: import("vue").
|
|
8
|
+
currentTime: import("vue").ShallowRef<number, number>;
|
|
9
9
|
remainingTime: import("vue").ComputedRef<number>;
|
|
10
|
-
duration: import("vue").
|
|
11
|
-
seeking: import("vue").
|
|
12
|
-
volume: import("vue").
|
|
13
|
-
rate: import("vue").
|
|
14
|
-
waiting: import("vue").
|
|
15
|
-
ended: import("vue").
|
|
16
|
-
playing: import("vue").
|
|
17
|
-
stalled: import("vue").
|
|
18
|
-
buffered:
|
|
19
|
-
muted: import("vue").
|
|
10
|
+
duration: import("vue").ShallowRef<number, number>;
|
|
11
|
+
seeking: import("vue").ShallowRef<boolean, boolean>;
|
|
12
|
+
volume: import("vue").ShallowRef<number, number>;
|
|
13
|
+
rate: import("vue").ShallowRef<number, number>;
|
|
14
|
+
waiting: import("vue").ShallowRef<boolean, boolean>;
|
|
15
|
+
ended: import("vue").ShallowRef<boolean, boolean>;
|
|
16
|
+
playing: import("vue").ShallowRef<boolean, boolean>;
|
|
17
|
+
stalled: import("vue").ShallowRef<boolean, boolean>;
|
|
18
|
+
buffered: Ref<[number, number][], Buffered | [number, number][]>;
|
|
19
|
+
muted: import("vue").ShallowRef<boolean, boolean>;
|
|
20
20
|
};
|
|
21
21
|
export type UsePlayerMediaApiReturn = ReturnType<typeof usePlayerMediaApi>;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ref,
|
|
3
|
+
shallowRef,
|
|
4
|
+
computed,
|
|
5
|
+
watch,
|
|
6
|
+
unref,
|
|
7
|
+
toValue
|
|
8
|
+
} from "vue";
|
|
2
9
|
import { useEventListener, watchIgnorable } from "@vueuse/core";
|
|
3
10
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
4
11
|
export function usePlayerMediaApi(args) {
|
|
5
|
-
const currentTime =
|
|
6
|
-
const duration =
|
|
7
|
-
const seeking =
|
|
8
|
-
const volume =
|
|
9
|
-
const rate =
|
|
10
|
-
const waiting =
|
|
11
|
-
const ended =
|
|
12
|
-
const playing =
|
|
13
|
-
const stalled =
|
|
12
|
+
const currentTime = shallowRef(0);
|
|
13
|
+
const duration = shallowRef(0);
|
|
14
|
+
const seeking = shallowRef(false);
|
|
15
|
+
const volume = shallowRef(1);
|
|
16
|
+
const rate = shallowRef(1);
|
|
17
|
+
const waiting = shallowRef(false);
|
|
18
|
+
const ended = shallowRef(false);
|
|
19
|
+
const playing = shallowRef(false);
|
|
20
|
+
const stalled = shallowRef(false);
|
|
14
21
|
const buffered = ref([]);
|
|
15
|
-
const muted =
|
|
22
|
+
const muted = shallowRef(false);
|
|
16
23
|
const { mediaRef, id } = args;
|
|
17
24
|
const remainingTime = computed(() => duration.value - currentTime.value);
|
|
18
25
|
function timeRangeToArray(timeRanges) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
1
|
+
import { type MaybeRef, type Ref } from 'vue';
|
|
2
2
|
import type { MagicPlayerOptions } from '../../types/index.js';
|
|
3
3
|
export type UsePlayerRuntimeArgs = {
|
|
4
4
|
id: MaybeRef<string>;
|
|
5
|
-
mediaRef?:
|
|
5
|
+
mediaRef?: Ref<HTMLVideoElement | HTMLAudioElement | null>;
|
|
6
6
|
srcType?: MagicPlayerOptions['srcType'];
|
|
7
7
|
src?: string;
|
|
8
8
|
};
|
|
9
9
|
export declare function usePlayerRuntime(args: UsePlayerRuntimeArgs): {
|
|
10
|
-
loaded: import("vue").
|
|
10
|
+
loaded: import("vue").ShallowRef<boolean, boolean>;
|
|
11
11
|
initialize: () => void;
|
|
12
12
|
destroy: () => void;
|
|
13
13
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { shallowRef, watch, toValue } from "vue";
|
|
2
2
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
3
3
|
import { useEventListener } from "@vueuse/core";
|
|
4
4
|
export function usePlayerRuntime(args) {
|
|
5
5
|
let hls;
|
|
6
|
-
const loaded =
|
|
7
|
-
const defferedLoading =
|
|
6
|
+
const loaded = shallowRef(false);
|
|
7
|
+
const defferedLoading = shallowRef(false);
|
|
8
8
|
const { mediaRef, srcType, src } = args;
|
|
9
9
|
function useNative() {
|
|
10
10
|
const el = toValue(mediaRef);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { type MaybeRef } from 'vue';
|
|
1
|
+
import { type MaybeRef, type Ref } from 'vue';
|
|
2
2
|
export type UsePlayerVideoApiArgs = {
|
|
3
3
|
id: MaybeRef<string>;
|
|
4
|
-
playerRef?:
|
|
5
|
-
videoRef?:
|
|
4
|
+
playerRef?: Ref<HTMLElement | null>;
|
|
5
|
+
videoRef?: Ref<HTMLVideoElement | null>;
|
|
6
6
|
};
|
|
7
7
|
export declare function usePlayerVideoApi(args: UsePlayerVideoApiArgs): {
|
|
8
|
-
mouseEntered: import("vue").
|
|
9
|
-
isFullscreen:
|
|
10
|
-
touched: import("vue").
|
|
8
|
+
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
9
|
+
isFullscreen: Ref<boolean, boolean>;
|
|
10
|
+
touched: import("vue").ShallowRef<boolean, boolean>;
|
|
11
11
|
play: () => void;
|
|
12
12
|
pause: () => void;
|
|
13
13
|
togglePlay: () => void;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ref, watch, toValue } from "vue";
|
|
1
|
+
import { ref, shallowRef, watch, toValue } from "vue";
|
|
2
2
|
import { useFullscreen } from "@vueuse/core";
|
|
3
3
|
import { isIOS } from "@maas/vue-equipment/utils";
|
|
4
4
|
import { usePlayerStateEmitter } from "./usePlayerStateEmitter.mjs";
|
|
5
5
|
import { usePlayerMediaApi } from "./usePlayerMediaApi.mjs";
|
|
6
6
|
export function usePlayerVideoApi(args) {
|
|
7
7
|
const { id, playerRef, videoRef } = args;
|
|
8
|
-
const fullscreenTarget = ref(
|
|
8
|
+
const fullscreenTarget = ref(null);
|
|
9
9
|
const { playing, currentTime, muted } = usePlayerMediaApi({ id });
|
|
10
|
-
const touched =
|
|
11
|
-
const mouseEntered =
|
|
10
|
+
const touched = shallowRef(false);
|
|
11
|
+
const mouseEntered = shallowRef(false);
|
|
12
12
|
const { isFullscreen, enter, exit } = useFullscreen(fullscreenTarget);
|
|
13
13
|
function play() {
|
|
14
14
|
playing.value = true;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { MaybeRef } from 'vue';
|
|
2
2
|
export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
3
3
|
mediaApi: {
|
|
4
|
-
currentTime: import("vue").
|
|
4
|
+
currentTime: import("vue").ShallowRef<number, number>;
|
|
5
5
|
remainingTime: import("vue").ComputedRef<number>;
|
|
6
|
-
duration: import("vue").
|
|
7
|
-
seeking: import("vue").
|
|
8
|
-
volume: import("vue").
|
|
9
|
-
rate: import("vue").
|
|
10
|
-
waiting: import("vue").
|
|
11
|
-
ended: import("vue").
|
|
12
|
-
playing: import("vue").
|
|
13
|
-
stalled: import("vue").
|
|
6
|
+
duration: import("vue").ShallowRef<number, number>;
|
|
7
|
+
seeking: import("vue").ShallowRef<boolean, boolean>;
|
|
8
|
+
volume: import("vue").ShallowRef<number, number>;
|
|
9
|
+
rate: import("vue").ShallowRef<number, number>;
|
|
10
|
+
waiting: import("vue").ShallowRef<boolean, boolean>;
|
|
11
|
+
ended: import("vue").ShallowRef<boolean, boolean>;
|
|
12
|
+
playing: import("vue").ShallowRef<boolean, boolean>;
|
|
13
|
+
stalled: import("vue").ShallowRef<boolean, boolean>;
|
|
14
14
|
buffered: import("vue").Ref<[number, number][], import("../types").Buffered | [number, number][]>;
|
|
15
|
-
muted: import("vue").
|
|
15
|
+
muted: import("vue").ShallowRef<boolean, boolean>;
|
|
16
16
|
};
|
|
17
17
|
videoApi: {
|
|
18
|
-
mouseEntered: import("vue").
|
|
18
|
+
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
19
19
|
isFullscreen: import("vue").Ref<boolean, boolean>;
|
|
20
|
-
touched: import("vue").
|
|
20
|
+
touched: import("vue").ShallowRef<boolean, boolean>;
|
|
21
21
|
play: () => void;
|
|
22
22
|
pause: () => void;
|
|
23
23
|
togglePlay: () => void;
|
|
@@ -30,14 +30,14 @@ export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
|
30
30
|
onMouseleave: () => void;
|
|
31
31
|
};
|
|
32
32
|
controlsApi: {
|
|
33
|
-
mouseEntered: import("vue").
|
|
34
|
-
dragging: import("vue").
|
|
35
|
-
seekedTime: import("vue").
|
|
36
|
-
seekedPercentage: import("vue").
|
|
37
|
-
scrubbedPercentage: import("vue").
|
|
33
|
+
mouseEntered: import("vue").ShallowRef<boolean, boolean>;
|
|
34
|
+
dragging: import("vue").ShallowRef<boolean, boolean>;
|
|
35
|
+
seekedTime: import("vue").ShallowRef<number, number>;
|
|
36
|
+
seekedPercentage: import("vue").ShallowRef<number, number>;
|
|
37
|
+
scrubbedPercentage: import("vue").ShallowRef<number, number>;
|
|
38
38
|
bufferedPercentage: import("vue").ComputedRef<number>;
|
|
39
|
-
thumbPercentage: import("vue").
|
|
40
|
-
popoverOffsetX: import("vue").
|
|
39
|
+
thumbPercentage: import("vue").ShallowRef<number, number>;
|
|
40
|
+
popoverOffsetX: import("vue").ShallowRef<number, number>;
|
|
41
41
|
onMouseenter: () => void;
|
|
42
42
|
onMouseleave: () => void;
|
|
43
43
|
onPointerdown: (e: MouseEvent | TouchEvent) => void;
|
|
@@ -66,7 +66,7 @@ export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
|
66
66
|
} | undefined>;
|
|
67
67
|
};
|
|
68
68
|
playerRuntime: {
|
|
69
|
-
loaded: import("vue").
|
|
69
|
+
loaded: import("vue").ShallowRef<boolean, boolean>;
|
|
70
70
|
initialize: () => void;
|
|
71
71
|
destroy: () => void;
|
|
72
72
|
};
|