]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/assets/player/bezels/bezels-plugin.ts
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / bezels / bezels-plugin.ts
CommitLineData
f5fcd9f7
C
1import videojs, { VideoJsPlayer } from 'video.js'
2import './pause-bezel'
62ab565d 3
f5fcd9f7 4const Plugin = videojs.getPlugin('plugin')
62ab565d 5
62ab565d 6class BezelsPlugin extends Plugin {
f5fcd9f7
C
7
8 constructor (player: VideoJsPlayer, options?: videojs.ComponentOptions) {
9 super(player)
62ab565d
RK
10
11 this.player.ready(() => {
12 player.addClass('vjs-bezels')
13 })
14
15 player.addChild('PauseBezel', options)
16 }
17}
18
19videojs.registerPlugin('bezels', BezelsPlugin)
f5fcd9f7 20
62ab565d 21export { BezelsPlugin }