}
]
})
-export class VideoLiveModel extends Model<VideoLiveModel> {
+export class VideoLiveModel extends Model {
@AllowNull(true)
@Column(DataType.STRING)
@AllowNull(false)
@Column
- perpetualLive: boolean
+ saveReplay: boolean
@AllowNull(false)
@Column
- saveReplay: boolean
+ permanentLive: boolean
@CreatedAt
createdAt: Date
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,
+ permanentLive: this.permanentLive,
+ saveReplay: this.saveReplay
}
}
}