import { InstanceService } from '@app/shared/shared-instance'
import { VideoCaptionEdit, VideoEdit, VideoService } from '@app/shared/shared-main'
import {
+ HTMLServerConfig,
LiveVideo,
RegisterClientFormFieldOptions,
RegisterClientVideoFieldOptions,
- ServerConfig,
VideoConstant,
VideoDetails,
VideoPrivacy
calendarTimezone: string
calendarDateFormat: string
- serverConfig: ServerConfig
+ serverConfig: HTMLServerConfig
pluginFields: PluginField[] = []
this.serverService.getVideoPrivacies()
.subscribe(privacies => {
- this.videoPrivacies = this.videoService.explainedPrivacyLabels(privacies)
+ this.videoPrivacies = this.videoService.explainedPrivacyLabels(privacies).videoPrivacies
+
if (this.schedulePublicationPossible) {
this.videoPrivacies.push({
id: this.SPECIAL_SCHEDULED_PRIVACY,
}
})
- this.serverConfig = this.serverService.getTmpConfig()
- this.serverService.getConfig()
- .subscribe(config => this.serverConfig = config)
+ this.serverConfig = this.serverService.getHTMLConfig()
this.initialVideoCaptions = this.videoCaptions.map(c => c.language.id)
async deleteCaption (caption: VideoCaptionEdit) {
// Caption recovers his former state
- if (caption.action && this.initialVideoCaptions.indexOf(caption.language.id) !== -1) {
+ if (caption.action && this.initialVideoCaptions.includes(caption.language.id)) {
caption.action = undefined
return
}
private trackPrivacyChange () {
// We will update the schedule input and the wait transcoding checkbox validators
- this.form.controls[ 'privacy' ]
+ this.form.controls['privacy']
.valueChanges
.pipe(map(res => parseInt(res.toString(), 10)))
.subscribe(
private trackChannelChange () {
// We will update the "support" field depending on the channel
- this.form.controls[ 'channelId' ]
+ this.form.controls['channelId']
.valueChanges
.pipe(map(res => parseInt(res.toString(), 10)))
.subscribe(
newChannelId => {
- const oldChannelId = parseInt(this.form.value[ 'channelId' ], 10)
+ const oldChannelId = parseInt(this.form.value['channelId'], 10)
// Not initialized yet
if (isNaN(newChannelId)) return
// Wait support field update
setTimeout(() => {
- const currentSupport = this.form.value[ 'support' ]
+ const currentSupport = this.form.value['support']
// First time we set the channel?
if (isNaN(oldChannelId)) {