aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-03-11 11:11:00 +0100
committerChocobozzz <me@florianbigard.com>2022-03-11 11:11:00 +0100
commit4495806f2f5045a0626ab64f43b5fc4deefe2ac0 (patch)
treee83b61b8da313fe1add571b9dd73261828c38cf9 /shared
parent052bdb7c120b2ac7a1616a8072f9eedd2ab2f4b6 (diff)
parent58ae266bada2233945c4446220c22ccc4e7c62b5 (diff)
downloadPeerTube-4495806f2f5045a0626ab64f43b5fc4deefe2ac0.tar.gz
PeerTube-4495806f2f5045a0626ab64f43b5fc4deefe2ac0.tar.zst
PeerTube-4495806f2f5045a0626ab64f43b5fc4deefe2ac0.zip
Merge remote-tracking branch 'weblate/develop' into develop
Diffstat (limited to 'shared')
-rw-r--r--shared/models/activitypub/objects/video-torrent-object.ts3
-rw-r--r--shared/models/server/custom-config.model.ts4
-rw-r--r--shared/models/server/server-config.model.ts6
-rw-r--r--shared/models/videos/live/index.ts1
-rw-r--r--shared/models/videos/live/live-video-create.model.ts2
-rw-r--r--shared/models/videos/live/live-video-latency-mode.enum.ts5
-rw-r--r--shared/models/videos/live/live-video-update.model.ts3
-rw-r--r--shared/models/videos/live/live-video.model.ts4
-rw-r--r--shared/server-commands/server/config-command.ts3
9 files changed, 29 insertions, 2 deletions
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts
index 9faa3bb87..23d54bdbd 100644
--- a/shared/models/activitypub/objects/video-torrent-object.ts
+++ b/shared/models/activitypub/objects/video-torrent-object.ts
@@ -5,7 +5,7 @@ import {
5 ActivityTagObject, 5 ActivityTagObject,
6 ActivityUrlObject 6 ActivityUrlObject
7} from './common-objects' 7} from './common-objects'
8import { VideoState } from '../../videos' 8import { LiveVideoLatencyMode, VideoState } from '../../videos'
9 9
10export interface VideoObject { 10export interface VideoObject {
11 type: 'Video' 11 type: 'Video'
@@ -25,6 +25,7 @@ export interface VideoObject {
25 isLiveBroadcast: boolean 25 isLiveBroadcast: boolean
26 liveSaveReplay: boolean 26 liveSaveReplay: boolean
27 permanentLive: boolean 27 permanentLive: boolean
28 latencyMode: LiveVideoLatencyMode
28 29
29 commentsEnabled: boolean 30 commentsEnabled: boolean
30 downloadEnabled: boolean 31 downloadEnabled: boolean
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts
index c9e7654de..5df606566 100644
--- a/shared/models/server/custom-config.model.ts
+++ b/shared/models/server/custom-config.model.ts
@@ -131,6 +131,10 @@ export interface CustomConfig {
131 131
132 allowReplay: boolean 132 allowReplay: boolean
133 133
134 latencySetting: {
135 enabled: boolean
136 }
137
134 maxDuration: number 138 maxDuration: number
135 maxInstanceLives: number 139 maxInstanceLives: number
136 maxUserLives: number 140 maxUserLives: number
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts
index b06019bb8..d7fbed13c 100644
--- a/shared/models/server/server-config.model.ts
+++ b/shared/models/server/server-config.model.ts
@@ -149,10 +149,14 @@ export interface ServerConfig {
149 live: { 149 live: {
150 enabled: boolean 150 enabled: boolean
151 151
152 allowReplay: boolean
153 latencySetting: {
154 enabled: boolean
155 }
156
152 maxDuration: number 157 maxDuration: number
153 maxInstanceLives: number 158 maxInstanceLives: number
154 maxUserLives: number 159 maxUserLives: number
155 allowReplay: boolean
156 160
157 transcoding: { 161 transcoding: {
158 enabled: boolean 162 enabled: boolean
diff --git a/shared/models/videos/live/index.ts b/shared/models/videos/live/index.ts
index a36f42a7d..68f32092a 100644
--- a/shared/models/videos/live/index.ts
+++ b/shared/models/videos/live/index.ts
@@ -1,5 +1,6 @@
1export * from './live-video-create.model' 1export * from './live-video-create.model'
2export * from './live-video-event-payload.model' 2export * from './live-video-event-payload.model'
3export * from './live-video-event.type' 3export * from './live-video-event.type'
4export * from './live-video-latency-mode.enum'
4export * from './live-video-update.model' 5export * from './live-video-update.model'
5export * from './live-video.model' 6export * from './live-video.model'
diff --git a/shared/models/videos/live/live-video-create.model.ts b/shared/models/videos/live/live-video-create.model.ts
index caa7acc17..49ccaf45b 100644
--- a/shared/models/videos/live/live-video-create.model.ts
+++ b/shared/models/videos/live/live-video-create.model.ts
@@ -1,6 +1,8 @@
1import { LiveVideoLatencyMode } from '.'
1import { VideoCreate } from '../video-create.model' 2import { VideoCreate } from '../video-create.model'
2 3
3export interface LiveVideoCreate extends VideoCreate { 4export interface LiveVideoCreate extends VideoCreate {
4 saveReplay?: boolean 5 saveReplay?: boolean
5 permanentLive?: boolean 6 permanentLive?: boolean
7 latencyMode?: LiveVideoLatencyMode
6} 8}
diff --git a/shared/models/videos/live/live-video-latency-mode.enum.ts b/shared/models/videos/live/live-video-latency-mode.enum.ts
new file mode 100644
index 000000000..4285e1d41
--- /dev/null
+++ b/shared/models/videos/live/live-video-latency-mode.enum.ts
@@ -0,0 +1,5 @@
1export const enum LiveVideoLatencyMode {
2 DEFAULT = 1,
3 HIGH_LATENCY = 2,
4 SMALL_LATENCY = 3
5}
diff --git a/shared/models/videos/live/live-video-update.model.ts b/shared/models/videos/live/live-video-update.model.ts
index a39c44797..93bb4d30d 100644
--- a/shared/models/videos/live/live-video-update.model.ts
+++ b/shared/models/videos/live/live-video-update.model.ts
@@ -1,4 +1,7 @@
1import { LiveVideoLatencyMode } from './live-video-latency-mode.enum'
2
1export interface LiveVideoUpdate { 3export interface LiveVideoUpdate {
2 permanentLive?: boolean 4 permanentLive?: boolean
3 saveReplay?: boolean 5 saveReplay?: boolean
6 latencyMode?: LiveVideoLatencyMode
4} 7}
diff --git a/shared/models/videos/live/live-video.model.ts b/shared/models/videos/live/live-video.model.ts
index 815a93804..2d3169941 100644
--- a/shared/models/videos/live/live-video.model.ts
+++ b/shared/models/videos/live/live-video.model.ts
@@ -1,8 +1,12 @@
1import { LiveVideoLatencyMode } from './live-video-latency-mode.enum'
2
1export interface LiveVideo { 3export interface LiveVideo {
2 rtmpUrl: string 4 rtmpUrl: string
3 rtmpsUrl: string 5 rtmpsUrl: string
4 6
5 streamKey: string 7 streamKey: string
8
6 saveReplay: boolean 9 saveReplay: boolean
7 permanentLive: boolean 10 permanentLive: boolean
11 latencyMode: LiveVideoLatencyMode
8} 12}
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts
index c0042060b..e47a0d346 100644
--- a/shared/server-commands/server/config-command.ts
+++ b/shared/server-commands/server/config-command.ts
@@ -292,6 +292,9 @@ export class ConfigCommand extends AbstractCommand {
292 live: { 292 live: {
293 enabled: true, 293 enabled: true,
294 allowReplay: false, 294 allowReplay: false,
295 latencySetting: {
296 enabled: false
297 },
295 maxDuration: -1, 298 maxDuration: -1,
296 maxInstanceLives: -1, 299 maxInstanceLives: -1,
297 maxUserLives: 50, 300 maxUserLives: 50,