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