]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - 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
index a58fa65050b9336c7b2685bf78cf35707ae672c2..993d5ee6b01ff835d33c416648b1389c58db2ba4 100644 (file)
@@ -2,7 +2,7 @@ import * as videojs from 'video.js'
 import { VideoFile } from '../../../../shared/models/videos/video.model'
 import { PeerTubePlugin } from './peertube-videojs-plugin'
 
-declare module 'video.js' {
+declare namespace videojs {
   interface Player {
     peertube (): PeerTubePlugin
   }
@@ -16,11 +16,20 @@ interface VideoJSComponentInterface {
   registerComponent (name: string, obj: any)
 }
 
+type VideoJSCaption = {
+  label: string
+  language: string
+  src: string
+}
+
 type PeertubePluginOptions = {
   videoFiles: VideoFile[]
   playerElement: HTMLVideoElement
   videoViewUrl: string
   videoDuration: number
+  startTime: number | string
+  autoplay: boolean,
+  videoCaptions: VideoJSCaption[]
 }
 
 // videojs typings don't have some method we need
@@ -29,5 +38,6 @@ const videojsUntyped = videojs as any
 export {
   VideoJSComponentInterface,
   PeertubePluginOptions,
-  videojsUntyped
+  videojsUntyped,
+  VideoJSCaption
 }