]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-watch/video-watch.component.ts
Fix missing Account.name on getAuthUser return type.
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.ts
index d542f243cebd3b1822269dadc46e61ce38d6f48b..d3d04d2362960a80f2b886bc8783d4e41a055d3a 100644 (file)
@@ -474,6 +474,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
     })
   }
 
+  private hasNextVideo () {
+    if (this.playlist) {
+      return this.videoWatchPlaylist.hasNextVideo()
+    }
+
+    return true
+  }
+
   private playNextVideoInAngularZone () {
     if (this.playlist) {
       this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo())
@@ -559,6 +567,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
         autoplay: this.isAutoplay(),
         p2pEnabled: isP2PEnabled(video, this.serverConfig, loggedInOrAnonymousUser.p2pEnabled),
 
+        hasNextVideo: () => this.hasNextVideo(),
         nextVideo: () => this.playNextVideoInAngularZone(),
 
         playerElement: this.playerElement,
@@ -615,6 +624,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
 
     // Only set this if we're in a playlist
     if (this.playlist) {
+      options.common.hasPreviousVideo = () => this.videoWatchPlaylist.hasPreviousVideo()
+
       options.common.previousVideo = () => {
         this.zone.run(() => this.videoWatchPlaylist.navigateToPreviousPlaylistVideo())
       }