From 16f7022b06fb76c0b00c23c970bc8df605b0ec63 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 13 Jul 2018 18:21:19 +0200 Subject: Handle subtitles in player --- client/src/assets/player/peertube-videojs-typings.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'client/src/assets/player/peertube-videojs-typings.ts') 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 { 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 - autoplay: boolean + autoplay: boolean, + videoCaptions: VideoJSCaption[] } // videojs typings don't have some method we need @@ -31,5 +38,6 @@ const videojsUntyped = videojs as any export { VideoJSComponentInterface, PeertubePluginOptions, - videojsUntyped + videojsUntyped, + VideoJSCaption } -- cgit v1.2.3