]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-live.ts
Add ability to save live replay
[github/Chocobozzz/PeerTube.git] / server / models / video / video-live.ts
index 8608bc84ca9f654ff2b262904ef4072ff177b15d..345918cb9d6e0dad4b5b8848ecad9e46d54d7750 100644 (file)
@@ -30,10 +30,14 @@ import { VideoBlacklistModel } from './video-blacklist'
 })
 export class VideoLiveModel extends Model<VideoLiveModel> {
 
-  @AllowNull(false)
+  @AllowNull(true)
   @Column(DataType.STRING)
   streamKey: string
 
+  @AllowNull(false)
+  @Column
+  saveReplay: boolean
+
   @CreatedAt
   createdAt: Date
 
@@ -90,7 +94,8 @@ export class VideoLiveModel extends Model<VideoLiveModel> {
   toFormattedJSON (): LiveVideo {
     return {
       rtmpUrl: WEBSERVER.RTMP_URL,
-      streamKey: this.streamKey
+      streamKey: this.streamKey,
+      saveReplay: this.saveReplay
     }
   }
 }