]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-video-live/live-stream-information.component.ts
Prevent layout shift in videos list
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-video-live / live-stream-information.component.ts
index 1cf6f852844d0388da7dcc1e28be513bb2c3ac2c..3dd59bb572933badb6dbae7a58f578ca14b2b66a 100644 (file)
@@ -49,11 +49,18 @@ export class LiveStreamInformationComponent {
     return errors[session.error]
   }
 
+  isReplayBeingProcessed (session: LiveVideoSession) {
+    // Running live
+    if (!session.endDate) return false
+
+    return session.saveReplay && !session.endingProcessed
+  }
+
   private loadLiveInfo (video: Video) {
     this.liveVideoService.getVideoLive(video.id)
       .subscribe(live => this.live = live)
 
     this.liveVideoService.listSessions(video.id)
-      .subscribe(({ data }) => this.latestLiveSessions = data.slice(0, 5))
+      .subscribe(({ data }) => this.latestLiveSessions = data.reverse().slice(0, 5))
   }
 }