]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / config / edit-custom-config / edit-live-configuration.component.html
1 <ng-container [formGroup]="form">
2
3 <div class="row mt-5">
4 <div class="col-12 col-lg-4 col-xl-3">
5 <div i18n class="inner-form-title">LIVE</div>
6 <div i18n class="inner-form-description">
7 Enable users of your instance to stream live.
8 </div>
9 </div>
10
11 <div class="col-12 col-lg-8 col-xl-9">
12
13 <ng-container formGroupName="live">
14
15 <div class="form-group">
16 <my-peertube-checkbox inputName="liveEnabled" formControlName="enabled">
17 <ng-template ptTemplate="label">
18 <ng-container i18n>Allow live streaming</ng-container>
19 </ng-template>
20
21 <ng-container ngProjectAs="description">
22 <div i18n>⚠️ Enabling live streaming requires trust in your users and extra moderation work</div>
23 <div i18n>If enabled, your server needs to accept incoming TCP traffic on port {{ getLiveRTMPPort() }}</div>
24 </ng-container>
25
26 <ng-container ngProjectAs="extra">
27
28 <div class="form-group" [ngClass]="getDisabledLiveClass()">
29 <my-peertube-checkbox
30 inputName="liveAllowReplay" formControlName="allowReplay"
31 i18n-labelText labelText="Allow your users to automatically publish a replay of their live"
32 >
33 </my-peertube-checkbox>
34 </div>
35
36 <div class="form-group" formGroupName="latencySetting" [ngClass]="getDisabledLiveClass()">
37 <my-peertube-checkbox
38 inputName="liveLatencySettingEnabled" formControlName="enabled"
39 i18n-labelText labelText="Allow your users to change live latency"
40 >
41 <ng-container ngProjectAs="description" i18n>
42 Small latency disables P2P and high latency can increase P2P ratio
43 </ng-container>
44
45 </my-peertube-checkbox>
46 </div>
47
48 <div class="form-group" [ngClass]="getDisabledLiveClass()">
49 <label i18n for="liveMaxInstanceLives">
50 Max simultaneous lives created on your instance <span class="muted">(-1 for "unlimited")</span>
51 </label>
52
53 <div class="number-with-unit">
54 <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" />
55 <span i18n>{form.value['live']['maxInstanceLives'], plural, =1 {live} other {lives}}</span>
56 </div>
57
58 <div *ngIf="formErrors.live.maxInstanceLives" class="form-error">{{ formErrors.live.maxInstanceLives }}</div>
59 </div>
60
61 <div class="form-group" [ngClass]="getDisabledLiveClass()">
62 <label i18n for="liveMaxUserLives">
63 Max simultaneous lives created per user <span class="muted">(-1 for "unlimited")</span>
64 </label>
65
66 <div class="number-with-unit">
67 <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" />
68 <span i18n>{form.value['live']['maxUserLives'], plural, =1 {live} other {lives}}</span>
69 </div>
70
71 <div *ngIf="formErrors.live.maxUserLives" class="form-error">{{ formErrors.live.maxUserLives }}</div>
72 </div>
73
74 <div class="form-group" [ngClass]="getDisabledLiveClass()">
75 <label i18n for="liveMaxDuration">Max live duration</label>
76
77 <my-select-options
78 labelForId="liveMaxDuration" [items]="liveMaxDurationOptions" formControlName="maxDuration"
79 bindLabel="label" bindValue="value" [clearable]="false" [searchable]="true"
80 ></my-select-options>
81
82 <div *ngIf="formErrors.live.maxDuration" class="form-error">{{ formErrors.live.maxDuration }}</div>
83 </div>
84
85 </ng-container>
86 </my-peertube-checkbox>
87 </div>
88 </ng-container>
89 </div>
90 </div>
91
92 <div class="row"> <!-- transcoding live streams grid -->
93 <div class="col-12 col-lg-4 col-xl-3">
94 <div i18n class="inner-form-title">TRANSCODING</div>
95 <div i18n class="inner-form-description">
96 Same as VOD transcoding, transcoding live streams so that they are in a streamable form that any device can play. Requires a beefy CPU, and then some.
97 </div>
98 </div>
99
100 <div class="col-12 col-lg-8 col-xl-9">
101
102 <ng-container formGroupName="live">
103 <ng-container formGroupName="transcoding">
104
105 <div class="form-group" [ngClass]="getDisabledLiveClass()">
106 <my-peertube-checkbox
107 inputName="liveTranscodingEnabled" formControlName="enabled"
108 >
109 <ng-template ptTemplate="label">
110 <ng-container i18n>Transcoding enabled for live streams</ng-container>
111 </ng-template>
112 </my-peertube-checkbox>
113 </div>
114
115 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
116 <label i18n for="liveTranscodingThreads">Live resolutions to generate</label>
117
118 <div class="ms-2 mt-2 d-flex flex-column">
119 <ng-container formGroupName="resolutions">
120
121 <div class="form-group" *ngFor="let resolution of liveResolutions">
122 <my-peertube-checkbox
123 [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
124 labelText="{{resolution.label}}"
125 >
126 <ng-template *ngIf="resolution.description" ptTemplate="help">
127 <div [innerHTML]="resolution.description"></div>
128 </ng-template>
129 </my-peertube-checkbox>
130 </div>
131
132 </ng-container>
133 </div>
134 </div>
135
136 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
137 <label i18n for="liveTranscodingThreads">Live transcoding threads</label>
138
139 <span class="muted ms-1">
140 <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n>
141 will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
142 </ng-container>
143
144 <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n>
145 will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
146 </ng-container>
147 </span>
148
149 <my-select-custom-value
150 id="liveTranscodingThreads"
151 [items]="transcodingThreadOptions"
152 formControlName="threads"
153 [clearable]="false"
154 ></my-select-custom-value>
155 <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div>
156 </div>
157
158 <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()">
159 <label i18n for="liveTranscodingProfile">Live transcoding profile</label>
160 <span class="muted ms-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span>
161
162 <my-select-options
163 id="liveTranscodingProfile"
164 formControlName="profile"
165 [items]="transcodingProfiles"
166 [clearable]="false"
167 >
168 </my-select-options>
169
170 <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div>
171 </div>
172
173 </ng-container>
174 </ng-container>
175
176 </div>
177 </div>
178 </ng-container>