diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-03 15:11:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-03 15:18:24 +0200 |
commit | 33d7855229f45d73a767566f1dbcb87709211ebf (patch) | |
tree | 103fa08e917fa64ba000bae7e2fd7255ba294a0e /client/src/assets/player | |
parent | c6352f2c64f3c1ad54f8500f493587cdce3d33c9 (diff) | |
download | PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.gz PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.zst PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.zip |
Improve first play
Diffstat (limited to 'client/src/assets/player')
-rw-r--r-- | client/src/assets/player/peertube-player.ts | 4 | ||||
-rw-r--r-- | client/src/assets/player/peertube-videojs-plugin.ts | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-player.ts b/client/src/assets/player/peertube-player.ts index 4ae3e71bd..58a8aa26c 100644 --- a/client/src/assets/player/peertube-player.ts +++ b/client/src/assets/player/peertube-player.ts | |||
@@ -20,10 +20,12 @@ function getVideojsOptions (options: { | |||
20 | videoFiles: VideoFile[], | 20 | videoFiles: VideoFile[], |
21 | enableHotkeys: boolean, | 21 | enableHotkeys: boolean, |
22 | inactivityTimeout: number, | 22 | inactivityTimeout: number, |
23 | peertubeLink: boolean | 23 | peertubeLink: boolean, |
24 | poster: string | ||
24 | }) { | 25 | }) { |
25 | const videojsOptions = { | 26 | const videojsOptions = { |
26 | controls: true, | 27 | controls: true, |
28 | poster: options.poster, | ||
27 | autoplay: options.autoplay, | 29 | autoplay: options.autoplay, |
28 | inactivityTimeout: options.inactivityTimeout, | 30 | inactivityTimeout: options.inactivityTimeout, |
29 | playbackRates: [ 0.5, 1, 1.5, 2 ], | 31 | playbackRates: [ 0.5, 1, 1.5, 2 ], |
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index c35ce12cb..425c8c7a0 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts | |||
@@ -212,6 +212,7 @@ class PeerTubePlugin extends Plugin { | |||
212 | this.alterInactivity() | 212 | this.alterInactivity() |
213 | 213 | ||
214 | if (this.autoplay === true) { | 214 | if (this.autoplay === true) { |
215 | this.player.posterImage.hide() | ||
215 | this.updateVideoFile(undefined, () => this.player.play()) | 216 | this.updateVideoFile(undefined, () => this.player.play()) |
216 | } else { | 217 | } else { |
217 | // Proxify first play | 218 | // Proxify first play |