mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +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 { api } from '@api';
|
||||||
import { fade } from 'svelte/transition';
|
import { fade } from 'svelte/transition';
|
||||||
import { createEventDispatcher } from 'svelte';
|
import { createEventDispatcher } from 'svelte';
|
||||||
|
import { videoViewerVolume } from '$lib/stores/preferences.store';
|
||||||
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
||||||
|
|
||||||
export let assetId: string;
|
export let assetId: string;
|
||||||
@ -30,6 +31,7 @@
|
|||||||
class="h-full object-contain"
|
class="h-full object-contain"
|
||||||
on:canplay={handleCanPlay}
|
on:canplay={handleCanPlay}
|
||||||
on:ended={() => dispatch('onVideoEnded')}
|
on:ended={() => dispatch('onVideoEnded')}
|
||||||
|
bind:volume={$videoViewerVolume}
|
||||||
>
|
>
|
||||||
<source src={api.getAssetFileUrl(assetId, false, true, publicSharedKey)} type="video/mp4" />
|
<source src={api.getAssetFileUrl(assetId, false, true, publicSharedKey)} type="video/mp4" />
|
||||||
<track kind="captions" />
|
<track kind="captions" />
|
||||||
|
@ -35,3 +35,5 @@ export const mapSettings = persisted<MapSettings>('map-settings', {
|
|||||||
dateAfter: '',
|
dateAfter: '',
|
||||||
dateBefore: ''
|
dateBefore: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const videoViewerVolume = persisted<number>('video-viewer-volume', 1, {});
|
||||||
|
Loading…
Reference in New Issue
Block a user