diff options
Diffstat (limited to 'client/src/assets/player/peertube-player.ts')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index aaa1170b6..e0e063838 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -26,23 +26,24 @@ videojsUntyped.getComponent('CaptionsButton').prototype.controlText_ = 'Subtitle | |||
26 | videojsUntyped.getComponent('CaptionsButton').prototype.label_ = ' ' | 26 | videojsUntyped.getComponent('CaptionsButton').prototype.label_ = ' ' |
27 | 27 | ||
28 | function getVideojsOptions (options: { | 28 | function getVideojsOptions (options: { |
29 | autoplay: boolean, | 29 | autoplay: boolean |
30 | playerElement: HTMLVideoElement, | 30 | playerElement: HTMLVideoElement |
31 | videoViewUrl: string, | 31 | videoViewUrl: string |
32 | videoDuration: number, | 32 | videoDuration: number |
33 | videoFiles: VideoFile[], | 33 | videoFiles: VideoFile[] |
34 | enableHotkeys: boolean, | 34 | enableHotkeys: boolean |
35 | inactivityTimeout: number, | 35 | inactivityTimeout: number |
36 | peertubeLink: boolean, | 36 | peertubeLink: boolean |
37 | poster: string, | 37 | poster: string |
38 | startTime: number | string | 38 | startTime: number | string |
39 | theaterMode: boolean, | 39 | theaterMode: boolean |
40 | videoCaptions: VideoJSCaption[], | 40 | videoCaptions: VideoJSCaption[] |
41 | 41 | ||
42 | language?: string, | 42 | language?: string |
43 | controls?: boolean, | 43 | controls?: boolean |
44 | muted?: boolean, | 44 | muted?: boolean |
45 | loop?: boolean | 45 | loop?: boolean |
46 | subtitle?: string | ||
46 | 47 | ||
47 | userWatching?: UserWatching | 48 | userWatching?: UserWatching |
48 | }) { | 49 | }) { |
@@ -50,8 +51,10 @@ function getVideojsOptions (options: { | |||
50 | // We don't use text track settings for now | 51 | // We don't use text track settings for now |
51 | textTrackSettings: false, | 52 | textTrackSettings: false, |
52 | controls: options.controls !== undefined ? options.controls : true, | 53 | controls: options.controls !== undefined ? options.controls : true, |
53 | muted: options.controls !== undefined ? options.muted : false, | ||
54 | loop: options.loop !== undefined ? options.loop : false, | 54 | loop: options.loop !== undefined ? options.loop : false, |
55 | |||
56 | muted: options.muted !== undefined ? options.muted : undefined, // Undefined so the player knows it has to check the local storage | ||
57 | |||
55 | poster: options.poster, | 58 | poster: options.poster, |
56 | autoplay: false, | 59 | autoplay: false, |
57 | inactivityTimeout: options.inactivityTimeout, | 60 | inactivityTimeout: options.inactivityTimeout, |
@@ -65,7 +68,8 @@ function getVideojsOptions (options: { | |||
65 | videoViewUrl: options.videoViewUrl, | 68 | videoViewUrl: options.videoViewUrl, |
66 | videoDuration: options.videoDuration, | 69 | videoDuration: options.videoDuration, |
67 | startTime: options.startTime, | 70 | startTime: options.startTime, |
68 | userWatching: options.userWatching | 71 | userWatching: options.userWatching, |
72 | subtitle: options.subtitle | ||
69 | } | 73 | } |
70 | }, | 74 | }, |
71 | controlBar: { | 75 | controlBar: { |