1 // FIXME: something weird with our path definition in tsconfig and typings
3 import * as videojs from 'video.js'
5 import { VideoFile } from '../../../../shared/models/videos/video.model'
6 import { PeerTubePlugin } from './peertube-videojs-plugin'
8 declare namespace videojs {
10 peertube (): PeerTubePlugin
14 interface VideoJSComponentInterface {
15 _player: videojs.Player
17 new (player: videojs.Player, options?: any): any
19 registerComponent (name: string, obj: any): any
22 type VideoJSCaption = {
30 authorizationHeader: string
33 type PeertubePluginOptions = {
34 videoFiles: VideoFile[]
35 playerElement: HTMLVideoElement
38 startTime: number | string
40 videoCaptions: VideoJSCaption[]
42 userWatching?: UserWatching
45 // videojs typings don't have some method we need
46 const videojsUntyped = videojs as any
49 VideoJSComponentInterface,
50 PeertubePluginOptions,