import { ServerService } from '@app/core'
import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model'
import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
+import { VideoConstant } from '../../../../../../shared'
@Component({
selector: 'my-video-caption-add-modal',
@ViewChild('modal') modal: ElementRef
- videoCaptionLanguages = []
+ videoCaptionLanguages: VideoConstant<string>[] = []
private openedModal: NgbModalRef
private closingModal = false
hide () {
this.closingModal = true
this.openedModal.close()
+ this.form.reset()
}
isReplacingExistingCaption () {
}
async addCaption () {
- this.hide()
-
const languageId = this.form.value[ 'language' ]
const languageObject = this.videoCaptionLanguages.find(l => l.id === languageId)
captionfile: this.form.value[ 'captionfile' ]
})
- this.form.reset()
+ this.hide()
}
}