import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component'
import { VideoCaptionEditModalComponent } from './video-caption-edit-modal/video-caption-edit-modal.component'
import { VideoEditType } from './video-edit.type'
+import { VideoSource } from '@shared/models/videos/video-source'
+import { logger } from '@root-helpers/logger'
type VideoLanguages = VideoConstant<string> & { group?: string }
type PluginField = {
@Input() forbidScheduledPublication = true
@Input() videoCaptions: VideoCaptionWithPathEdit[] = []
+ @Input() videoSource: VideoSource
@Input() waitTranscodingEnabled = true
@Input() type: VideoEditType
this.trackChannelChange()
this.trackPrivacyChange()
- this.trackLivePermanentFieldChange()
this.formBuilt.emit()
}
const oldChannel = this.userVideoChannels.find(c => c.id === oldChannelId)
if (!newChannel || !oldChannel) {
- console.error('Cannot find new or old channel.')
+ logger.error('Cannot find new or old channel.')
return
}
)
}
- private trackLivePermanentFieldChange () {
- // We will update the "support" field depending on the channel
- this.form.controls['permanentLive']
- .valueChanges
- .subscribe(
- permanentLive => {
- const saveReplayControl = this.form.controls['saveReplay']
-
- if (permanentLive === true) {
- saveReplayControl.setValue(false)
- saveReplayControl.disable()
- } else {
- saveReplayControl.enable()
- }
- }
- )
- }
-
private updateSupportField (support: string) {
return this.form.patchValue({ support: support || '' })
}