aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
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
parentc6352f2c64f3c1ad54f8500f493587cdce3d33c9 (diff)
downloadPeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.gz
PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.tar.zst
PeerTube-33d7855229f45d73a767566f1dbcb87709211ebf.zip
Improve first play
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.html2
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts8
2 files changed, 3 insertions, 7 deletions
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 @@
1<div class="row"> 1<div class="row">
2 <!-- We need the video container for videojs so we just hide it --> 2 <!-- We need the video container for videojs so we just hide it -->
3 <div [hidden]="videoNotFound" id="video-container"> 3 <div [hidden]="videoNotFound" id="video-container">
4 <video [poster]="getVideoPoster()" id="video-element" class="video-js vjs-peertube-skin"></video> 4 <video id="video-element" class="video-js vjs-peertube-skin"></video>
5 </div> 5 </div>
6 6
7 <div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div> 7 <div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div>
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