]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/assets/player/peertube-videojs-typings.ts
Fetch outbox when searching an actor
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-typings.ts
... / ...
CommitLineData
1import * as videojs from 'video.js'
2import { VideoFile } from '../../../../shared/models/videos/video.model'
3import { PeerTubePlugin } from './peertube-videojs-plugin'
4
5declare namespace videojs {
6 interface Player {
7 peertube (): PeerTubePlugin
8 }
9}
10
11interface VideoJSComponentInterface {
12 _player: videojs.Player
13
14 new (player: videojs.Player, options?: any)
15
16 registerComponent (name: string, obj: any)
17}
18
19type VideoJSCaption = {
20 label: string
21 language: string
22 src: string
23}
24
25type PeertubePluginOptions = {
26 videoFiles: VideoFile[]
27 playerElement: HTMLVideoElement
28 videoViewUrl: string
29 videoDuration: number
30 startTime: number | string
31 autoplay: boolean,
32 videoCaptions: VideoJSCaption[]
33}
34
35// videojs typings don't have some method we need
36const videojsUntyped = videojs as any
37
38export {
39 VideoJSComponentInterface,
40 PeertubePluginOptions,
41 videojsUntyped,
42 VideoJSCaption
43}