aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-04 13:40:02 +0100
committerChocobozzz <chocobozzz@cpy.re>2022-03-09 09:23:10 +0100
commitf443a74649174b2f9347c158e30f8ac7aa3e958a (patch)
treee423bc4e2307477bda4341037b7fa04ad10adae6 /server/models/video/video-live.ts
parent01dd04cd5ab7b55d2a9af7d0ebf405bee9579b09 (diff)
downloadPeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.tar.gz
PeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.tar.zst
PeerTube-f443a74649174b2f9347c158e30f8ac7aa3e958a.zip
Add latency setting support
Diffstat (limited to 'server/models/video/video-live.ts')
-rw-r--r--server/models/video/video-live.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/models/video/video-live.ts b/server/models/video/video-live.ts
index e3fdcc0ba..904f712b4 100644
--- a/server/models/video/video-live.ts
+++ b/server/models/video/video-live.ts
@@ -1,11 +1,11 @@
1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { CONFIG } from '@server/initializers/config'
2import { WEBSERVER } from '@server/initializers/constants' 3import { WEBSERVER } from '@server/initializers/constants'
3import { MVideoLive, MVideoLiveVideo } from '@server/types/models' 4import { MVideoLive, MVideoLiveVideo } from '@server/types/models'
5import { LiveVideo, LiveVideoLatencyMode, VideoState } from '@shared/models'
4import { AttributesOnly } from '@shared/typescript-utils' 6import { AttributesOnly } from '@shared/typescript-utils'
5import { LiveVideo, VideoState } from '@shared/models'
6import { VideoModel } from './video' 7import { VideoModel } from './video'
7import { VideoBlacklistModel } from './video-blacklist' 8import { VideoBlacklistModel } from './video-blacklist'
8import { CONFIG } from '@server/initializers/config'
9 9
10@DefaultScope(() => ({ 10@DefaultScope(() => ({
11 include: [ 11 include: [
@@ -44,6 +44,10 @@ export class VideoLiveModel extends Model<Partial<AttributesOnly<VideoLiveModel>
44 @Column 44 @Column
45 permanentLive: boolean 45 permanentLive: boolean
46 46
47 @AllowNull(false)
48 @Column
49 latencyMode: LiveVideoLatencyMode
50
47 @CreatedAt 51 @CreatedAt
48 createdAt: Date 52 createdAt: Date
49 53
@@ -113,7 +117,8 @@ export class VideoLiveModel extends Model<Partial<AttributesOnly<VideoLiveModel>
113 117
114 streamKey: this.streamKey, 118 streamKey: this.streamKey,
115 permanentLive: this.permanentLive, 119 permanentLive: this.permanentLive,
116 saveReplay: this.saveReplay 120 saveReplay: this.saveReplay,
121 latencyMode: this.latencyMode
117 } 122 }
118 } 123 }
119} 124}