mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-27 22:21:50 +01:00
21 lines
343 B
TypeScript
21 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();
|
||
|
},
|
||
|
};
|
||
|
}
|