diff options
Diffstat (limited to 'client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts')
-rw-r--r-- | client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts index 86c6e03e7..1a9bf5171 100644 --- a/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-caption-add-modal.component.ts | |||
@@ -5,7 +5,7 @@ import { VideoCaptionsValidatorsService } from '@app/shared/forms/form-validator | |||
5 | import { ServerService } from '@app/core' | 5 | import { ServerService } from '@app/core' |
6 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' | 6 | import { VideoCaptionEdit } from '@app/shared/video-caption/video-caption-edit.model' |
7 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | 7 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
8 | import { VideoConstant } from '../../../../../../shared' | 8 | import { ServerConfig, VideoConstant } from '../../../../../../shared' |
9 | 9 | ||
10 | @Component({ | 10 | @Component({ |
11 | selector: 'my-video-caption-add-modal', | 11 | selector: 'my-video-caption-add-modal', |
@@ -15,6 +15,7 @@ import { VideoConstant } from '../../../../../../shared' | |||
15 | 15 | ||
16 | export class VideoCaptionAddModalComponent extends FormReactive implements OnInit { | 16 | export class VideoCaptionAddModalComponent extends FormReactive implements OnInit { |
17 | @Input() existingCaptions: string[] | 17 | @Input() existingCaptions: string[] |
18 | @Input() serverConfig: ServerConfig | ||
18 | 19 | ||
19 | @Output() captionAdded = new EventEmitter<VideoCaptionEdit>() | 20 | @Output() captionAdded = new EventEmitter<VideoCaptionEdit>() |
20 | 21 | ||
@@ -35,15 +36,16 @@ export class VideoCaptionAddModalComponent extends FormReactive implements OnIni | |||
35 | } | 36 | } |
36 | 37 | ||
37 | get videoCaptionExtensions () { | 38 | get videoCaptionExtensions () { |
38 | return this.serverService.getConfig().videoCaption.file.extensions | 39 | return this.serverConfig.videoCaption.file.extensions |
39 | } | 40 | } |
40 | 41 | ||
41 | get videoCaptionMaxSize () { | 42 | get videoCaptionMaxSize () { |
42 | return this.serverService.getConfig().videoCaption.file.size.max | 43 | return this.serverConfig.videoCaption.file.size.max |
43 | } | 44 | } |
44 | 45 | ||
45 | ngOnInit () { | 46 | ngOnInit () { |
46 | this.videoCaptionLanguages = this.serverService.getVideoLanguages() | 47 | this.serverService.getVideoLanguages() |
48 | .subscribe(languages => this.videoCaptionLanguages = languages) | ||
47 | 49 | ||
48 | this.buildForm({ | 50 | this.buildForm({ |
49 | language: this.videoCaptionsValidatorsService.VIDEO_CAPTION_LANGUAGE, | 51 | language: this.videoCaptionsValidatorsService.VIDEO_CAPTION_LANGUAGE, |