]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/video-watch.component.ts
Improve abstract videos list
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / video-watch.component.ts
index ddd0f17661bb64c1e1488c38b928c36e2b5270d7..cedbbf985536ae1abcc6d256bb2d937eb38e90bd 100644 (file)
@@ -50,6 +50,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
 
   player: any
   playerElement: HTMLVideoElement
+  theaterEnabled = false
   userRating: UserVideoRateType = null
   video: VideoDetails = null
   descriptionLoading = false
@@ -58,7 +59,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
   playlistVideos: Video[] = []
   playlistPagination: ComponentPagination = {
     currentPage: 1,
-    itemsPerPage: 10,
+    itemsPerPage: 30,
     totalItems: null
   }
   noPlaylistVideos = false
@@ -401,7 +402,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
   }
 
   private loadPlaylistElements (redirectToFirst = false) {
-    this.videoService.getPlaylistVideos(this.playlist.id, this.playlistPagination)
+    this.videoService.getPlaylistVideos(this.playlist.uuid, this.playlistPagination)
         .subscribe(({ totalVideos, videos }) => {
           this.playlistVideos = this.playlistVideos.concat(videos)
           this.playlistPagination.totalItems = totalVideos
@@ -572,6 +573,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
 
     this.zone.runOutsideAngular(async () => {
       this.player = await PeertubePlayerManager.initialize(mode, options)
+      this.theaterEnabled = this.player.theaterEnabled
+
       this.player.on('customError', ({ err }: { err: any }) => this.handleError(err))
 
       this.player.on('timeupdate', () => {
@@ -589,6 +592,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
           this.zone.run(() => this.navigateToNextPlaylistVideo())
         }
       })
+
+      this.player.on('theaterChange', (_: any, enabled: boolean) => {
+        this.zone.run(() => this.theaterEnabled = enabled)
+      })
     })
 
     this.setVideoDescriptionHTML()