Fix next video button to support playlist videos
authorRigel Kent <sendmemail@rigelk.eu>
Tue, 17 Mar 2020 14:05:28 +0000 (15:05 +0100)
committerRigel Kent <sendmemail@rigelk.eu>
Tue, 17 Mar 2020 14:05:30 +0000 (15:05 +0100)
fixes #2523

client/src/app/videos/+video-watch/video-watch.component.ts

index 9ba14316caa5388b06e31b061a874225187ed170..51e48427501e1510a8676dda93d19345777b6eae 100644 (file)
@@ -541,7 +541,9 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
   }
 
   private autoplayNext () {
-    if (this.nextVideoUuid) {
+    if (this.playlist) {
+      this.zone.run(() => this.videoWatchPlaylist.navigateToNextPlaylistVideo())
+    } else if (this.nextVideoUuid) {
       this.router.navigate([ '/videos/watch', this.nextVideoUuid ])
     }
   }