aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/video-watch.component.ts
diff options
context:
space:
mode:
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.ts12
1 files changed, 7 insertions, 5 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 498542fff..a760c03e8 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -101,14 +101,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
101 ) 101 )
102 102
103 this.paramsSub = this.route.params.subscribe(routeParams => { 103 this.paramsSub = this.route.params.subscribe(routeParams => {
104 if (this.player) {
105 this.player.pause()
106 }
107
108 const uuid = routeParams[ 'uuid' ] 104 const uuid = routeParams[ 'uuid' ]
109 105
110 // Video did not change 106 // Video did not change
111 if (this.video && this.video.uuid === uuid) return 107 if (this.video && this.video.uuid === uuid) return
108
109 if (this.player) this.player.pause()
110
112 // Video did change 111 // Video did change
113 this.videoService 112 this.videoService
114 .getVideo(uuid) 113 .getVideo(uuid)
@@ -469,7 +468,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
469 } 468 }
470 469
471 private isAutoplay () { 470 private isAutoplay () {
472 // True by default 471 // We'll jump to the thread id, so do not play the video
472 if (this.route.snapshot.params['threadId']) return false
473
474 // Otherwise true by default
473 if (!this.user) return true 475 if (!this.user) return true
474 476
475 // Be sure the autoPlay is set to false 477 // Be sure the autoPlay is set to false