]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-live.ts
Add logo licence to README
[github/Chocobozzz/PeerTube.git] / server / models / video / video-live.ts
index 0bc8da02231f10daa64e7b92249cb30e9b821a2a..904f712b4a3021bf836def4e7b17463ff1fb6cc7 100644 (file)
@@ -1,11 +1,11 @@
 import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
+import { CONFIG } from '@server/initializers/config'
 import { WEBSERVER } from '@server/initializers/constants'
 import { MVideoLive, MVideoLiveVideo } from '@server/types/models'
-import { AttributesOnly } from '@shared/core-utils'
-import { LiveVideo, VideoState } from '@shared/models'
+import { LiveVideo, LiveVideoLatencyMode, VideoState } from '@shared/models'
+import { AttributesOnly } from '@shared/typescript-utils'
 import { VideoModel } from './video'
 import { VideoBlacklistModel } from './video-blacklist'
-import { CONFIG } from '@server/initializers/config'
 
 @DefaultScope(() => ({
   include: [
@@ -44,6 +44,10 @@ export class VideoLiveModel extends Model<Partial<AttributesOnly<VideoLiveModel>
   @Column
   permanentLive: boolean
 
+  @AllowNull(false)
+  @Column
+  latencyMode: LiveVideoLatencyMode
+
   @CreatedAt
   createdAt: Date
 
@@ -113,7 +117,8 @@ export class VideoLiveModel extends Model<Partial<AttributesOnly<VideoLiveModel>
 
       streamKey: this.streamKey,
       permanentLive: this.permanentLive,
-      saveReplay: this.saveReplay
+      saveReplay: this.saveReplay,
+      latencyMode: this.latencyMode
     }
   }
 }