A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
feat: move stats and audio graph settings into a single layer
aminnausin1d581679e04c
diff --git a/resources/js/components/video/PlayerStats.vue b/resources/js/components/video/PlayerStats.vueindex c691d74d..f59312c0 100644--- a/resources/js/components/video/PlayerStats.vue+++ b/resources/js/components/video/PlayerStats.vue@@ -9,7 +9,6 @@ import ProiconsCancel from '~icons/proicons/cancel';// TODO: localise some of these ? maybe provide and injects? framehealth is only seen hereconst props = defineProps<{isShowingStats: boolean;- isMaximised: boolean;isAudio: boolean;frameHealth: string;bufferHealth: string;@@ -27,65 +26,63 @@ const getPlayerDimensions = (player: HTMLVideoElement) => {};</script><template>- <div :class="['pointer-events-auto absolute top-0 left-0 p-1 sm:p-4', { 'top-6 p-4': isMaximised }]" v-show="isShowingStats" style="z-index: 7">- <div class="w-fit rounded-md border border-neutral-700/10 bg-neutral-800/90 p-2 backdrop-blur-xs sm:min-w-52">- <div class="scrollbar-minimal scrollbar-dark xs:h-16 flex h-12 max-h-64 w-full gap-2 overflow-y-auto pe-1 sm:h-auto sm:pe-0">- <div class="space-y-2">- <section class="*:ms-4">- <h5 class="ms-0!">Player Info</h5>- <template v-if="!isAudio">- <p title="Viewport Resolution" v-if="player">- Player Resolution: <span>{{ getPlayerDimensions(player) }}</span>- </p>- <p title="Video Resolution">- Video Resolution:- <span>{{- stateVideo.metadata?.resolution_width ? `${stateVideo.metadata.resolution_width}x${stateVideo.metadata?.resolution_height}` : 'Unknown'- }}</span>- </p>- <p title="Dropped Frames vs Total Frames">- Dropped Frames: <span>{{ frameHealth }}</span>- </p>- </template>- <p title="File Buffer Health">- Buffer Health: <span>{{ bufferHealth }}</span>+ <div v-show="isShowingStats" class="pointer-events-auto w-fit rounded-md border border-neutral-700/10 bg-neutral-800/90 p-2 backdrop-blur-xs sm:min-w-52">+ <div class="scrollbar-minimal scrollbar-dark xs:h-16 flex h-12 max-h-64 w-full gap-2 overflow-y-auto pe-1 sm:h-auto sm:pe-0">+ <div class="space-y-2">+ <section class="*:ms-4">+ <h5 class="ms-0!">Player Info</h5>+ <template v-if="!isAudio">+ <p title="Viewport Resolution" v-if="player">+ Player Resolution: <span>{{ getPlayerDimensions(player) }}</span></p>- </section>- <section class="*:ms-4">- <h5 class="ms-0!">Media Info</h5>-- <template v-if="stateVideo.metadata?.duration">- <p title="Total Duration">- Total Duration: <span>{{ toFormattedDuration(stateVideo.metadata.duration) }}</span>- </p>- <p title="Raw Duration">- Raw Duration: <span>{{ stateVideo.metadata.duration }}s</span>- </p>- </template>- <p title="Total Size">- File Size: <span>{{ stateVideo.file_size ? formatFileSize(stateVideo.file_size) : 'Unknown' }}</span>+ <p title="Video Resolution">+ Video Resolution:+ <span>{{+ stateVideo.metadata?.resolution_width ? `${stateVideo.metadata.resolution_width}x${stateVideo.metadata?.resolution_height}` : 'Unknown'+ }}</span></p>- <p title="File Bitrate" v-if="stateVideo.metadata?.bitrate">- Bitrate: <span>{{ formatBitrate(stateVideo.metadata.bitrate) }}</span>+ <p title="Dropped Frames vs Total Frames">+ Dropped Frames: <span>{{ frameHealth }}</span></p>- <p title="File Framerate" v-if="stateVideo.metadata?.frame_rate">- Framerate: <span>{{ stateVideo.metadata.frame_rate }}fps</span>+ </template>+ <p title="File Buffer Health">+ Buffer Health: <span>{{ bufferHealth }}</span>+ </p>+ </section>+ <section class="*:ms-4">+ <h5 class="ms-0!">Media Info</h5>++ <template v-if="stateVideo.metadata?.duration">+ <p title="Total Duration">+ Total Duration: <span>{{ toFormattedDuration(stateVideo.metadata.duration) }}</span></p>- <p title="File Codec" v-if="stateVideo.metadata?.codec">- Codec: <span>{{ stateVideo.metadata.codec }}</span>+ <p title="Raw Duration">+ Raw Duration: <span>{{ stateVideo.metadata.duration }}s</span></p>- </section>- </div>- <ButtonCorner- title="Close Stats"- @click="closeStats"- colour-classes="hover:bg-transparent"- text-classes="hover:text-danger-2"- position-classes="size-4 sticky top-0 self-start"- >- <template #icon><ProiconsCancel /></template>- </ButtonCorner>+ </template>+ <p title="Total Size">+ File Size: <span>{{ stateVideo.file_size ? formatFileSize(stateVideo.file_size) : 'Unknown' }}</span>+ </p>+ <p title="File Bitrate" v-if="stateVideo.metadata?.bitrate">+ Bitrate: <span>{{ formatBitrate(stateVideo.metadata.bitrate) }}</span>+ </p>+ <p title="File Framerate" v-if="stateVideo.metadata?.frame_rate">+ Framerate: <span>{{ stateVideo.metadata.frame_rate }}fps</span>+ </p>+ <p title="File Codec" v-if="stateVideo.metadata?.codec">+ Codec: <span>{{ stateVideo.metadata.codec }}</span>+ </p>+ </section></div>+ <ButtonCorner+ title="Close Stats"+ @click="closeStats"+ colour-classes="hover:bg-transparent"+ text-classes="hover:text-danger-2"+ position-classes="size-4 sticky top-0 self-start"+ >+ <template #icon><ProiconsCancel /></template>+ </ButtonCorner></div></div></template>diff --git a/resources/js/components/video/VideoPlayer.vue b/resources/js/components/video/VideoPlayer.vueindex 4deab024..f24aff67 100755--- a/resources/js/components/video/VideoPlayer.vue+++ b/resources/js/components/video/VideoPlayer.vue@@ -1295,7 +1295,7 @@ defineExpose({<div v-if="isTheatreView" class="pointer-events-none aspect-video w-full rounded-lg bg-black/30" /><div:class="- cn('relative overflow-clip', {+ cn('relative overflow-clip', 'font-mono text-xs text-white', {'theatre-mode player-transition animate-theatre-enter': isTheatreView,'rounded-lg': isNormalView,'rounded-sm': isFullScreen,@@ -1376,35 +1376,29 @@ defineExpose({</div><!-- UI Layers -->- <div- style="z-index: 4"- :class="`player-controls pointer-events-none font-mono text-xs text-white ${isShowingControls ? 'cursor-auto' : 'cursor-none'}`"- id="player-controls"- >- <!-- Video Stats (Z-7) -->++ <!-- UI Panels -->+ <div style="z-index: 7" :class="cn('ui-layer pointer-events-auto inset-0 flex flex-col gap-2 p-1 sm:p-4', { 'top-6 p-4': isFullScreen || isTheatreView })"><PlayerStats:close-stats="() => (isShowingStats = false)"- :is-maximised="isFullScreen || isTheatreView":is-showing-stats="isShowingStats":is-audio="isAudio":buffer-health="bufferHealth":frame-health="frameHealth":player="player"- style="z-index: 7"/>- <div- class="layer pointer-events-none absolute inset-0 flex flex-col gap-4 p-2 sm:p-4"- style="z-index: 7"+ <AudioSpectrographPanelv-if="playerSpectrograph"v-show="isShowingAudioGraphSettings"- >- <AudioSpectrographPanel- :close-panel="() => (isShowingAudioGraphSettings = false)"- :toggle-scale="playerSpectrograph?.toggleScale"- :is-maximised="isFullScreen || isTheatreView"- />- </div>+ :close-panel="() => (isShowingAudioGraphSettings = false)"+ :toggle-scale="playerSpectrograph?.toggleScale"+ :is-maximised="isFullScreen || isTheatreView"+ />+ </div>++ <div style="z-index: 4" :class="`player-controls pointer-events-none ${isShowingControls ? 'cursor-auto' : 'cursor-none'}`" id="player-controls">+ <!-- Video Stats (Z-7) --><!-- Watch Party (Z-7) --><div class="pointer-events-auto absolute top-0 right-0 p-1 sm:p-4" v-show="isShowingParty" style="z-index: 7">@@ -1934,6 +1928,13 @@ defineExpose({/* Player */+.ui-layer {+ position: absolute;+ width: 100%;+ height: 100%;+ pointer-events: none;+}+video::cue {font-weight: normal !important;background-color: transparent !important;diff --git a/resources/js/components/video/audio/AudioSpectrographPanel.vue b/resources/js/components/video/audio/AudioSpectrographPanel.vueindex d4663604..04ecf0de 100644--- a/resources/js/components/video/audio/AudioSpectrographPanel.vue+++ b/resources/js/components/video/audio/AudioSpectrographPanel.vue@@ -22,12 +22,10 @@ const scale = ref<'log' | 'linear'>('linear');</script><template>- <div- class="w-fit rounded-md border border-neutral-700/10 bg-neutral-800/90 p-2 backdrop-blur-xs sm:min-w-52"- :class="['pointer-events-auto', { 'top-6 p-4': isMaximised }]"- style="z-index: 7"- >- <div class="scrollbar-minimal scrollbar-dark xs:h-16 flex h-12 max-h-64 w-full flex-col gap-1 overflow-y-auto pe-1 pb-1 *:ms-4 sm:h-auto sm:overflow-visible! sm:pe-0">+ <div :class="['pointer-events-auto w-fit rounded-md border border-neutral-700/10 bg-neutral-800/90 p-2 backdrop-blur-xs sm:min-w-52', { 'top-6 p-4': isMaximised }]">+ <div+ class="scrollbar-minimal scrollbar-dark xs:h-16 flex max-h-12 w-full flex-col gap-1 overflow-y-auto pe-1 pb-1 *:ms-4 sm:h-auto sm:max-h-64 sm:overflow-visible! sm:pe-0"+ ><div class="ms-0! flex items-center justify-between gap-2"><h5>Audio Graph</h5><ButtonCorner@@ -49,10 +47,8 @@ const scale = ref<'log' | 'linear'>('linear');class="hocus:ring-white size-6 h-full p-1 hover:bg-neutral-950":variant="'transparent'"@click="- () => {- toggleScale();- scale = scale === 'log' ? 'linear' : 'log';- }+ toggleScale();+ scale = scale === 'log' ? 'linear' : 'log';"><ProiconsArrowSwap