]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/assets/player/peertube-videojs-typings.ts
Add ability to set a start time
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-videojs-typings.ts
CommitLineData
c6352f2c
C
1import * as videojs from 'video.js'
2import { VideoFile } from '../../../../shared/models/videos/video.model'
3import { PeerTubePlugin } from './peertube-videojs-plugin'
4
5declare module 'video.js' {
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 PeertubePluginOptions = {
20 videoFiles: VideoFile[]
21 playerElement: HTMLVideoElement
22 videoViewUrl: string
23 videoDuration: number
f37bad63 24 startTime: number
c6352f2c
C
25}
26
27// videojs typings don't have some method we need
28const videojsUntyped = videojs as any
29
30export {
31 VideoJSComponentInterface,
32 PeertubePluginOptions,
33 videojsUntyped
34}