X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fvideo-watch.component.ts;h=a760c03e85b45462cd49b80cf900fd9e8ba95876;hb=bf079b7bfd7f0fb75ceb28e333bb4b74d8840dd4;hp=498542fff211493ec5f4610869d2fb5f432424b8;hpb=4dae00e68b71ee3725a94eef891f3c43e10040b0;p=github%2FChocobozzz%2FPeerTube.git 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 { ) this.paramsSub = this.route.params.subscribe(routeParams => { - if (this.player) { - this.player.pause() - } - const uuid = routeParams[ 'uuid' ] // Video did not change if (this.video && this.video.uuid === uuid) return + + if (this.player) this.player.pause() + // Video did change this.videoService .getVideo(uuid) @@ -469,7 +468,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { } private isAutoplay () { - // True by default + // We'll jump to the thread id, so do not play the video + if (this.route.snapshot.params['threadId']) return false + + // Otherwise true by default if (!this.user) return true // Be sure the autoPlay is set to false