]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html
Implement runner in client side
[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
118626c8
C
113 <div class="form-group" formGroupName="remoteRunners" [ngClass]="getDisabledLiveTranscodingClass()">
114 <my-peertube-checkbox
115 inputName="transcodingRemoteRunnersEnabled" formControlName="enabled"
116 i18n-labelText labelText="Enable remote runners"
117 >
118 <ng-container ngProjectAs="description">
119 <span i18n>
120 Use <a routerLink="/admin/system/runners/runners-list">remote runners</a> to process live transcoding.
121 Remote runners has to register on your instance first.
122 </span>
123 </ng-container>
124 </my-peertube-checkbox>
125 </div>
126
70e33515 127 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c
C
128 <label i18n for="liveTranscodingThreads">Live resolutions to generate</label>
129
4c8749cb 130 <div class="ms-2 mt-2 d-flex flex-column">
70e33515 131
84cae54e 132 <ng-container formGroupName="resolutions">
5f46d28c
C
133 <div class="form-group" *ngFor="let resolution of liveResolutions">
134 <my-peertube-checkbox
135 [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id"
136 labelText="{{resolution.label}}"
137 >
138 <ng-template *ngIf="resolution.description" ptTemplate="help">
139 <div [innerHTML]="resolution.description"></div>
140 </ng-template>
141 </my-peertube-checkbox>
142 </div>
143 </ng-container>
84cae54e
C
144
145 <div class="form-group">
146 <my-peertube-checkbox
147 inputName="transcodingAlwaysTranscodeOriginalResolution" formControlName="alwaysTranscodeOriginalResolution"
148 i18n-labelText labelText="Also transcode original resolution"
149 >
150 <ng-container i18n ngProjectAs="description">
151 Even if it's above your maximum enabled resolution
152 </ng-container>
153 </my-peertube-checkbox>
154 </div>
5f46d28c
C
155 </div>
156 </div>
157
70e33515 158 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c 159 <label i18n for="liveTranscodingThreads">Live transcoding threads</label>
70e33515 160
5b0ec7cd 161 <span class="small muted ms-1">
70e33515
C
162 <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n>
163 will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
164 </ng-container>
165
166 <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n>
167 will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding
168 </ng-container>
5f46d28c
C
169 </span>
170
171 <my-select-custom-value
172 id="liveTranscodingThreads"
173 [items]="transcodingThreadOptions"
174 formControlName="threads"
175 [clearable]="false"
176 ></my-select-custom-value>
177 <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div>
178 </div>
179
70e33515 180 <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c 181 <label i18n for="liveTranscodingProfile">Live transcoding profile</label>
5b0ec7cd 182 <span class="small muted ms-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span>
5f46d28c
C
183
184 <my-select-options
185 id="liveTranscodingProfile"
186 formControlName="profile"
b06f1ead 187 [items]="transcodingProfiles"
5f46d28c
C
188 [clearable]="false"
189 >
5f46d28c 190 </my-select-options>
70e33515 191
5f46d28c
C
192 <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div>
193 </div>
194
195 </ng-container>
196 </ng-container>
197
198 </div>
199 </div>
200</ng-container>