diff options
Diffstat (limited to 'client/src/assets/player/shared/bezels/bezels-plugin.ts')
-rw-r--r-- | client/src/assets/player/shared/bezels/bezels-plugin.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/client/src/assets/player/shared/bezels/bezels-plugin.ts b/client/src/assets/player/shared/bezels/bezels-plugin.ts new file mode 100644 index 000000000..ca88bc1f9 --- /dev/null +++ b/client/src/assets/player/shared/bezels/bezels-plugin.ts | |||
@@ -0,0 +1,21 @@ | |||
1 | import videojs from 'video.js' | ||
2 | import './pause-bezel' | ||
3 | |||
4 | const Plugin = videojs.getPlugin('plugin') | ||
5 | |||
6 | class BezelsPlugin extends Plugin { | ||
7 | |||
8 | constructor (player: videojs.Player, options?: videojs.ComponentOptions) { | ||
9 | super(player) | ||
10 | |||
11 | this.player.ready(() => { | ||
12 | player.addClass('vjs-bezels') | ||
13 | }) | ||
14 | |||
15 | player.addChild('PauseBezel', options) | ||
16 | } | ||
17 | } | ||
18 | |||
19 | videojs.registerPlugin('bezels', BezelsPlugin) | ||
20 | |||
21 | export { BezelsPlugin } | ||