diff options
Diffstat (limited to 'client/src/app/+admin')
4 files changed, 23 insertions, 8 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html index 5d826fbe9..10d5278c1 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html | |||
@@ -153,7 +153,7 @@ | |||
153 | <my-select-options | 153 | <my-select-options |
154 | id="liveTranscodingProfile" | 154 | id="liveTranscodingProfile" |
155 | formControlName="profile" | 155 | formControlName="profile" |
156 | [items]="getAvailableTranscodingProfile()" | 156 | [items]="transcodingProfiles" |
157 | [clearable]="false" | 157 | [clearable]="false" |
158 | > | 158 | > |
159 | </my-select-options> | 159 | </my-select-options> |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts index 3328d28a9..72372ffac 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | 2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' |
3 | import { Component, Input, OnInit } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { ServerConfig } from '@shared/models' | 5 | import { ServerConfig } from '@shared/models' |
6 | import { ConfigService } from '../shared/config.service' | 6 | import { ConfigService } from '../shared/config.service' |
@@ -11,12 +11,14 @@ import { EditConfigurationService, ResolutionOption } from './edit-configuration | |||
11 | templateUrl: './edit-live-configuration.component.html', | 11 | templateUrl: './edit-live-configuration.component.html', |
12 | styleUrls: [ './edit-custom-config.component.scss' ] | 12 | styleUrls: [ './edit-custom-config.component.scss' ] |
13 | }) | 13 | }) |
14 | export class EditLiveConfigurationComponent implements OnInit { | 14 | export class EditLiveConfigurationComponent implements OnInit, OnChanges { |
15 | @Input() form: FormGroup | 15 | @Input() form: FormGroup |
16 | @Input() formErrors: any | 16 | @Input() formErrors: any |
17 | @Input() serverConfig: ServerConfig | 17 | @Input() serverConfig: ServerConfig |
18 | 18 | ||
19 | transcodingThreadOptions: SelectOptionsItem[] = [] | 19 | transcodingThreadOptions: SelectOptionsItem[] = [] |
20 | transcodingProfiles: SelectOptionsItem[] = [] | ||
21 | |||
20 | liveMaxDurationOptions: SelectOptionsItem[] = [] | 22 | liveMaxDurationOptions: SelectOptionsItem[] = [] |
21 | liveResolutions: ResolutionOption[] = [] | 23 | liveResolutions: ResolutionOption[] = [] |
22 | 24 | ||
@@ -39,7 +41,13 @@ export class EditLiveConfigurationComponent implements OnInit { | |||
39 | this.liveResolutions = this.editConfigurationService.getLiveResolutions() | 41 | this.liveResolutions = this.editConfigurationService.getLiveResolutions() |
40 | } | 42 | } |
41 | 43 | ||
42 | getAvailableTranscodingProfile () { | 44 | ngOnChanges (changes: SimpleChanges) { |
45 | if (changes['serverConfig']) { | ||
46 | this.transcodingProfiles = this.buildAvailableTranscodingProfile() | ||
47 | } | ||
48 | } | ||
49 | |||
50 | buildAvailableTranscodingProfile () { | ||
43 | const profiles = this.serverConfig.live.transcoding.availableProfiles | 51 | const profiles = this.serverConfig.live.transcoding.availableProfiles |
44 | 52 | ||
45 | return profiles.map(p => { | 53 | return profiles.map(p => { |
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html index cf13b27bb..1c5d6a9b4 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html | |||
@@ -181,7 +181,7 @@ | |||
181 | <my-select-options | 181 | <my-select-options |
182 | id="transcodingProfile" | 182 | id="transcodingProfile" |
183 | formControlName="profile" | 183 | formControlName="profile" |
184 | [items]="getAvailableTranscodingProfile()" | 184 | [items]="transcodingProfiles" |
185 | [clearable]="false" | 185 | [clearable]="false" |
186 | ></my-select-options> | 186 | ></my-select-options> |
187 | 187 | ||
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts index b864f1bc4..a2dc3e52a 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' | 2 | import { SelectOptionsItem } from 'src/types/select-options-item.model' |
3 | import { Component, Input, OnInit } from '@angular/core' | 3 | import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' |
4 | import { FormGroup } from '@angular/forms' | 4 | import { FormGroup } from '@angular/forms' |
5 | import { ServerConfig } from '@shared/models' | 5 | import { ServerConfig } from '@shared/models' |
6 | import { ConfigService } from '../shared/config.service' | 6 | import { ConfigService } from '../shared/config.service' |
@@ -11,12 +11,13 @@ import { EditConfigurationService, ResolutionOption } from './edit-configuration | |||
11 | templateUrl: './edit-vod-transcoding.component.html', | 11 | templateUrl: './edit-vod-transcoding.component.html', |
12 | styleUrls: [ './edit-custom-config.component.scss' ] | 12 | styleUrls: [ './edit-custom-config.component.scss' ] |
13 | }) | 13 | }) |
14 | export class EditVODTranscodingComponent implements OnInit { | 14 | export class EditVODTranscodingComponent implements OnInit, OnChanges { |
15 | @Input() form: FormGroup | 15 | @Input() form: FormGroup |
16 | @Input() formErrors: any | 16 | @Input() formErrors: any |
17 | @Input() serverConfig: ServerConfig | 17 | @Input() serverConfig: ServerConfig |
18 | 18 | ||
19 | transcodingThreadOptions: SelectOptionsItem[] = [] | 19 | transcodingThreadOptions: SelectOptionsItem[] = [] |
20 | transcodingProfiles: SelectOptionsItem[] = [] | ||
20 | resolutions: ResolutionOption[] = [] | 21 | resolutions: ResolutionOption[] = [] |
21 | 22 | ||
22 | constructor ( | 23 | constructor ( |
@@ -31,7 +32,13 @@ export class EditVODTranscodingComponent implements OnInit { | |||
31 | this.checkTranscodingFields() | 32 | this.checkTranscodingFields() |
32 | } | 33 | } |
33 | 34 | ||
34 | getAvailableTranscodingProfile () { | 35 | ngOnChanges (changes: SimpleChanges) { |
36 | if (changes['serverConfig']) { | ||
37 | this.transcodingProfiles = this.buildAvailableTranscodingProfile() | ||
38 | } | ||
39 | } | ||
40 | |||
41 | buildAvailableTranscodingProfile () { | ||
35 | const profiles = this.serverConfig.transcoding.availableProfiles | 42 | const profiles = this.serverConfig.transcoding.availableProfiles |
36 | 43 | ||
37 | return profiles.map(p => { | 44 | return profiles.map(p => { |