aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts11
1 files changed, 8 insertions, 3 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 b595ddcb7..df5b8d02d 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -102,7 +102,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
102 if (this.video && this.video.uuid === uuid) return 102 if (this.video && this.video.uuid === uuid) return
103 103
104 this.videoService.getVideo(uuid).subscribe( 104 this.videoService.getVideo(uuid).subscribe(
105 video => this.onVideoFetched(video), 105 video => {
106 const startTime = this.route.snapshot.queryParams.start
107 this.onVideoFetched(video, startTime)
108 .catch(err => this.handleError(err))
109 },
106 110
107 error => { 111 error => {
108 this.videoNotFound = true 112 this.videoNotFound = true
@@ -315,7 +319,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
315 ) 319 )
316 } 320 }
317 321
318 private async onVideoFetched (video: VideoDetails) { 322 private async onVideoFetched (video: VideoDetails, startTime = 0) {
319 this.video = video 323 this.video = video
320 324
321 // Re init attributes 325 // Re init attributes
@@ -350,7 +354,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
350 videoDuration: this.video.duration, 354 videoDuration: this.video.duration,
351 enableHotkeys: true, 355 enableHotkeys: true,
352 peertubeLink: false, 356 peertubeLink: false,
353 poster: this.video.previewUrl 357 poster: this.video.previewUrl,
358 startTime
354 }) 359 })
355 360
356 const self = this 361 const self = this