diff options
Diffstat (limited to 'client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html')
-rw-r--r-- | client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html | 46 |
1 files changed, 27 insertions, 19 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 4b1a55245..65fc31412 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 | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | <ng-container ngProjectAs="extra"> | 26 | <ng-container ngProjectAs="extra"> |
27 | 27 | ||
28 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | 28 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
29 | <my-peertube-checkbox | 29 | <my-peertube-checkbox |
30 | inputName="liveAllowReplay" formControlName="allowReplay" | 30 | inputName="liveAllowReplay" formControlName="allowReplay" |
31 | i18n-labelText labelText="Allow your users to automatically publish a replay of their live" | 31 | i18n-labelText labelText="Allow your users to automatically publish a replay of their live" |
@@ -36,23 +36,29 @@ | |||
36 | </my-peertube-checkbox> | 36 | </my-peertube-checkbox> |
37 | </div> | 37 | </div> |
38 | 38 | ||
39 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | 39 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
40 | <label i18n for="liveMaxInstanceLives">Max simultaneous lives created on your instance <span class="text-muted">(-1 for "unlimited")</span></label> | 40 | <label i18n for="liveMaxInstanceLives"> |
41 | Max simultaneous lives created on your instance <span class="text-muted">(-1 for "unlimited")</span> | ||
42 | </label> | ||
43 | |||
41 | <div class="number-with-unit"> | 44 | <div class="number-with-unit"> |
42 | <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" /> | 45 | <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" /> |
43 | <span i18n>{form.value['live']['maxInstanceLives'], plural, =1 {live} other {lives}}</span> | 46 | <span i18n>{form.value['live']['maxInstanceLives'], plural, =1 {live} other {lives}}</span> |
44 | </div> | 47 | </div> |
45 | </div> | 48 | </div> |
46 | 49 | ||
47 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | 50 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
48 | <label i18n for="liveMaxUserLives">Max simultaneous lives created per user <span class="text-muted">(-1 for "unlimited")</span></label> | 51 | <label i18n for="liveMaxUserLives"> |
52 | Max simultaneous lives created per user <span class="text-muted">(-1 for "unlimited")</span> | ||
53 | </label> | ||
54 | |||
49 | <div class="number-with-unit"> | 55 | <div class="number-with-unit"> |
50 | <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" /> | 56 | <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" /> |
51 | <span i18n>{form.value['live']['maxUserLives'], plural, =1 {live} other {lives}}</span> | 57 | <span i18n>{form.value['live']['maxUserLives'], plural, =1 {live} other {lives}}</span> |
52 | </div> | 58 | </div> |
53 | </div> | 59 | </div> |
54 | 60 | ||
55 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | 61 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
56 | <label i18n for="liveMaxDuration">Max live duration</label> | 62 | <label i18n for="liveMaxDuration">Max live duration</label> |
57 | 63 | ||
58 | <my-select-options | 64 | <my-select-options |
@@ -81,7 +87,7 @@ | |||
81 | <ng-container formGroupName="live"> | 87 | <ng-container formGroupName="live"> |
82 | <ng-container formGroupName="transcoding"> | 88 | <ng-container formGroupName="transcoding"> |
83 | 89 | ||
84 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }"> | 90 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
85 | <my-peertube-checkbox | 91 | <my-peertube-checkbox |
86 | inputName="liveTranscodingEnabled" formControlName="enabled" | 92 | inputName="liveTranscodingEnabled" formControlName="enabled" |
87 | > | 93 | > |
@@ -91,11 +97,12 @@ | |||
91 | </my-peertube-checkbox> | 97 | </my-peertube-checkbox> |
92 | </div> | 98 | </div> |
93 | 99 | ||
94 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | 100 | <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()"> |
95 | <label i18n for="liveTranscodingThreads">Live resolutions to generate</label> | 101 | <label i18n for="liveTranscodingThreads">Live resolutions to generate</label> |
96 | 102 | ||
97 | <div class="ml-2 mt-2 d-flex flex-column"> | 103 | <div class="ml-2 mt-2 d-flex flex-column"> |
98 | <ng-container formGroupName="resolutions"> | 104 | <ng-container formGroupName="resolutions"> |
105 | |||
99 | <div class="form-group" *ngFor="let resolution of liveResolutions"> | 106 | <div class="form-group" *ngFor="let resolution of liveResolutions"> |
100 | <my-peertube-checkbox | 107 | <my-peertube-checkbox |
101 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | 108 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" |
@@ -106,15 +113,22 @@ | |||
106 | </ng-template> | 113 | </ng-template> |
107 | </my-peertube-checkbox> | 114 | </my-peertube-checkbox> |
108 | </div> | 115 | </div> |
116 | |||
109 | </ng-container> | 117 | </ng-container> |
110 | </div> | 118 | </div> |
111 | </div> | 119 | </div> |
112 | 120 | ||
113 | <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | 121 | <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()"> |
114 | <label i18n for="liveTranscodingThreads">Live transcoding threads</label> | 122 | <label i18n for="liveTranscodingThreads">Live transcoding threads</label> |
123 | |||
115 | <span class="text-muted ml-1"> | 124 | <span class="text-muted ml-1"> |
116 | <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n>will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding</ng-container> | 125 | <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n> |
117 | <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n>will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding</ng-container> | 126 | will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding |
127 | </ng-container> | ||
128 | |||
129 | <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n> | ||
130 | will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding | ||
131 | </ng-container> | ||
118 | </span> | 132 | </span> |
119 | 133 | ||
120 | <my-select-custom-value | 134 | <my-select-custom-value |
@@ -126,7 +140,7 @@ | |||
126 | <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div> | 140 | <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div> |
127 | </div> | 141 | </div> |
128 | 142 | ||
129 | <div class="form-group mt-4" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }"> | 143 | <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()"> |
130 | <label i18n for="liveTranscodingProfile">Live transcoding profile</label> | 144 | <label i18n for="liveTranscodingProfile">Live transcoding profile</label> |
131 | <span class="text-muted ml-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span> | 145 | <span class="text-muted ml-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span> |
132 | 146 | ||
@@ -136,14 +150,8 @@ | |||
136 | [items]="getAvailableTranscodingProfile()" | 150 | [items]="getAvailableTranscodingProfile()" |
137 | [clearable]="false" | 151 | [clearable]="false" |
138 | > | 152 | > |
139 | <ng-template ng-option-tmp let-item="item" let-index="index"> | ||
140 | {{ item }} | ||
141 | <ng-container *ngIf="item === 'default'"> | ||
142 | <br> | ||
143 | <span class="text-muted" i18n>x264, targeting maximum device compatibility</span> | ||
144 | </ng-container> | ||
145 | </ng-template> | ||
146 | </my-select-options> | 153 | </my-select-options> |
154 | |||
147 | <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div> | 155 | <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div> |
148 | </div> | 156 | </div> |
149 | 157 | ||