]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html
Some fixes for themes
[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="form-row mt-5">
4 <div class="form-group 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="form-group form-group-right 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 <ng-container ngProjectAs="description" i18n>
34 If the user quota is reached, PeerTube will automatically terminate the live streaming
35 </ng-container>
36 </my-peertube-checkbox>
37 </div>
38
39 <div class="form-group" formGroupName="latencySetting" [ngClass]="getDisabledLiveClass()">
40 <my-peertube-checkbox
41 inputName="liveLatencySettingEnabled" formControlName="enabled"
42 i18n-labelText labelText="Allow your users to change live latency"
43 >
44 <ng-container ngProjectAs="description" i18n>
45 Small latency disables P2P and high latency can increase P2P ratio
46 </ng-container>
47
48 </my-peertube-checkbox>
49 </div>
50
51 <div class="form-group" [ngClass]="getDisabledLiveClass()">
52 <label i18n for="liveMaxInstanceLives">
53 Max simultaneous lives created on your instance <span class="muted">(-1 for "unlimited")</span>
54 </label>
55
56 <div class="number-with-unit">
57 <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" />
58 <span i18n>{form.value['live']['maxInstanceLives'], plural, =1 {live} other {lives}}</span>
59 </div>
60
61 <div *ngIf="formErrors.live.maxInstanceLives" class="form-error">{{ formErrors.live.maxInstanceLives }}</div>
62 </div>
63
64 <div class="form-group" [ngClass]="getDisabledLiveClass()">
65 <label i18n for="liveMaxUserLives">
66 Max simultaneous lives created per user <span class="muted">(-1 for "unlimited")</span>
67 </label>
68
69 <div class="number-with-unit">
70 <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" />
71 <span i18n>{form.value['live']['maxUserLives'], plural, =1 {live} other {lives}}</span>
72 </div>
73
74 <div *ngIf="formErrors.live.maxUserLives" class="form-error">{{ formErrors.live.maxUserLives }}</div>
75 </div>
76
77 <div class="form-group" [ngClass]="getDisabledLiveClass()">
78 <label i18n for="liveMaxDuration">Max live duration</label>
79
80 <my-select-options
81 labelForId="liveMaxDuration" [items]="liveMaxDurationOptions" formControlName="maxDuration"
82 bindLabel="label" bindValue="value" [clearable]="false" [searchable]="true"
83 ></my-select-options>
84
85 <div *ngIf="formErrors.live.maxDuration" class="form-error">{{ formErrors.live.maxDuration }}</div>
86 </div>
87
88 </ng-container>
89 </my-peertube-checkbox>
90 </div>
91 </ng-container>
92 </div>
93 </div>
94
95 <div class="form-row"> <!-- transcoding live streams grid -->
96 <div class="form-group col-12 col-lg-4 col-xl-3">
97 <div i18n class="inner-form-title">TRANSCODING</div>
98 <div i18n class="inner-form-description">
99 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.
100 </div>
101 </div>
102
103 <div class="form-group form-group-right col-12 col-lg-8 col-xl-9">
104
105 <ng-container formGroupName="live">
106 <ng-container formGroupName="transcoding">
107
108 <div class="form-group" [ngClass]="getDisabledLiveClass()">
109 <my-peertube-checkbox
110 inputName="liveTranscodingEnabled" formControlName="enabled"
111 >
112 <ng-template ptTemplate="label">
113 <ng-container i18n>Transcoding enabled for live streams</ng-container>
114 </ng-template>
115 </my-peertube-checkbox>
116 </div>
117
118 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
119 <label i18n for="liveTranscodingThreads">Live resolutions to generate</label>
120
121 <div class="ml-2 mt-2 d-flex flex-column">
122 <ng-container formGroupName="resolutions">
123
124 <div class="form-group" *ngFor="let resolution of liveResolutions">
125 <my-peertube-checkbox
126 [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
127 labelText="{{resolution.label}}"
128 >
129 <ng-template *ngIf="resolution.description" ptTemplate="help">
130 <div [innerHTML]="resolution.description"></div>
131 </ng-template>
132 </my-peertube-checkbox>
133 </div>
134
135 </ng-container>
136 </div>
137 </div>
138
139 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
140 <label i18n for="liveTranscodingThreads">Live transcoding threads</label>
141
142 <span class="muted ml-1">
143 <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n>
144 will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
145 </ng-container>
146
147 <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n>
148 will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
149 </ng-container>
150 </span>
151
152 <my-select-custom-value
153 id="liveTranscodingThreads"
154 [items]="transcodingThreadOptions"
155 formControlName="threads"
156 [clearable]="false"
157 ></my-select-custom-value>
158 <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div>
159 </div>
160
161 <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()">
162 <label i18n for="liveTranscodingProfile">Live transcoding profile</label>
163 <span class="muted ml-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span>
164
165 <my-select-options
166 id="liveTranscodingProfile"
167 formControlName="profile"
168 [items]="transcodingProfiles"
169 [clearable]="false"
170 >
171 </my-select-options>
172
173 <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div>
174 </div>
175
176 </ng-container>
177 </ng-container>
178
179 </div>
180 </div>
181 </ng-container>