mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-18 07:53:15 +02:00
Project Refactoring
This commit is contained in:
17
src/lib/components/VideoPlayer/VideoPlayer.ts
Normal file
17
src/lib/components/VideoPlayer/VideoPlayer.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
const initialValue = { visible: false, jellyfinId: '' };
|
||||
export const playerState = writable(initialValue);
|
||||
|
||||
export const initialPlayerState = {
|
||||
playerState,
|
||||
close: () => {
|
||||
playerState.set({ visible: false, jellyfinId: '' });
|
||||
},
|
||||
streamJellyfinId: (id: string) => {
|
||||
playerState.set({ visible: true, jellyfinId: id });
|
||||
}
|
||||
};
|
||||
|
||||
export type PlayerState = typeof initialPlayerState;
|
||||
export type PlayerStateValue = typeof initialValue;
|
||||
Reference in New Issue
Block a user