aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/assets/player/bezels/bezels-plugin.ts
blob: 49917752622b45c458a4cd415fa3016221ea5a90 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                 
 
                                          
 
                                   


                                                                           









                                              
 
                       
import videojs, { VideoJsPlayer } from 'video.js'
import './pause-bezel'

const Plugin = videojs.getPlugin('plugin')

class BezelsPlugin extends Plugin {

  constructor (player: VideoJsPlayer, options?: videojs.ComponentOptions) {
    super(player)

    this.player.ready(() => {
      player.addClass('vjs-bezels')
    })

    player.addChild('PauseBezel', options)
  }
}

videojs.registerPlugin('bezels', BezelsPlugin)

export { BezelsPlugin }