Skip to content

A self-hosted media server and file management system

fix: media backdrop does not use audio poster

aminnausin3c23d5895b1b
diff --git a/resources/js/components/lazy/LazyImage.vue b/resources/js/components/lazy/LazyImage.vue
index c5b86181..a5549412 100644
--- a/resources/js/components/lazy/LazyImage.vue
+++ b/resources/js/components/lazy/LazyImage.vue
@@ -27,6 +27,7 @@ watch(
</div>
<img
v-bind="attrs"
+ :key="src"
:loading="loading"
:alt="alt"
:src="src"
diff --git a/resources/js/components/video/MediaBackdrop.vue b/resources/js/components/video/MediaBackdrop.vue
index 126749f8..70d28401 100644
--- a/resources/js/components/video/MediaBackdrop.vue
+++ b/resources/js/components/video/MediaBackdrop.vue
@@ -13,6 +13,7 @@ const props = defineProps<{
isAspectVideo: boolean;
};
isThumbnailDismissed?: boolean;
+ audio_poster_url: string;
poster_url?: string;
}>();
@@ -20,7 +21,7 @@ const isAudio = inject<boolean>('isAudio');
const audioPosterStyle = computed<HTMLAttributes['style']>(() => {
return {
- backgroundImage: `url("${props.poster_url}")`,
+ backgroundImage: `url("${props.audio_poster_url}")`,
backgroundPosition: 'center',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
@@ -36,7 +37,7 @@ const audioPosterStyle = computed<HTMLAttributes['style']>(() => {
]"
>
<template v-if="isAudio">
- <LazyImage :src="poster_url" alt="Album Art" class="z-3 mx-auto h-full object-contain select-none" loading="eager" fetchpriority="high" />
+ <LazyImage :src="audio_poster_url" alt="Album Art" class="z-3 mx-auto h-full object-contain select-none" loading="eager" fetchpriority="high" />
<div id="audio-poster" class="absolute top-0 left-0 h-full w-full blur-md" :style="audioPosterStyle"></div>
</template>
<LazyImage
diff --git a/resources/js/components/video/VideoPlayer.vue b/resources/js/components/video/VideoPlayer.vue
index 8eb5cb57..9325f46a 100755
--- a/resources/js/components/video/VideoPlayer.vue
+++ b/resources/js/components/video/VideoPlayer.vue
@@ -1235,7 +1235,13 @@ defineExpose({
<!-- The thumbnail or blurred copy of the album art as a backdrop to the clear art (Z-3) -->
<!-- (Thumbnail only shows when player has never started) (Album art is always visible) -->
- <MediaBackdrop :aspect-ratio="aspectRatio" :poster_url="stateVideo.metadata?.poster_url" :is-thumbnail-dismissed="isThumbnailDismissed" :is-normal-view="isNormalView" />
+ <MediaBackdrop
+ :aspect-ratio="aspectRatio"
+ :audio_poster_url="audioPoster"
+ :poster_url="stateVideo.metadata?.poster_url"
+ :is-thumbnail-dismissed="isThumbnailDismissed"
+ :is-normal-view="isNormalView"
+ />
<div
style="z-index: 4"