diff --git a/client/src/app/header/header.component.html b/client/src/app/header/header.component.html index 46a87c79c..8ee41c4de 100644 --- a/client/src/app/header/header.component.html +++ b/client/src/app/header/header.component.html @@ -1,5 +1,5 @@ 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' }) export class VideoWatchComponent implements OnInit, OnDestroy { private static LOCAL_STORAGE_PRIVACY_CONCERN_KEY = 'video-watch-privacy-concern' + private static LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO = 'auto_play_next_video' @ViewChild('videoWatchPlaylist', { static: true }) videoWatchPlaylist: VideoWatchPlaylistComponent @ViewChild('videoShareModal', { static: false }) videoShareModal: VideoShareComponent @@ -436,7 +437,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { this.player.one('ended', () => { if (this.playlist) { this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) - } else if (this.user && this.user.autoPlayNextVideo) { + } else if ( + this.user && this.user.autoPlayNextVideo || + peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' + ) { this.zone.run(() => this.autoplayNext()) } }) diff --git a/client/src/app/videos/recommendations/recommendations.module.ts b/client/src/app/videos/recommendations/recommendations.module.ts index 5a46ea739..3e279cc29 100644 --- a/client/src/app/videos/recommendations/recommendations.module.ts +++ b/client/src/app/videos/recommendations/recommendations.module.ts @@ -1,4 +1,5 @@ import { NgModule } from '@angular/core' +import { InputSwitchModule } from 'primeng/inputswitch' import { RecommendedVideosComponent } from '@app/videos/recommendations/recommended-videos.component' import { RecommendedVideosStore } from '@app/videos/recommendations/recommended-videos.store' import { CommonModule } from '@angular/common' @@ -7,6 +8,7 @@ import { RecentVideosRecommendationService } from '@app/videos/recommendations/r @NgModule({ imports: [ + InputSwitchModule, SharedModule, CommonModule ], diff --git a/client/src/app/videos/recommendations/recommended-videos.component.html b/client/src/app/videos/recommendations/recommended-videos.component.html index 5b5951f99..5f223078a 100644 --- a/client/src/app/videos/recommendations/recommended-videos.component.html +++ b/client/src/app/videos/recommendations/recommended-videos.component.html @@ -1,7 +1,13 @@