Skip to content

A self-hosted media server and file management system

fix: Music Player Background Missing Fixes #249

aminnausin8ddfea5af2a1
diff --git a/resources/js/components/video/VideoPlayer.vue b/resources/js/components/video/VideoPlayer.vue
index fdbc21c7..ad3aa491 100755
--- a/resources/js/components/video/VideoPlayer.vue
+++ b/resources/js/components/video/VideoPlayer.vue
@@ -1,7 +1,7 @@
<script setup lang="ts">
+import type { ComputedRef, HTMLAttributes, Ref } from 'vue';
import type { FolderResource, VideoResource } from '@/types/resources';
import type { ContextMenuItem, PopoverItem } from '@/types/types';
-import type { ComputedRef, Ref } from 'vue';
import { getScreenSize, handleStorageURL, isInputLikeElement, isMobileDevice, toFormattedDate, toFormattedDuration, formatBitrate } from '@/service/util';
import { controlsHideTime, playbackDataBuffer, playerHealthBuffer, volumeDelta, playbackDelta, playbackMin, playbackMax } from '@/service/player/playerConstants';
@@ -371,6 +371,12 @@ const audioPoster = computed(() => {
return handleStorageURL(stateVideo.value?.metadata?.poster_url) ?? handleStorageURL(stateFolder.value.series?.thumbnail_url) ?? '/storage/thumbnails/default.webp';
});
+const audioPosterStyle = computed<HTMLAttributes['style']>(() => {
+ return {
+ background: `transparent url("${audioPoster.value}") 50% 50% / cover no-repeat`,
+ };
+});
+
const initVideoPlayer = async () => {
if (stateVideo.value.id === currentId.value) return;
@@ -1628,12 +1634,7 @@ defineExpose({
</Transition>
</section>
<!-- Is a blurred copy of the thumbnail or poster as a backdrop to the clear poster -->
- <div
- v-if="isAudio"
- id="audio-poster"
- class="absolute top-0 left-0 flex h-full w-full cursor-pointer items-center justify-center blur-sm"
- :style="`background: transparent url('${audioPoster}') 50% 50% / cover no-repeat;`"
- ></div>
+ <div v-if="isAudio" id="audio-poster" class="absolute top-0 left-0 flex h-full w-full cursor-pointer items-center justify-center blur-sm" :style="audioPosterStyle"></div>
<div class="absolute top-0 left-0 h-full w-full" v-show="isFullScreen">
<ToastController :teleport-disabled="true" :position="'bottom-left'" />
<ContextMenu