2023-02-24 13:47:07 +00:00
|
|
|
import type { PlayerElement, PlayerMetadata } from '$lib/types/types';
|
|
|
|
|
import { writable } from 'svelte/store';
|
|
|
|
|
|
2023-02-24 14:01:43 +00:00
|
|
|
export const audio_element = writable<PlayerElement>();
|
2023-02-24 13:47:07 +00:00
|
|
|
export const audio_current_time = writable<number>(0);
|
|
|
|
|
export const audio_src = writable<string | null>(null);
|
2023-02-24 14:01:43 +00:00
|
|
|
export const audio_autoplay = writable<boolean>(false);
|
|
|
|
|
|
2023-02-24 13:47:07 +00:00
|
|
|
export const audio_metadata = writable<PlayerMetadata>({
|
|
|
|
|
duration: 0,
|
|
|
|
|
muted: false,
|
|
|
|
|
paused: true,
|
|
|
|
|
playbackRate: 1,
|
|
|
|
|
loading: false,
|
|
|
|
|
});
|