]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html
Migrate to bootstrap 5
[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>
44
45 </my-peertube-checkbox>
46 </div>
47
70e33515
C
48 <div class="form-group" [ngClass]="getDisabledLiveClass()">
49 <label i18n for="liveMaxInstanceLives">
b788e691 50 Max simultaneous lives created on your instance <span class="muted">(-1 for "unlimited")</span>
70e33515
C
51 </label>
52
5f46d28c
C
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>
45ba09fe
C
57
58 <div *ngIf="formErrors.live.maxInstanceLives" class="form-error">{{ formErrors.live.maxInstanceLives }}</div>
5f46d28c
C
59 </div>
60
70e33515
C
61 <div class="form-group" [ngClass]="getDisabledLiveClass()">
62 <label i18n for="liveMaxUserLives">
b788e691 63 Max simultaneous lives created per user <span class="muted">(-1 for "unlimited")</span>
70e33515
C
64 </label>
65
5f46d28c
C
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>
45ba09fe
C
70
71 <div *ngIf="formErrors.live.maxUserLives" class="form-error">{{ formErrors.live.maxUserLives }}</div>
5f46d28c
C
72 </div>
73
70e33515 74 <div class="form-group" [ngClass]="getDisabledLiveClass()">
5f46d28c
C
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>
45ba09fe
C
81
82 <div *ngIf="formErrors.live.maxDuration" class="form-error">{{ formErrors.live.maxDuration }}</div>
5f46d28c
C
83 </div>
84
85 </ng-container>
86 </my-peertube-checkbox>
87 </div>
88 </ng-container>
89 </div>
90 </div>
91
4c8749cb
C
92 <div class="row"> <!-- transcoding live streams grid -->
93 <div class="col-12 col-lg-4 col-xl-3">
5f46d28c
C
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
4c8749cb 100 <div class="col-12 col-lg-8 col-xl-9">
5f46d28c
C
101
102 <ng-container formGroupName="live">
103 <ng-container formGroupName="transcoding">
104
70e33515 105 <div class="form-group" [ngClass]="getDisabledLiveClass()">
5f46d28c
C
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
70e33515 115 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c
C
116 <label i18n for="liveTranscodingThreads">Live resolutions to generate</label>
117
4c8749cb 118 <div class="ms-2 mt-2 d-flex flex-column">
5f46d28c 119 <ng-container formGroupName="resolutions">
70e33515 120
5f46d28c
C
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>
70e33515 131
5f46d28c
C
132 </ng-container>
133 </div>
134 </div>
135
70e33515 136 <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c 137 <label i18n for="liveTranscodingThreads">Live transcoding threads</label>
70e33515 138
4c8749cb 139 <span class="muted ms-1">
70e33515
C
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>
5f46d28c
C
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
70e33515 158 <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()">
5f46d28c 159 <label i18n for="liveTranscodingProfile">Live transcoding profile</label>
4c8749cb 160 <span class="muted ms-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span>
5f46d28c
C
161
162 <my-select-options
163 id="liveTranscodingProfile"
164 formControlName="profile"
b06f1ead 165 [items]="transcodingProfiles"
5f46d28c
C
166 [clearable]="false"
167 >
5f46d28c 168 </my-select-options>
70e33515 169
5f46d28c
C
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>