]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-live.ts
Fix stat file size with HLS
[github/Chocobozzz/PeerTube.git] / server / models / video / video-live.ts
index a1dd80d3c74bfe0d9cb6e5ce12f221ed2ad707e7..f3bff74ea93a24f2f025d0b8b9d9399fd790558b 100644 (file)
@@ -34,10 +34,6 @@ export class VideoLiveModel extends Model<VideoLiveModel> {
   @Column(DataType.STRING)
   streamKey: string
 
-  @AllowNull(false)
-  @Column
-  perpetualLive: boolean
-
   @AllowNull(false)
   @Column
   saveReplay: boolean
@@ -97,8 +93,13 @@ export class VideoLiveModel extends Model<VideoLiveModel> {
 
   toFormattedJSON (): LiveVideo {
     return {
-      rtmpUrl: WEBSERVER.RTMP_URL,
-      streamKey: this.streamKey
+      // If we don't have a stream key, it means this is a remote live so we don't specify the rtmp URL
+      rtmpUrl: this.streamKey
+        ? WEBSERVER.RTMP_URL
+        : null,
+
+      streamKey: this.streamKey,
+      saveReplay: this.saveReplay
     }
   }
 }