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/app/videos/+video-watch/video-watch.component.html | 2 +- client/src/app/videos/+video-watch/video-watch.component.ts | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'client/src/app/videos') diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index ec5bd30dc..9c6038a5e 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html @@ -1,7 +1,7 @@
- +
Video not found :'(
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index c7e26fad2..0f7c76d0b 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -337,11 +337,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy { if (this.videoPlayerLoaded !== true) { this.playerElement = this.elementRef.nativeElement.querySelector('#video-element') - // If autoplay is true, we don't really need a poster - if (this.isAutoplay() === false) { - this.playerElement.poster = this.video.previewUrl - } - const videojsOptions = getVideojsOptions({ autoplay: this.isAutoplay(), inactivityTimeout: 4000, @@ -350,7 +345,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid), videoDuration: this.video.duration, enableHotkeys: true, - peertubeLink: false + peertubeLink: false, + poster: this.video.previewUrl }) this.videoPlayerLoaded = true -- cgit v1.2.3