Fix anonymous autoplay

pull/5897/head
Chocobozzz 2023-07-13 14:40:06 +02:00
parent 45ec48b2b1
commit 9684bc959e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 4 deletions

View File

@ -567,11 +567,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
// 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
if (this.user) return this.user.autoPlayVideo
// Be sure the autoPlay is set to false
return this.user.autoPlayVideo !== false
if (this.anonymousUser) return this.anonymousUser.autoPlayVideo
throw new Error('Cannot guess autoplay because user and anonymousUser are not defined')
}
private isAutoPlayNext () {