From 95005327a37ea1811bb061fde6db7c0bb03c7116 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 13 Jul 2022 22:10:58 -0700 Subject: [PATCH] Lifecycle hook --- packages/client/src/components/media-banner.vue | 7 ++++--- packages/client/src/components/media-video.vue | 13 +++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/client/src/components/media-banner.vue b/packages/client/src/components/media-banner.vue index d4067fad76..0c44c7aaea 100644 --- a/packages/client/src/components/media-banner.vue +++ b/packages/client/src/components/media-banner.vue @@ -39,8 +39,6 @@ const props = withDefaults(defineProps<{ }>(), { }); -new Vlitejs('#player'); - const audioEl = $ref(); let hide = $ref(true); @@ -49,7 +47,10 @@ function volumechange() { } onMounted(() => { - if (audioEl) audioEl.volume = ColdDeviceStorage.get('mediaVolume'); + if (audioEl) { + audioEl.volume = ColdDeviceStorage.get('mediaVolume'); + new Vlitejs('#player'); + } }); diff --git a/packages/client/src/components/media-video.vue b/packages/client/src/components/media-video.vue index 57a81cd0d0..9f5c3cc83a 100644 --- a/packages/client/src/components/media-video.vue +++ b/packages/client/src/components/media-video.vue @@ -26,7 +26,7 @@