diff options
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 | 6 |
1 files changed, 5 insertions, 1 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 0de621aca..156a3235a 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -45,6 +45,7 @@ import { randomInt } from '@shared/core-utils/miscs/miscs' | |||
45 | }) | 45 | }) |
46 | export class VideoWatchComponent implements OnInit, OnDestroy { | 46 | export class VideoWatchComponent implements OnInit, OnDestroy { |
47 | private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern' | 47 | private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern' |
48 | private static LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO = 'auto_play_next_video' | ||
48 | 49 | ||
49 | @ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent | 50 | @ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent |
50 | @ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent | 51 | @ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent |
@@ -436,7 +437,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
436 | this.player.one('ended', () => { | 437 | this.player.one('ended', () => { |
437 | if (this.playlist) { | 438 | if (this.playlist) { |
438 | this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) | 439 | this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) |
439 | } else if (this.user && this.user.autoPlayNextVideo) { | 440 | } else if ( |
441 | this.user && this.user.autoPlayNextVideo || | ||
442 | peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' | ||
443 | ) { | ||
440 | this.zone.run(() => this.autoplayNext()) | 444 | this.zone.run(() => this.autoplayNext()) |
441 | } | 445 | } |
442 | }) | 446 | }) |