@maas/vue-equipment 1.0.0-beta.29 → 1.0.0-beta.30
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/nuxt/module.json +1 -1
- package/dist/plugins/MagicDrawer/src/components/MagicDrawer.vue +4 -6
- package/dist/plugins/MagicModal/src/components/MagicModal.vue +4 -6
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerAudioControls.vue +12 -2
- package/dist/plugins/MagicPlayer/src/components/MagicPlayerVideoControls.vue +12 -2
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.d.ts +1 -0
- package/dist/plugins/MagicPlayer/src/composables/private/usePlayerControlsApi.mjs +13 -5
- package/dist/plugins/MagicPlayer/src/composables/useMagicPlayer.d.ts +1 -0
- package/package.json +1 -1
package/dist/nuxt/module.json
CHANGED
|
@@ -253,12 +253,10 @@ function saveOvershoot() {
|
|
|
253
253
|
overshoot.value = convertToPixels(overshootVar) || 0;
|
|
254
254
|
}
|
|
255
255
|
if (mappedOptions.keyListener.close) {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
});
|
|
261
|
-
}
|
|
256
|
+
onKeyStroke(mappedOptions.keyListener.close, (e) => {
|
|
257
|
+
close();
|
|
258
|
+
e.preventDefault();
|
|
259
|
+
});
|
|
262
260
|
}
|
|
263
261
|
watch(isActive, async (value) => {
|
|
264
262
|
if (value) {
|
|
@@ -122,12 +122,10 @@ function onClose() {
|
|
|
122
122
|
innerActive.value = false;
|
|
123
123
|
}
|
|
124
124
|
if (mappedOptions.keyListener?.close) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
});
|
|
130
|
-
}
|
|
125
|
+
onKeyStroke(mappedOptions.keyListener.close, (e) => {
|
|
126
|
+
close();
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
});
|
|
131
129
|
}
|
|
132
130
|
watch(isActive, async (value) => {
|
|
133
131
|
if (value) {
|
|
@@ -40,7 +40,11 @@
|
|
|
40
40
|
class="magic-player-audio-controls__item -grow"
|
|
41
41
|
data-slot="timeline"
|
|
42
42
|
>
|
|
43
|
-
<div
|
|
43
|
+
<div
|
|
44
|
+
ref="track"
|
|
45
|
+
class="magic-player-audio-controls__timeline"
|
|
46
|
+
@mouseleave="onMouseleaveTimeline"
|
|
47
|
+
>
|
|
44
48
|
<magic-player-timeline />
|
|
45
49
|
</div>
|
|
46
50
|
</div>
|
|
@@ -92,7 +96,13 @@ const trackRef = useTemplateRef("track");
|
|
|
92
96
|
const { play, pause } = usePlayerAudioApi({
|
|
93
97
|
id: mappedInstanceId.value
|
|
94
98
|
});
|
|
95
|
-
const {
|
|
99
|
+
const {
|
|
100
|
+
initialize,
|
|
101
|
+
destroy,
|
|
102
|
+
onMouseenter,
|
|
103
|
+
onMouseleave,
|
|
104
|
+
onMouseleaveTimeline
|
|
105
|
+
} = usePlayerControlsApi({
|
|
96
106
|
id: mappedInstanceId.value,
|
|
97
107
|
barRef,
|
|
98
108
|
trackRef
|
|
@@ -44,7 +44,11 @@
|
|
|
44
44
|
</div>
|
|
45
45
|
<div class="magic-player-video-controls__item -grow">
|
|
46
46
|
<slot name="timelineBefore" />
|
|
47
|
-
<div
|
|
47
|
+
<div
|
|
48
|
+
ref="track"
|
|
49
|
+
class="magic-player-video-controls__timeline"
|
|
50
|
+
@mouseleave="onMouseleaveTimeline"
|
|
51
|
+
>
|
|
48
52
|
<magic-player-timeline />
|
|
49
53
|
</div>
|
|
50
54
|
<slot name="timelineAfter" />
|
|
@@ -148,7 +152,13 @@ const {
|
|
|
148
152
|
dragging
|
|
149
153
|
} = toRefs(state);
|
|
150
154
|
const { play, pause, mute, unmute, enterFullscreen, exitFullscreen } = usePlayerVideoApi({ id: mappedInstanceId.value });
|
|
151
|
-
const {
|
|
155
|
+
const {
|
|
156
|
+
initialize,
|
|
157
|
+
destroy,
|
|
158
|
+
onMouseenter,
|
|
159
|
+
onMouseleave,
|
|
160
|
+
onMouseleaveTimeline
|
|
161
|
+
} = usePlayerControlsApi({
|
|
152
162
|
id: mappedInstanceId.value,
|
|
153
163
|
barRef,
|
|
154
164
|
trackRef,
|
|
@@ -11,6 +11,7 @@ export declare function usePlayerControlsApi(args: UsePlayerControlsApiArgs): {
|
|
|
11
11
|
bufferedPercentage: import("vue").ComputedRef<number>;
|
|
12
12
|
onMouseenter: () => void;
|
|
13
13
|
onMouseleave: () => void;
|
|
14
|
+
onMouseleaveTimeline: () => void;
|
|
14
15
|
onPointerdown: (e: PointerEvent) => void;
|
|
15
16
|
onPointermove: (e: PointerEvent) => void;
|
|
16
17
|
};
|
|
@@ -99,6 +99,11 @@ export function usePlayerControlsApi(args) {
|
|
|
99
99
|
}
|
|
100
100
|
getPopoverOffsetX();
|
|
101
101
|
}
|
|
102
|
+
function resetTimelineState() {
|
|
103
|
+
seekedTime.value = null;
|
|
104
|
+
seekedPercentage.value = 0;
|
|
105
|
+
popoverOffsetX.value = null;
|
|
106
|
+
}
|
|
102
107
|
function resetStateAndListeners() {
|
|
103
108
|
dragging.value = false;
|
|
104
109
|
touched.value = false;
|
|
@@ -108,6 +113,7 @@ export function usePlayerControlsApi(args) {
|
|
|
108
113
|
}
|
|
109
114
|
function onPointerup(e) {
|
|
110
115
|
resetStateAndListeners();
|
|
116
|
+
resetTimelineState();
|
|
111
117
|
guardedReleasePointerCapture({ event: e, element: barRef?.value });
|
|
112
118
|
if (resumePlay.value) {
|
|
113
119
|
play();
|
|
@@ -150,11 +156,12 @@ export function usePlayerControlsApi(args) {
|
|
|
150
156
|
function onMouseleave() {
|
|
151
157
|
controlsMouseEntered.value = false;
|
|
152
158
|
if (!dragging.value) {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
resetTimelineState();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function onMouseleaveTimeline() {
|
|
163
|
+
if (!dragging.value) {
|
|
164
|
+
resetTimelineState();
|
|
158
165
|
}
|
|
159
166
|
}
|
|
160
167
|
let watchTrack = null;
|
|
@@ -210,6 +217,7 @@ export function usePlayerControlsApi(args) {
|
|
|
210
217
|
bufferedPercentage,
|
|
211
218
|
onMouseenter,
|
|
212
219
|
onMouseleave,
|
|
220
|
+
onMouseleaveTimeline,
|
|
213
221
|
onPointerdown,
|
|
214
222
|
onPointermove
|
|
215
223
|
};
|
|
@@ -47,6 +47,7 @@ export declare function useMagicPlayer(id: MaybeRef<string>): {
|
|
|
47
47
|
bufferedPercentage: import("vue").ComputedRef<number>;
|
|
48
48
|
onMouseenter: () => void;
|
|
49
49
|
onMouseleave: () => void;
|
|
50
|
+
onMouseleaveTimeline: () => void;
|
|
50
51
|
onPointerdown: (e: PointerEvent) => void;
|
|
51
52
|
onPointermove: (e: PointerEvent) => void;
|
|
52
53
|
};
|