aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts8
1 files changed, 4 insertions, 4 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 e0935abd7..45de62519 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -567,11 +567,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
567 // We'll jump to the thread id, so do not play the video 567 // We'll jump to the thread id, so do not play the video
568 if (this.route.snapshot.params['threadId']) return false 568 if (this.route.snapshot.params['threadId']) return false
569 569
570 // Otherwise true by default 570 if (this.user) return this.user.autoPlayVideo
571 if (!this.user) return true
572 571
573 // Be sure the autoPlay is set to false 572 if (this.anonymousUser) return this.anonymousUser.autoPlayVideo
574 return this.user.autoPlayVideo !== false 573
574 throw new Error('Cannot guess autoplay because user and anonymousUser are not defined')
575 } 575 }
576 576
577 private isAutoPlayNext () { 577 private isAutoPlayNext () {