mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add basic video editor support
This commit is contained in:
@@ -59,6 +59,9 @@ export class ConfigCommand extends AbstractCommand {
|
||||
newConfig: {
|
||||
transcoding: {
|
||||
enabled: false
|
||||
},
|
||||
videoEditor: {
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -69,6 +72,10 @@ export class ConfigCommand extends AbstractCommand {
|
||||
newConfig: {
|
||||
transcoding: {
|
||||
enabled: true,
|
||||
|
||||
allowAudioFiles: true,
|
||||
allowAdditionalExtensions: true,
|
||||
|
||||
resolutions: ConfigCommand.getCustomConfigResolutions(true),
|
||||
|
||||
webtorrent: {
|
||||
@@ -82,6 +89,28 @@ export class ConfigCommand extends AbstractCommand {
|
||||
})
|
||||
}
|
||||
|
||||
enableMinimumTranscoding (webtorrent = true, hls = true) {
|
||||
return this.updateExistingSubConfig({
|
||||
newConfig: {
|
||||
transcoding: {
|
||||
enabled: true,
|
||||
resolutions: {
|
||||
...ConfigCommand.getCustomConfigResolutions(false),
|
||||
|
||||
'240p': true
|
||||
},
|
||||
|
||||
webtorrent: {
|
||||
enabled: webtorrent
|
||||
},
|
||||
hls: {
|
||||
enabled: hls
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getConfig (options: OverrideCommandOptions = {}) {
|
||||
const path = '/api/v1/config'
|
||||
|
||||
@@ -148,7 +177,7 @@ export class ConfigCommand extends AbstractCommand {
|
||||
async updateExistingSubConfig (options: OverrideCommandOptions & {
|
||||
newConfig: DeepPartial<CustomConfig>
|
||||
}) {
|
||||
const existing = await this.getCustomConfig(options)
|
||||
const existing = await this.getCustomConfig({ ...options, expectedStatus: HttpStatusCode.OK_200 })
|
||||
|
||||
return this.updateCustomConfig({ ...options, newCustomConfig: merge({}, existing, options.newConfig) })
|
||||
}
|
||||
@@ -282,6 +311,9 @@ export class ConfigCommand extends AbstractCommand {
|
||||
}
|
||||
}
|
||||
},
|
||||
videoEditor: {
|
||||
enabled: false
|
||||
},
|
||||
import: {
|
||||
videos: {
|
||||
concurrency: 3,
|
||||
|
||||
Reference in New Issue
Block a user