@grfzhl/vue-hls-player 1.0.18 → 1.0.19

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.
@@ -68,7 +68,7 @@
68
68
  </template>
69
69
 
70
70
  <script setup>
71
- import { onMounted, onUpdated, ref, onUnmounted, computed, watch } from 'vue'
71
+ import { onMounted, onUpdated, ref, onUnmounted, computed, watch, toRef } from 'vue'
72
72
  import Hls from 'hls.js'
73
73
  import 'player.style/sutro';
74
74
  import SubtitleBlock from './SubtitleBlock.vue';
@@ -139,6 +139,8 @@ const orientation = ref(null)
139
139
  const autoHideIntroTitle = ref(false);
140
140
  const initialPlayButton = ref(false);
141
141
  const hideInitialPlayButton = ref(false)
142
+ const link = toRef(props, 'link');
143
+ const previewImageLink = toRef(props, 'previewImageLink');
142
144
 
143
145
  const videoElement = defineModel()
144
146
 
@@ -26,13 +26,13 @@
26
26
 
27
27
  <script setup>
28
28
  import BasePlayer from './BasePlayer.vue'
29
- import { ref } from 'vue'
29
+ import { ref, toRef } from 'vue'
30
30
 
31
31
  const emit = defineEmits(['pause', 'video-ended', 'video-fullscreen-change', 'video-fullscreen-action'])
32
32
 
33
33
  const videoElement = ref(null);
34
34
 
35
- defineProps({
35
+ const props = defineProps({
36
36
  previewImageLink: {
37
37
  type: String,
38
38
  default: ''
@@ -75,6 +75,9 @@ defineProps({
75
75
  }
76
76
  })
77
77
 
78
+ const link = toRef(props, 'link');
79
+ const previewImageLink = toRef(props, 'previewImageLink');
80
+
78
81
  function pause(currentTime) {
79
82
  emit('pause', currentTime)
80
83
  }
@@ -32,13 +32,13 @@
32
32
  <script setup>
33
33
  import VDefaultVideoPlayer from './VDefaultVideoPlayer.vue'
34
34
  import VPreviewVideoPlayer from './VPreviewVideoPlayer.vue'
35
- import { ref } from 'vue'
35
+ import { ref, toRef } from 'vue'
36
36
 
37
37
  const emit = defineEmits(['pause', 'video-ended', 'video-fullscreen-change', 'video-fullscreen-action'])
38
38
 
39
39
  const videoElement = ref(null);
40
40
 
41
- defineProps({
41
+ const props = defineProps({
42
42
  previewImageLink: {
43
43
  type: String,
44
44
  default: ''
@@ -85,6 +85,9 @@ defineProps({
85
85
  }
86
86
  })
87
87
 
88
+ const link = toRef(props, 'link');
89
+ const previewImageLink = toRef(props, 'previewImageLink');
90
+
88
91
  function pause(currentTime) {
89
92
  emit('pause', currentTime)
90
93
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@grfzhl/vue-hls-player",
3
3
  "private": false,
4
- "version": "1.0.18",
4
+ "version": "1.0.19",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"