aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/video-watch.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-03 15:11:46 +0200
committerChocobozzz <me@florianbigard.com>2018-04-03 15:18:24 +0200
commit33d7855229f45d73a767566f1dbcb87709211ebf (patch)
tree103fa08e917fa64ba000bae7e2fd7255ba294a0e /client/src/app/videos/+video-watch/video-watch.component.ts
parentc6352f2c64f3c1ad54f8500f493587cdce3d33c9 (diff)
downloadPeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.gz
PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.zst
PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.zip
Improve first play
Diffstat (limited to 'client/src/app/videos/+video-watch/video-watch.component.ts')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts8
1 files changed, 2 insertions, 6 deletions
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 {
337 if (this.videoPlayerLoaded !== true) { 337 if (this.videoPlayerLoaded !== true) {
338 this.playerElement = this.elementRef.nativeElement.querySelector('#video-element') 338 this.playerElement = this.elementRef.nativeElement.querySelector('#video-element')
339 339
340 // If autoplay is true, we don't really need a poster
341 if (this.isAutoplay() === false) {
342 this.playerElement.poster = this.video.previewUrl
343 }
344
345 const videojsOptions = getVideojsOptions({ 340 const videojsOptions = getVideojsOptions({
346 autoplay: this.isAutoplay(), 341 autoplay: this.isAutoplay(),
347 inactivityTimeout: 4000, 342 inactivityTimeout: 4000,
@@ -350,7 +345,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
350 videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid), 345 videoViewUrl: this.videoService.getVideoViewUrl(this.video.uuid),
351 videoDuration: this.video.duration, 346 videoDuration: this.video.duration,
352 enableHotkeys: true, 347 enableHotkeys: true,
353 peertubeLink: false 348 peertubeLink: false,
349 poster: this.video.previewUrl
354 }) 350 })
355 351
356 this.videoPlayerLoaded = true 352 this.videoPlayerLoaded = true