loads from localStorage automatically via AudioLoader

This commit is contained in:
Ollie Taylor
2023-02-24 18:47:10 +00:00
parent e222a4257d
commit 8357bf093f
+6
View File
@@ -13,7 +13,9 @@
audio_start_at, audio_start_at,
audio_volume, audio_volume,
} from '$lib/context/audio-internals'; } from '$lib/context/audio-internals';
import { episode_progress } from '$lib/context/progress';
import type { PlayerElement } from '$lib/types/types'; import type { PlayerElement } from '$lib/types/types';
import { onMount } from 'svelte';
// readonly values // readonly values
let element: PlayerElement; let element: PlayerElement;
@@ -39,6 +41,10 @@
$: muted = $audio_muted; $: muted = $audio_muted;
$: playbackRate = $audio_playback_rate; $: playbackRate = $audio_playback_rate;
$: current_time = $audio_start_at; $: current_time = $audio_start_at;
onMount(() => {
episode_progress.load_all();
});
</script> </script>
<audio <audio