@maas/vue-equipment 0.39.0 → 0.39.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment/nuxt",
3
3
  "configKey": "vueEquipment",
4
- "version": "0.38.0",
4
+ "version": "0.39.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "unknown"
@@ -1,9 +1,21 @@
1
1
  <template>
2
2
  <div
3
3
  ref="playerRef"
4
- class="magic-player"
5
4
  @mouseenter="onMouseenter"
6
5
  @mouseleave="onMouseleave"
6
+ :class="[
7
+ 'magic-player',
8
+ {
9
+ '-fullscreen': isFullscreen,
10
+ '-touched': touched,
11
+ '-untouched': !touched,
12
+ '-playing': playing,
13
+ '-paused': !playing,
14
+ '-waiting': waiting,
15
+ '-loaded': loaded,
16
+ '-muted': muted,
17
+ },
18
+ ]"
7
19
  >
8
20
  <video
9
21
  ref="videoRef"
@@ -53,23 +65,24 @@ const videoRef = ref<HTMLVideoElement | undefined>(undefined)
53
65
 
54
66
  const isVisible = useElementVisibility(playerRef)
55
67
 
56
- const { playing, muted } = usePlayerMediaApi({
68
+ const { playing, waiting, muted } = usePlayerMediaApi({
57
69
  id: props.id,
58
70
  mediaRef: videoRef,
59
71
  })
60
72
 
61
- const { initialize, destroy } = usePlayerRuntime({
73
+ const { initialize, loaded, destroy } = usePlayerRuntime({
62
74
  id: props.id,
63
75
  mediaRef: videoRef,
64
76
  src: props.src,
65
77
  srcType: props.srcType,
66
78
  })
67
79
 
68
- const { onMouseenter, onMouseleave, play, pause } = usePlayerVideoApi({
69
- id: props.id,
70
- videoRef: videoRef,
71
- playerRef: playerRef,
72
- })
80
+ const { onMouseenter, onMouseleave, isFullscreen, touched, play, pause } =
81
+ usePlayerVideoApi({
82
+ id: props.id,
83
+ videoRef: videoRef,
84
+ playerRef: playerRef,
85
+ })
73
86
 
74
87
  function onWindowFocus() {
75
88
  if (isVisible.value && !playing.value && props.autoplay) {
@@ -108,5 +121,5 @@ onBeforeUnmount(() => {
108
121
  </script>
109
122
 
110
123
  <style>
111
- .magic-player{aspect-ratio:var(--magic-player-aspect-ratio,16/9);background:var(--magic-player-background,#000);height:var(--magic-player-height,auto);overflow:hidden;position:relative;width:100%}.magic-player__video{height:100%;inset:0;-o-object-fit:cover;object-fit:cover;position:absolute;width:100%}
124
+ .magic-player{aspect-ratio:var(--magic-player-aspect-ratio,16/9);background:var(--magic-player-background,#000);height:var(--magic-player-height,auto);overflow:hidden;position:relative;width:100%}.magic-player.-loaded{--magic-player-background:transparent}.magic-player__video{height:100%;inset:0;-o-object-fit:cover;object-fit:cover;position:absolute;width:100%}
112
125
  </style>
@@ -4,6 +4,7 @@
4
4
  transform: translate3d(0, 1rem, 0);
5
5
  }
6
6
  100% {
7
+ opacity: 1;
7
8
  transform: translate3d(0, 0, 0);
8
9
  }
9
10
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maas/vue-equipment",
3
3
  "description": "A magic collection of Vue composables, plugins, components and directives",
4
- "version": "0.39.0",
4
+ "version": "0.39.1",
5
5
  "author": "Robin Scholz <https://github.com/robinscholz>, Christoph Jeworutzki <https://github.com/ChristophJeworutzki>",
6
6
  "type": "module",
7
7
  "devDependencies": {
@@ -47,7 +47,7 @@
47
47
  "@maas/magic-timer": "^1.0.0",
48
48
  "@maas/vue-primitive": "^1.1.0",
49
49
  "@maas/wheel-gestures": "^1.0.0",
50
- "@nuxt/kit": "^3.14.159",
50
+ "@nuxt/kit": "^3.14.1592",
51
51
  "@vueuse/core": "^10.3.0",
52
52
  "@vueuse/integrations": "^10.3.0",
53
53
  "defu": "^6.1.2",
@@ -56,7 +56,7 @@
56
56
  "luxon": "^3.4.2",
57
57
  "mitt": "^3.0.1",
58
58
  "motion": "^10.16.2",
59
- "nuxt": "^3.14.159",
59
+ "nuxt": "^3.14.1592",
60
60
  "universal-cookie": "^7.1.0",
61
61
  "vue": "^3.5.3"
62
62
  },