Skip to content

A self-hosted media server and file management system

fix: backdrop layering

aminnausin2eb5f755e79a
diff --git a/resources/js/components/lazy/LazyImage.vue b/resources/js/components/lazy/LazyImage.vue
index 188c2bf9..7e74c901 100644
--- a/resources/js/components/lazy/LazyImage.vue
+++ b/resources/js/components/lazy/LazyImage.vue
@@ -32,7 +32,7 @@ watch(
:loading="loading"
:alt="alt"
:src="src"
- :class="cn('lazy-image opacity-100 ease-in-out', { 'scale-85 opacity-0': isLoading })"
+ :class="[{ 'scale-85 opacity-0': isLoading }, 'lazy-image ease-in-out']"
@load="
isLoading = false;
isError = false;
diff --git a/resources/js/components/video/MediaBackdrop.vue b/resources/js/components/video/PlayerBackdrop.vue
similarity index 55%
rename from resources/js/components/video/MediaBackdrop.vue
rename to resources/js/components/video/PlayerBackdrop.vue
index 70d28401..ae7a4e25 100644
--- a/resources/js/components/video/MediaBackdrop.vue
+++ b/resources/js/components/video/PlayerBackdrop.vue
@@ -32,21 +32,23 @@ const audioPosterStyle = computed<HTMLAttributes['style']>(() => {
<template>
<div
:class="[
- 'pointer-events-none absolute top-0 left-0 flex h-full w-full items-center bg-black/10',
+ 'pointer-events-none absolute top-0 left-0 z-3 flex h-full w-full items-center',
(isAudio || aspectRatio.isPortrait) && isNormalView ? 'max-h-[71vh]' : 'aspect-video',
]"
>
- <template v-if="isAudio">
- <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
- v-show="!isAudio && poster_url && !isThumbnailDismissed"
- :src="handleStorageURL(poster_url) ?? ''"
- alt="Thumbnail"
- :class="['z-3 mx-auto h-full']"
- loading="eager"
- fetchpriority="high"
- />
+ <div class="relative isolate h-full w-full">
+ <template v-if="isAudio">
+ <div id="audio-poster" class="absolute inset-0 z-0 blur-sm" :style="audioPosterStyle"></div>
+ <LazyImage :src="audio_poster_url" alt="Album Art" class="mx-auto h-full object-contain select-none" loading="eager" fetchpriority="high" />
+ </template>
+ <LazyImage
+ v-show="!isAudio && poster_url && !isThumbnailDismissed"
+ :src="handleStorageURL(poster_url) ?? ''"
+ alt="Thumbnail"
+ :class="['mx-auto h-full']"
+ loading="eager"
+ fetchpriority="high"
+ />
+ </div>
</div>
</template>
diff --git a/resources/js/components/video/VideoPlayer.vue b/resources/js/components/video/VideoPlayer.vue
index 9325f46a..11587e87 100755
--- a/resources/js/components/video/VideoPlayer.vue
+++ b/resources/js/components/video/VideoPlayer.vue
@@ -26,6 +26,7 @@ import VideoPopoverSlider from '@/components/video/VideoPopoverSlider.vue';
import VideoPopoverItem from '@/components/video/VideoPopoverItem.vue';
import PlayerSubtitles from '@/components/video/subtitles/PlayerSubtitles.vue';
import VideoPartyPanel from '@/components/video/VideoPartyPanel.vue';
+import PlayerBackdrop from '@/components/video/PlayerBackdrop.vue';
import VideoTimeline from '@/components/video/VideoTimeline.vue';
import VideoHeatmap from '@/components/video/VideoHeatmap.vue';
import VideoPopover from '@/components/video/VideoPopover.vue';
@@ -55,7 +56,6 @@ import IconTheatreOn from '@/components/icons/IconTheatreOn.vue';
import ProiconsPlay from '~icons/proicons/play';
import MagePlaylist from '~icons/mage/playlist';
import CircumTimer from '~icons/circum/timer';
-import MediaBackdrop from './MediaBackdrop.vue';
export type PlayerViewMode = 'normal' | 'theatre' | 'fullscreen';
@@ -1208,7 +1208,6 @@ defineExpose({
)
"
:src="stateVideo?.path ? encodeURIComponent(`../${stateVideo.path}`) : ''"
- :poster="handleStorageURL(stateVideo.metadata?.poster_url) ?? ''"
@play="isPaused = false"
@pause="isPaused = true"
@ended="onPlayerEnded"
@@ -1235,7 +1234,7 @@ 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
+ <PlayerBackdrop
:aspect-ratio="aspectRatio"
:audio_poster_url="audioPoster"
:poster_url="stateVideo.metadata?.poster_url"