1 const videojs = require('video.js')
2 import { VideoFile } from '../../../../shared/models/videos/video.model'
3 import { PeerTubePlugin } from './peertube-videojs-plugin'
5 declare namespace videojs {
7 peertube (): PeerTubePlugin
11 interface VideoJSComponentInterface {
12 _player: videojs.Player
14 new (player: videojs.Player, options?: any): any
16 registerComponent (name: string, obj: any): any
19 type VideoJSCaption = {
27 authorizationHeader: string
30 type PeertubePluginOptions = {
31 videoFiles: VideoFile[]
32 playerElement: HTMLVideoElement
35 startTime: number | string
37 videoCaptions: VideoJSCaption[]
39 userWatching?: UserWatching
42 // videojs typings don't have some method we need
43 const videojsUntyped = videojs as any
46 VideoJSComponentInterface,
47 PeertubePluginOptions,