mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix(web): keep video volume (#2897)
* save video volume in asset-interaction.store.ts * move video-viewer-volume to preferences store save in localstorage by using persisted
This commit is contained in:
parent
82b89aa20b
commit
de7f66f983
@ -2,6 +2,7 @@
|
||||
import { api } from '@api';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { videoViewerVolume } from '$lib/stores/preferences.store';
|
||||
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
||||
|
||||
export let assetId: string;
|
||||
@ -30,6 +31,7 @@
|
||||
class="h-full object-contain"
|
||||
on:canplay={handleCanPlay}
|
||||
on:ended={() => dispatch('onVideoEnded')}
|
||||
bind:volume={$videoViewerVolume}
|
||||
>
|
||||
<source src={api.getAssetFileUrl(assetId, false, true, publicSharedKey)} type="video/mp4" />
|
||||
<track kind="captions" />
|
||||
|
@ -35,3 +35,5 @@ export const mapSettings = persisted<MapSettings>('map-settings', {
|
||||
dateAfter: '',
|
||||
dateBefore: ''
|
||||
});
|
||||
|
||||
export const videoViewerVolume = persisted<number>('video-viewer-volume', 1, {});
|
||||
|
Loading…
Reference in New Issue
Block a user