From 33d7855229f45d73a767566f1dbcb87709211ebf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 3 Apr 2018 15:11:46 +0200 Subject: Improve first play --- client/src/assets/player/peertube-player.ts | 4 +++- client/src/assets/player/peertube-videojs-plugin.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'client/src/assets') 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: { videoFiles: VideoFile[], enableHotkeys: boolean, inactivityTimeout: number, - peertubeLink: boolean + peertubeLink: boolean, + poster: string }) { const videojsOptions = { controls: true, + poster: options.poster, autoplay: options.autoplay, inactivityTimeout: options.inactivityTimeout, 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 { this.alterInactivity() if (this.autoplay === true) { + this.player.posterImage.hide() this.updateVideoFile(undefined, () => this.player.play()) } else { // Proxify first play -- cgit v1.2.3