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 | 13 |
1 files changed, 10 insertions, 3 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 156a3235a..f13acec40 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -37,6 +37,7 @@ import { PluginService } from '@app/core/plugins/plugin.service' | |||
37 | import { HooksService } from '@app/core/plugins/hooks.service' | 37 | import { HooksService } from '@app/core/plugins/hooks.service' |
38 | import { PlatformLocation } from '@angular/common' | 38 | import { PlatformLocation } from '@angular/common' |
39 | import { randomInt } from '@shared/core-utils/miscs/miscs' | 39 | import { randomInt } from '@shared/core-utils/miscs/miscs' |
40 | import { RecommendedVideosComponent } from '../recommendations/recommended-videos.component' | ||
40 | 41 | ||
41 | @Component({ | 42 | @Component({ |
42 | selector: 'my-video-watch', | 43 | selector: 'my-video-watch', |
@@ -436,10 +437,13 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
436 | 437 | ||
437 | this.player.one('ended', () => { | 438 | this.player.one('ended', () => { |
438 | if (this.playlist) { | 439 | if (this.playlist) { |
439 | this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) | 440 | if ( |
441 | this.user && this.user.autoPlayNextVideoPlaylist || | ||
442 | peertubeLocalStorage.getItem(VideoWatchPlaylistComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true' | ||
443 | ) this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) | ||
440 | } else if ( | 444 | } else if ( |
441 | this.user && this.user.autoPlayNextVideo || | 445 | this.user && this.user.autoPlayNextVideo || |
442 | peertubeLocalStorage.getItem(VideoWatchComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' | 446 | peertubeLocalStorage.getItem(RecommendedVideosComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO) === 'true' |
443 | ) { | 447 | ) { |
444 | this.zone.run(() => this.autoplayNext()) | 448 | this.zone.run(() => this.autoplayNext()) |
445 | } | 449 | } |
@@ -447,7 +451,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
447 | 451 | ||
448 | this.player.one('stopped', () => { | 452 | this.player.one('stopped', () => { |
449 | if (this.playlist) { | 453 | if (this.playlist) { |
450 | this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) | 454 | if ( |
455 | this.user && this.user.autoPlayNextVideoPlaylist || | ||
456 | peertubeLocalStorage.getItem(VideoWatchPlaylistComponent.LOCAL_STORAGE_AUTO_PLAY_NEXT_VIDEO_PLAYLIST) === 'true' | ||
457 | ) this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) | ||
451 | } | 458 | } |
452 | }) | 459 | }) |
453 | 460 | ||