]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/assets/player/peertube-videojs-typings.ts
Add title in player peers info to show total downloaded/uploaded data
[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
6cca7360 5declare namespace videojs {
c6352f2c
C
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
80109b2d 25 autoplay: boolean
c6352f2c
C
26}
27
28// videojs typings don't have some method we need
29const videojsUntyped = videojs as any
30
31export {
32 VideoJSComponentInterface,
33 PeertubePluginOptions,
34 videojsUntyped
35}