1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-22 14:57:40 +01:00
smov/src/components/video/hooks/controlVideo.ts
2023-01-08 15:37:16 +01:00

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();
},
};
}