aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2019-12-10 23:15:09 +0100
committerChocobozzz <chocobozzz@cpy.re>2019-12-13 09:13:43 +0100
commitd816f3a063febac1cad09ab3a32e5f0d29353627 (patch)
tree2c74b4f3503bd5fe58c2761804fa3c0aa68ae957 /client/src/app/videos/+video-watch
parent2f6b5e2d6ebcac88d9005ea2654ffa77907d5db2 (diff)
downloadPeerTube-d816f3a063febac1cad09ab3a32e5f0d29353627.tar.gz
PeerTube-d816f3a063febac1cad09ab3a32e5f0d29353627.tar.zst
PeerTube-d816f3a063febac1cad09ab3a32e5f0d29353627.zip
autoplay next video switch for both user and visitors
Diffstat (limited to 'client/src/app/videos/+video-watch')
-rw-r--r--client/src/app/videos/+video-watch/video-watch.component.ts6
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})
46export class VideoWatchComponent implements OnInit, OnDestroy { 46export 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 })