]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
reword unclear sentences, check for grammar
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / config / edit-custom-config / edit-custom-config.component.html
index 8000f471fe80e96dee4718f2ba07608c315013f9..f8f379d47da63cfd1f422994a292649223a85435 100644 (file)
                     i18n-labelText labelText="Allow users to do remote URI/handle search"
                   >
                     <ng-container ngProjectAs="description">
-                      <span i18n>Allow <strong>your users</strong> to look up remote videos/actors by their URI, that may not be federated with your instance</span>
+                      <span i18n>Allow <strong>your users</strong> to look up remote videos/actors that may not be federated with your instance</span>
                     </ng-container>
                   </my-peertube-checkbox>
                 </div>
                     i18n-labelText labelText="Allow anonymous to do remote URI/handle search"
                   >
                     <ng-container ngProjectAs="description">
-                      <span i18n>Allow <strong>anonymous users</strong> to look up remote videos/actors by their URI, that may not be federated with your instance</span>
+                      <span i18n>Allow <strong>anonymous users</strong> to look up remote videos/actors that may not be federated with your instance</span>
                     </ng-container>
                   </my-peertube-checkbox>
                 </div>
                     <ng-template ptTemplate="help">
                       <ng-container i18n>
                         If your instance is explicitly allowed by Twitter, a video player will be embedded in the Twitter feed on PeerTube video share.<br />
-                        If the instance is not, we use an image link card that will redirect on your PeerTube instance.<br /><br />
+                        If the instance is not, we use an image link card that will redirect to your PeerTube instance.<br /><br />
                         Check this checkbox, save the configuration and test with a video URL of your instance (https://example.com/videos/watch/blabla) on
                         <a target='_blank' rel='noopener noreferrer' href='https://cards-dev.twitter.com/validator'>https://cards-dev.twitter.com/validator</a>
                         to see if you instance is allowed.
       </ng-template>
     </ng-container>
 
-    <ng-container ngbNavItem="live">
+    <div ngbNavItem="live">
       <a ngbNavLink i18n>Live streaming</a>
 
       <ng-template ngbNavContent>
           <div class="form-group col-12 col-lg-4 col-xl-3">
             <div i18n class="inner-form-title">LIVE</div>
             <div i18n class="inner-form-description">
-              Add ability for your users to do live streaming on your instance.
+              Enable users of your instance to stream live.
             </div>
           </div>
 
                     <ng-container i18n>Allow live streaming</ng-container>
                   </ng-template>
 
-                  <ng-template ptTemplate="help">
-                    <ng-container i18n>Enabling live streaming requires trust in your users and extra moderation work</ng-container>
-                  </ng-template>
+                  <ng-container ngProjectAs="description" i18n>
+                    ⚠️ Enabling live streaming requires trust in your users and extra moderation work
+                  </ng-container>
 
-                  <ng-container ngProjectAs="extra" formGroupName="transcoding">
+                  <ng-container ngProjectAs="extra">
 
                     <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }">
                       <my-peertube-checkbox
-                        inputName="liveTranscodingEnabled" formControlName="enabled"
-                        i18n-labelText labelText="Enable live transcoding"
+                        inputName="liveAllowReplay" formControlName="allowReplay"
+                        i18n-labelText labelText="Allow your users to automatically publish a replay of their live"
                       >
-                        <ng-container ngProjectAs="description">
-                          Requires a lot of CPU!
+                        <ng-container ngProjectAs="description" i18n>
+                          If the user quota is reached, PeerTube will automatically terminate the live streaming
                         </ng-container>
                       </my-peertube-checkbox>
                     </div>
 
-                    <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }">
-                      <label i18n for="liveTranscodingThreads">Live transcoding threads</label>
+                    <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }">
+                      <label i18n for="liveMaxInstanceLives">Max lives created on your instance (-1 for "unlimited")</label>
+                      <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" />
+                    </div>
+
+                    <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }">
+                      <label i18n for="liveMaxUserLives">Max lives created per user (-1 for "unlimited")</label>
+                      <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" />
+                    </div>
+
+                    <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }">
+                      <label i18n for="liveMaxDuration">Max live duration</label>
                       <div class="peertube-select-container">
