aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-06-12 17:26:23 +0200
committerChocobozzz <me@florianbigard.com>2019-06-12 17:26:23 +0200
commit00aa1f0d9b9a976a102773cb520f2464ef5c7540 (patch)
tree90ed4d44d75470ff0890332fe6038422859b2f11 /client/src/app/+admin
parenta80e84f047dc3d2229f1c5df9f008298fafb85a0 (diff)
downloadPeerTube-00aa1f0d9b9a976a102773cb520f2464ef5c7540.tar.gz
PeerTube-00aa1f0d9b9a976a102773cb520f2464ef5c7540.tar.zst
PeerTube-00aa1f0d9b9a976a102773cb520f2464ef5c7540.zip
Add 4k conf in transcoding in admin panel
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html4
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts35
2 files changed, 29 insertions, 10 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
index 44fc6dc26..d5b625d9c 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
@@ -309,8 +309,8 @@
309 <ng-container formGroupName="resolutions"> 309 <ng-container formGroupName="resolutions">
310 <div class="form-group" *ngFor="let resolution of resolutions"> 310 <div class="form-group" *ngFor="let resolution of resolutions">
311 <my-peertube-checkbox 311 <my-peertube-checkbox
312 [inputName]="getResolutionKey(resolution)" [formControlName]="resolution" 312 [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
313 i18n-labelText labelText="Resolution {{resolution}} enabled" 313 i18n-labelText labelText="Resolution {{resolution.label}} enabled"
314 ></my-peertube-checkbox> 314 ></my-peertube-checkbox>
315 </div> 315 </div>
316 </ng-container> 316 </ng-container>
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index c238a6c81..055bae851 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -15,7 +15,7 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val
15export class EditCustomConfigComponent extends FormReactive implements OnInit { 15export class EditCustomConfigComponent extends FormReactive implements OnInit {
16 customConfig: CustomConfig 16 customConfig: CustomConfig
17 17
18 resolutions: string[] = [] 18 resolutions: { id: string, label: string }[] = []
19 transcodingThreadOptions: { label: string, value: number }[] = [] 19 transcodingThreadOptions: { label: string, value: number }[] = []
20 20
21 constructor ( 21 constructor (
@@ -30,11 +30,30 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
30 super() 30 super()
31 31
32 this.resolutions = [ 32 this.resolutions = [
33 this.i18n('240p'), 33 {
34 this.i18n('360p'), 34 id: '240p',
35 this.i18n('480p'), 35 label: this.i18n('240p')
36 this.i18n('720p'), 36 },
37 this.i18n('1080p') 37 {
38 id: '360p',
39 label: this.i18n('360p')
40 },
41 {
42 id: '480p',
43 label: this.i18n('480p')
44 },
45 {
46 id: '720p',
47 label: this.i18n('720p')
48 },
49 {
50 id: '1080p',
51 label: this.i18n('1080p')
52 },
53 {
54 id: '2160p',
55 label: this.i18n('2160p')
56 }
38 ] 57 ]
39 58
40 this.transcodingThreadOptions = [ 59 this.transcodingThreadOptions = [
@@ -140,8 +159,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
140 } 159 }
141 } 160 }
142 for (const resolution of this.resolutions) { 161 for (const resolution of this.resolutions) {
143 defaultValues.transcoding.resolutions[resolution] = 'false' 162 defaultValues.transcoding.resolutions[resolution.id] = 'false'
144 formGroupData.transcoding.resolutions[resolution] = null 163 formGroupData.transcoding.resolutions[resolution.id] = null
145 } 164 }
146 165
147 this.buildForm(formGroupData) 166 this.buildForm(formGroupData)