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









                                              
 
                       
import videojs from 'video.js'
import './pause-bezel'

const Plugin = videojs.getPlugin('plugin')

class BezelsPlugin extends Plugin {

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

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

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

videojs.registerPlugin('bezels', BezelsPlugin)

export { BezelsPlugin }