-                        <select id="liveTranscodingThreads" formControlName="threads" class="form-control">
-                          <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value">
-                            {{ transcodingThreadOption.label }}
+                        <select id="liveMaxDuration" formControlName="maxDuration" class="form-control">
+                          <option *ngFor="let liveMaxDurationOption of liveMaxDurationOptions" [value]="liveMaxDurationOption.value">
+                            {{ liveMaxDurationOption.label }}
                           </option>
                         </select>
                       </div>
-                      <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div>
                     </div>
 
-                    <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }">
-
-                      <label i18n for="liveTranscodingThreads">Live resolutions to generate</label>
-
-                      <div class="ml-2 mt-2 d-flex flex-column">
-                        <ng-container formGroupName="resolutions">
-                          <div class="form-group" *ngFor="let resolution of liveResolutions">
-                            <my-peertube-checkbox
-                              [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
-                              labelText="{{resolution.label}}"
-                            >
-                              <ng-template *ngIf="resolution.description" ptTemplate="help">
-                                <div [innerHTML]="resolution.description"></div>
-                              </ng-template>
-                            </my-peertube-checkbox>
-                          </div>
-                        </ng-container>
+                    <ng-container formGroupName="transcoding">
+
+                      <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() }">
+                        <my-peertube-checkbox
+                          inputName="liveTranscodingEnabled" formControlName="enabled"
+                          i18n-labelText labelText="Enable live transcoding"
+                        >
+                          <ng-container ngProjectAs="description" i18n>
+                            Requires a lot of CPU!
+                          </ng-container>
+                        </my-peertube-checkbox>
                       </div>
-                    </div>
+
+                      <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }">
+                        <label i18n for="liveTranscodingThreads">Live transcoding threads</label>
+                        <div class="peertube-select-container">
+                          <select id="liveTranscodingThreads" formControlName="threads" class="form-control">
+                            <option *ngFor="let transcodingThreadOption of transcodingThreadOptions" [value]="transcodingThreadOption.value">
+                              {{ transcodingThreadOption.label }}
+                            </option>
+                          </select>
+                        </div>
+                        <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div>
+                      </div>
+
+                      <div class="form-group" [ngClass]="{ 'disabled-checkbox-extra': !isLiveEnabled() || !isLiveTranscodingEnabled() }">
+                        <label i18n for="liveTranscodingThreads">Live resolutions to generate</label>
+
+                        <div class="ml-2 mt-2 d-flex flex-column">
+                          <ng-container formGroupName="resolutions">
+                            <div class="form-group" *ngFor="let resolution of liveResolutions">
+                              <my-peertube-checkbox
+                                [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
+                                labelText="{{resolution.label}}"
+                              >
+                                <ng-template *ngIf="resolution.description" ptTemplate="help">
+                                  <div [innerHTML]="resolution.description"></div>
+                                </ng-template>
+                              </my-peertube-checkbox>
+                            </div>
+                          </ng-container>
+                        </div>
+                      </div>
+                    </ng-container>
                   </ng-container>
                 </my-peertube-checkbox>
               </div>
         </div>
 
       </ng-template>
-    </ng-container>
+    </div>
 
     <ng-container ngbNavItem="advanced-configuration">
       <a ngbNavLink i18n>Advanced configuration</a>
   <div class="form-row mt-4"> <!-- submit placement block -->
     <div class="col-md-7 col-xl-5"></div>
     <div class="col-md-5 col-xl-5">
-      <span class="form-error submit-error" i18n *ngIf="!form.valid">It seems like the configuration is invalid. Please search for potential errors in the different tabs.</span>
+      <span class="form-error submit-error" i18n *ngIf="!form.valid">
+        It seems like the configuration is invalid. Please search for potential errors in the different tabs.
+      </span>
+
+      <span class="form-error submit-error" i18n *ngIf="!hasLiveAllowReplayConsistentOptions()">
+        You cannot allow live replay if you don't enable transcoding.
+      </span>
 
-      <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid">
+      <input (click)="formValidated()" type="submit" i18n-value value="Update configuration" [disabled]="!form.valid || !hasConsistentOptions()">
     </div>
   </div>
 </form>