@Column
error: LiveVideoError
+ @AllowNull(false)
+ @Column
+ saveReplay: boolean
+
+ @AllowNull(false)
+ @Column
+ endingProcessed: boolean
+
@ForeignKey(() => VideoModel)
@Column
replayVideoId: number
})
}
+ static findLatestSessionOf (videoId: number) {
+ return VideoLiveSessionModel.findOne({
+ where: {
+ liveVideoId: videoId
+ },
+ order: [ [ 'startDate', 'DESC' ] ]
+ })
+ }
+
static listSessionsOfLiveForAPI (options: { videoId: number }) {
const { videoId } = options
endDate: this.endDate
? this.endDate.toISOString()
: null,
+ endingProcessed: this.endingProcessed,
+ saveReplay: this.saveReplay,
replayVideo,
error: this.error
}