]>
Commit | Line | Data |
---|---|---|
5f46d28c C |
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 | ||
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 | > | |
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 | ||
70e33515 C |
39 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
40 | <label i18n for="liveMaxInstanceLives"> | |
41 | Max simultaneous lives created on your instance <span class="text-muted">(-1 for "unlimited")</span> | |
42 | </label> | |
43 | ||
5f46d28c C |
44 | <div class="number-with-unit"> |
45 | <input type="number" name="liveMaxInstanceLives" formControlName="maxInstanceLives" /> | |
46 | <span i18n>{form.value['live']['maxInstanceLives'], plural, =1 {live} other {lives}}</span> | |
47 | </div> | |
48 | </div> | |
49 | ||
70e33515 C |
50 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
51 | <label i18n for="liveMaxUserLives"> | |
52 | Max simultaneous lives created per user <span class="text-muted">(-1 for "unlimited")</span> | |
53 | </label> | |
54 | ||
5f46d28c C |
55 | <div class="number-with-unit"> |
56 | <input type="number" name="liveMaxUserLives" formControlName="maxUserLives" /> | |
57 | <span i18n>{form.value['live']['maxUserLives'], plural, =1 {live} other {lives}}</span> | |
58 | </div> | |
59 | </div> | |
60 | ||
70e33515 | 61 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
5f46d28c C |
62 | <label i18n for="liveMaxDuration">Max live duration</label> |
63 | ||
64 | <my-select-options | |
65 | labelForId="liveMaxDuration" [items]="liveMaxDurationOptions" formControlName="maxDuration" | |
66 | bindLabel="label" bindValue="value" [clearable]="false" [searchable]="true" | |
67 | ></my-select-options> | |
68 | </div> | |
69 | ||
70 | </ng-container> | |
71 | </my-peertube-checkbox> | |
72 | </div> | |
73 | </ng-container> | |
74 | </div> | |
75 | </div> | |
76 | ||
77 | <div class="form-row"> <!-- transcoding live streams grid --> | |
78 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
79 | <div i18n class="inner-form-title">TRANSCODING</div> | |
80 | <div i18n class="inner-form-description"> | |
81 | 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. | |
82 | </div> | |
83 | </div> | |
84 | ||
85 | <div class="form-group form-group-right col-12 col-lg-8 col-xl-9"> | |
86 | ||
87 | <ng-container formGroupName="live"> | |
88 | <ng-container formGroupName="transcoding"> | |
89 | ||
70e33515 | 90 | <div class="form-group" [ngClass]="getDisabledLiveClass()"> |
5f46d28c C |
91 | <my-peertube-checkbox |
92 | inputName="liveTranscodingEnabled" formControlName="enabled" | |
93 | > | |
94 | <ng-template ptTemplate="label"> | |
95 | <ng-container i18n>Transcoding enabled for live streams</ng-container> | |
96 | </ng-template> | |
97 | </my-peertube-checkbox> | |
98 | </div> | |
99 | ||
70e33515 | 100 | <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()"> |
5f46d28c C |
101 | <label i18n for="liveTranscodingThreads">Live resolutions to generate</label> |
102 | ||
103 | <div class="ml-2 mt-2 d-flex flex-column"> | |
104 | <ng-container formGroupName="resolutions"> | |
70e33515 | 105 | |
5f46d28c C |
106 | <div class="form-group" *ngFor="let resolution of liveResolutions"> |
107 | <my-peertube-checkbox | |
108 | [inputName]="getResolutionKey(resolution.id)" [formControlName]="resolution.id" | |
109 | labelText="{{resolution.label}}" | |
110 | > | |
111 | <ng-template *ngIf="resolution.description" ptTemplate="help"> | |
112 | <div [innerHTML]="resolution.description"></div> | |
113 | </ng-template> | |
114 | </my-peertube-checkbox> | |
115 | </div> | |
70e33515 | 116 | |
5f46d28c C |
117 | </ng-container> |
118 | </div> | |
119 | </div> | |
120 | ||
70e33515 | 121 | <div class="form-group" [ngClass]="getDisabledLiveTranscodingClass()"> |
5f46d28c | 122 | <label i18n for="liveTranscodingThreads">Live transcoding threads</label> |
70e33515 | 123 | |
5f46d28c | 124 | <span class="text-muted ml-1"> |
70e33515 C |
125 | <ng-container *ngIf="getTotalTranscodingThreads().atMost" i18n> |
126 | will claim at most {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding | |
127 | </ng-container> | |
128 | ||
129 | <ng-container *ngIf="!getTotalTranscodingThreads().atMost" i18n> | |
130 | will claim at least {{ getTotalTranscodingThreads().value }} {{ getTotalTranscodingThreads().unit }} with VOD transcoding | |
131 | </ng-container> | |
5f46d28c C |
132 | </span> |
133 | ||
134 | <my-select-custom-value | |
135 | id="liveTranscodingThreads" | |
136 | [items]="transcodingThreadOptions" | |
137 | formControlName="threads" | |
138 | [clearable]="false" | |
139 | ></my-select-custom-value> | |
140 | <div *ngIf="formErrors.live.transcoding.threads" class="form-error">{{ formErrors.live.transcoding.threads }}</div> | |
141 | </div> | |
142 | ||
70e33515 | 143 | <div class="form-group mt-4" [ngClass]="getDisabledLiveTranscodingClass()"> |
5f46d28c C |
144 | <label i18n for="liveTranscodingProfile">Live transcoding profile</label> |
145 | <span class="text-muted ml-1" i18n>new live transcoding profiles can be added by PeerTube plugins</span> | |
146 | ||
147 | <my-select-options | |
148 | id="liveTranscodingProfile" | |
149 | formControlName="profile" | |
150 | [items]="getAvailableTranscodingProfile()" | |
151 | [clearable]="false" | |
152 | > | |
5f46d28c | 153 | </my-select-options> |
70e33515 | 154 | |
5f46d28c C |
155 | <div *ngIf="formErrors.live.transcoding.profile" class="form-error">{{ formErrors.live.transcoding.profile }}</div> |
156 | </div> | |
157 | ||
158 | </ng-container> | |
159 | </ng-container> | |
160 | ||
161 | </div> | |
162 | </div> | |
163 | </ng-container> |