aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/server/config-command.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-06-23 10:29:43 +0200
committerChocobozzz <me@florianbigard.com>2022-06-23 10:30:48 +0200
commit53023be33af420675d0060eb95c99a8038457564 (patch)
tree699a13694b0c1c8589d10de95184708a451fcab4 /shared/server-commands/server/config-command.ts
parent50341c8fe988ca2a3d7c700f9aa918673dc979c2 (diff)
downloadPeerTube-53023be33af420675d0060eb95c99a8038457564.tar.gz
PeerTube-53023be33af420675d0060eb95c99a8038457564.tar.zst
PeerTube-53023be33af420675d0060eb95c99a8038457564.zip
Fix fast restream in saved permanent live
Diffstat (limited to 'shared/server-commands/server/config-command.ts')
-rw-r--r--shared/server-commands/server/config-command.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts
index 5320dead4..3803aaf95 100644
--- a/shared/server-commands/server/config-command.ts
+++ b/shared/server-commands/server/config-command.ts
@@ -39,15 +39,18 @@ export class ConfigCommand extends AbstractCommand {
39 enableLive (options: { 39 enableLive (options: {
40 allowReplay?: boolean 40 allowReplay?: boolean
41 transcoding?: boolean 41 transcoding?: boolean
42 resolutions?: 'min' | 'max' // Default max
42 } = {}) { 43 } = {}) {
44 const { allowReplay, transcoding, resolutions = 'max' } = options
45
43 return this.updateExistingSubConfig({ 46 return this.updateExistingSubConfig({
44 newConfig: { 47 newConfig: {
45 live: { 48 live: {
46 enabled: true, 49 enabled: true,
47 allowReplay: options.allowReplay ?? true, 50 allowReplay: allowReplay ?? true,
48 transcoding: { 51 transcoding: {
49 enabled: options.transcoding ?? true, 52 enabled: transcoding ?? true,
50 resolutions: ConfigCommand.getCustomConfigResolutions(true) 53 resolutions: ConfigCommand.getCustomConfigResolutions(resolutions === 'max')
51 } 54 }
52 } 55 }
53 } 56 }