aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/peertube-videojs-typings.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-13 18:21:19 +0200
committerChocobozzz <me@florianbigard.com>2018-07-16 11:50:08 +0200
commit16f7022b06fb76c0b00c23c970bc8df605b0ec63 (patch)
tree0677c72b449485dcaa87ee2b470dfb1a8124b9e0 /client/src/assets/player/peertube-videojs-typings.ts
parent40e87e9ecc54e3513fb586928330a7855eb192c6 (diff)
downloadPeerTube-16f7022b06fb76c0b00c23c970bc8df605b0ec63.tar.gz
PeerTube-16f7022b06fb76c0b00c23c970bc8df605b0ec63.tar.zst
PeerTube-16f7022b06fb76c0b00c23c970bc8df605b0ec63.zip
Handle subtitles in player
Diffstat (limited to 'client/src/assets/player/peertube-videojs-typings.ts')
-rw-r--r--client/src/assets/player/peertube-videojs-typings.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts
index 50d6039ea..9c0299237 100644
--- a/client/src/assets/player/peertube-videojs-typings.ts
+++ b/client/src/assets/player/peertube-videojs-typings.ts
@@ -16,13 +16,20 @@ interface VideoJSComponentInterface {
16 registerComponent (name: string, obj: any) 16 registerComponent (name: string, obj: any)
17} 17}
18 18
19type VideoJSCaption = {
20 label: string
21 language: string
22 src: string
23}
24
19type PeertubePluginOptions = { 25type PeertubePluginOptions = {
20 videoFiles: VideoFile[] 26 videoFiles: VideoFile[]
21 playerElement: HTMLVideoElement 27 playerElement: HTMLVideoElement
22 videoViewUrl: string 28 videoViewUrl: string
23 videoDuration: number 29 videoDuration: number
24 startTime: number 30 startTime: number
25 autoplay: boolean 31 autoplay: boolean,
32 videoCaptions: VideoJSCaption[]
26} 33}
27 34
28// videojs typings don't have some method we need 35// videojs typings don't have some method we need
@@ -31,5 +38,6 @@ const videojsUntyped = videojs as any
31export { 38export {
32 VideoJSComponentInterface, 39 VideoJSComponentInterface,
33 PeertubePluginOptions, 40 PeertubePluginOptions,
34 videojsUntyped 41 videojsUntyped,
42 VideoJSCaption
35} 43}