diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-04 13:40:02 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-03-09 09:23:10 +0100 |
commit | f443a74649174b2f9347c158e30f8ac7aa3e958a (patch) | |
tree | e423bc4e2307477bda4341037b7fa04ad10adae6 /server/models/video/video-live.ts | |
parent | 01dd04cd5ab7b55d2a9af7d0ebf405bee9579b09 (diff) | |
download | PeerTube-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.ts | 11 |
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 @@ | |||
1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' | 1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' |
2 | import { CONFIG } from '@server/initializers/config' | ||
2 | import { WEBSERVER } from '@server/initializers/constants' | 3 | import { WEBSERVER } from '@server/initializers/constants' |
3 | import { MVideoLive, MVideoLiveVideo } from '@server/types/models' | 4 | import { MVideoLive, MVideoLiveVideo } from '@server/types/models' |
5 | import { LiveVideo, LiveVideoLatencyMode, VideoState } from '@shared/models' | ||
4 | import { AttributesOnly } from '@shared/typescript-utils' | 6 | import { AttributesOnly } from '@shared/typescript-utils' |
5 | import { LiveVideo, VideoState } from '@shared/models' | ||
6 | import { VideoModel } from './video' | 7 | import { VideoModel } from './video' |
7 | import { VideoBlacklistModel } from './video-blacklist' | 8 | import { VideoBlacklistModel } from './video-blacklist' |
8 | import { 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 | } |