You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
321 B
9 lines
321 B
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; |
|
}
|
|
|