mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-22 14:57:40 +01:00
20 lines
343 B
TypeScript
20 lines
343 B
TypeScript
export interface PlayerControls {
|
|
play(): void;
|
|
pause(): void;
|
|
}
|
|
|
|
export const initialControls: PlayerControls = {
|
|
play: () => null,
|
|
pause: () => null,
|
|
};
|
|
|
|
export function populateControls(player: HTMLVideoElement): PlayerControls {
|
|
return {
|
|
play() {
|
|
player.play();
|
|
},
|
|
pause() {
|
|
player.pause();
|
|
},
|
|
};
|
|
}
|