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 | 11 |
1 files changed, 11 insertions, 0 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 d542f243c..d3d04d236 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -474,6 +474,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
474 | }) | 474 | }) |
475 | } | 475 | } |
476 | 476 | ||
477 | private hasNextVideo () { | ||
478 | if (this.playlist) { | ||
479 | return this.videoWatchPlaylist.hasNextVideo() | ||
480 | } | ||
481 | |||
482 | return true | ||
483 | } | ||
484 | |||
477 | private playNextVideoInAngularZone () { | 485 | private playNextVideoInAngularZone () { |
478 | if (this.playlist) { | 486 | if (this.playlist) { |
479 | this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) | 487 | this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo()) |
@@ -559,6 +567,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
559 | autoplay: this.isAutoplay(), | 567 | autoplay: this.isAutoplay(), |
560 | p2pEnabled: isP2PEnabled(video, this.serverConfig, loggedInOrAnonymousUser.p2pEnabled), | 568 | p2pEnabled: isP2PEnabled(video, this.serverConfig, loggedInOrAnonymousUser.p2pEnabled), |
561 | 569 | ||
570 | hasNextVideo: () => this.hasNextVideo(), | ||
562 | nextVideo: () => this.playNextVideoInAngularZone(), | 571 | nextVideo: () => this.playNextVideoInAngularZone(), |
563 | 572 | ||
564 | playerElement: this.playerElement, | 573 | playerElement: this.playerElement, |
@@ -615,6 +624,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
615 | 624 | ||
616 | // Only set this if we're in a playlist | 625 | // Only set this if we're in a playlist |
617 | if (this.playlist) { | 626 | if (this.playlist) { |
627 | options.common.hasPreviousVideo = () => this.videoWatchPlaylist.hasPreviousVideo() | ||
628 | |||
618 | options.common.previousVideo = () => { | 629 | options.common.previousVideo = () => { |
619 | this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo()) | 630 | this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo()) |
620 | } | 631 | } |