diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-14 11:25:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-14 11:43:19 +0200 |
commit | bf079b7bfd7f0fb75ceb28e333bb4b74d8840dd4 (patch) | |
tree | b6d9c153eff0485f154311870a10dddc7f0fe14f /client/src/app/videos/+video-watch/video-watch.component.ts | |
parent | 4dae00e68b71ee3725a94eef891f3c43e10040b0 (diff) | |
download | PeerTube-bf079b7bfd7f0fb75ceb28e333bb4b74d8840dd4.tar.gz PeerTube-bf079b7bfd7f0fb75ceb28e333bb4b74d8840dd4.tar.zst PeerTube-bf079b7bfd7f0fb75ceb28e333bb4b74d8840dd4.zip |
Automatically jump to the highlighted thread
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.ts | 12 |
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 |