mirror of
https://github.com/sussy-code/smov.git
synced 2026-04-04 16:59:52 +00:00
9 lines
321 B
TypeScript
9 lines
321 B
TypeScript
import { VideoPlayerState } from "./types";
|
|
|
|
export const _players: Map<string, VideoPlayerState> = new Map();
|
|
|
|
export function getPlayerState(descriptor: string): VideoPlayerState {
|
|
const state = _players.get(descriptor);
|
|
if (!state) throw new Error("invalid descriptor or has been unregistered");
|
|
return state;
|
|
}
|