fix
This commit is contained in:
parent
95005327a3
commit
621e2cdb5b
2 changed files with 8 additions and 3 deletions
|
@ -46,10 +46,12 @@ function volumechange() {
|
||||||
if (audioEl) ColdDeviceStorage.set('mediaVolume', audioEl.volume);
|
if (audioEl) ColdDeviceStorage.set('mediaVolume', audioEl.volume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const playerInstance = ref();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (audioEl) {
|
if (audioEl) {
|
||||||
audioEl.volume = ColdDeviceStorage.get('mediaVolume');
|
audioEl.volume = ColdDeviceStorage.get('mediaVolume');
|
||||||
new Vlitejs('#player');
|
playerInstance.value = new Vlitejs('#player');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
<div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu">
|
<div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu">
|
||||||
<video
|
<video
|
||||||
id="player"
|
id="player"
|
||||||
|
ref="videoEl"
|
||||||
:poster="video.thumbnailUrl"
|
:poster="video.thumbnailUrl"
|
||||||
:title="video.comment"
|
:title="video.comment"
|
||||||
:alt="video.comment"
|
:alt="video.comment"
|
||||||
|
@ -38,11 +39,13 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const videoEl = $ref<HTMLVideoElement | null>();
|
const videoEl = $ref<HTMLVideoElement | null>();
|
||||||
|
Vlitejs.registerPlugin('pip', VlitejsPip);
|
||||||
|
|
||||||
|
const playerInstance = ref();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (videoEl) {
|
if (videoEl) {
|
||||||
Vlitejs.registerPlugin('pip', VlitejsPip);
|
playerInstance.value = new Vlitejs(videoEl, {
|
||||||
new Vlitejs('#player', {
|
|
||||||
plugins: ['pip'],
|
plugins: ['pip'],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue