diff options
Diffstat (limited to 'client/src/assets/player/videojs-components/next-video-button.ts')
-rw-r--r-- | client/src/assets/player/videojs-components/next-video-button.ts | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/client/src/assets/player/videojs-components/next-video-button.ts b/client/src/assets/player/videojs-components/next-video-button.ts deleted file mode 100644 index 22b32f06b..000000000 --- a/client/src/assets/player/videojs-components/next-video-button.ts +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | import videojs from 'video.js' | ||
2 | |||
3 | const Button = videojs.getComponent('Button') | ||
4 | |||
5 | export interface NextVideoButtonOptions extends videojs.ComponentOptions { | ||
6 | handler: Function | ||
7 | } | ||
8 | |||
9 | class NextVideoButton extends Button { | ||
10 | private readonly nextVideoButtonOptions: NextVideoButtonOptions | ||
11 | |||
12 | constructor (player: videojs.Player, options?: NextVideoButtonOptions) { | ||
13 | super(player, options) | ||
14 | |||
15 | this.nextVideoButtonOptions = options | ||
16 | } | ||
17 | |||
18 | createEl () { | ||
19 | const button = videojs.dom.createEl('button', { | ||
20 | className: 'vjs-next-video' | ||
21 | }) as HTMLButtonElement | ||
22 | const nextIcon = videojs.dom.createEl('span', { | ||
23 | className: 'icon icon-next' | ||
24 | }) | ||
25 | button.appendChild(nextIcon) | ||
26 | |||
27 | button.title = this.player_.localize('Next video') | ||
28 | |||
29 | return button | ||
30 | } | ||
31 | |||
32 | handleClick () { | ||
33 | this.nextVideoButtonOptions.handler() | ||
34 | } | ||
35 | } | ||
36 | |||
37 | videojs.registerComponent('NextVideoButton', NextVideoButton) | ||