blob: a6b8576a1c58974573532f63454346841c3d5340 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
<ng-template #modal let-hide="close">
<div class="modal-header">
<h4 i18n class="modal-title">Share</h4>
<my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon>
</div>
<div class="modal-body">
<div class="playlist" *ngIf="playlist">
<div class="title-page title-page-single" i18n *ngIf="video">Share the playlist</div>
<div *ngIf="isPrivatePlaylist()" class="alert-private alert alert-warning">
<div i18n>This playlist is private so you won't be able to share it with external users</div>
<a i18n class="peertube-button-link orange-button" [routerLink]="[ '/my-library/video-playlists/update', playlist.uuid ]" target="_blank" rel="noopener noreferrer">
Update playlist privacy
</a>
</div>
<div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activePlaylistId">
<ng-container ngbNavItem="url">
<a ngbNavLink i18n>URL</a>
<ng-template ngbNavContent>
<div class="nav-content">
<my-input-toggle-hidden [value]="getPlaylistUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
</div>
</ng-template>
</ng-container>
<ng-container ngbNavItem="qrcode">
<a ngbNavLink i18n>QR-Code</a>
<ng-template ngbNavContent>
<div class="nav-content">
<qrcode [qrdata]="getPlaylistUrl()" [width]="256" level="Q"></qrcode>
</div>
</ng-template>
</ng-container>
<ng-container ngbNavItem="embed">
<a ngbNavLink i18n>Embed</a>
<ng-template ngbNavContent>
<div class="nav-content">
<my-input-toggle-hidden
[value]="customizations.onlyEmbedUrl ? getPlaylistEmbedUrl() : getPlaylistIframeCode()" (change)="updateEmbedCode()"
[withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
></my-input-toggle-hidden>
<div i18n *ngIf="notSecure()" class="alert alert-warning">
The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites).
</div>
<div class="embed" [innerHTML]="playlistEmbedHTML"></div>
</div>
</ng-template>
</ng-container>
</div>
<div [ngbNavOutlet]="nav"></div>
<div class="filters">
<div class="form-group" *ngIf="video">
<my-peertube-checkbox
inputName="includeVideoInPlaylist" [(ngModel)]="includeVideoInPlaylist"
i18n-labelText labelText="Share the playlist at this video position"
></my-peertube-checkbox>
</div>
<div class="form-group">
<my-peertube-checkbox
*ngIf="isInPlaylistEmbedTab()"
inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl"
i18n-labelText labelText="Only display embed URL"
></my-peertube-checkbox>
</div>
</div>
</div>
<div class="video" *ngIf="video">
<div class="title-page title-page-single" *ngIf="playlist" i18n>Share the video</div>
<div *ngIf="isPrivateVideo()" class="alert-private alert alert-warning">
<div i18n>This video is private so you won't be able to share it with external users</div>
<a i18n class="peertube-button-link orange-button" [routerLink]="[ '/videos/', 'update', video.shortUUID ]" target="_blank" rel="noopener noreferrer">
Update video privacy
</a>
</div>
<div ngbNav #nav="ngbNav" class="nav-tabs" [(activeId)]="activeVideoId">
<ng-container ngbNavItem="url">
<a ngbNavLink i18n>URL</a>
<ng-template ngbNavContent>
<div class="nav-content">
<my-input-toggle-hidden [value]="getVideoUrl()" [withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"></my-input-toggle-hidden>
</div>
</ng-template>
</ng-container>
<ng-container ngbNavItem="qrcode">
<a ngbNavLink i18n>QR-Code</a>
<ng-template ngbNavContent>
<div class="nav-content">
<qrcode [qrdata]="getVideoUrl()" [width]="256" level="Q"></qrcode>
</div>
</ng-template>
</ng-container>
<ng-container ngbNavItem="embed">
<a ngbNavLink i18n>Embed</a>
<ng-template ngbNavContent>
<div class="nav-content">
<my-input-toggle-hidden
[value]="customizations.onlyEmbedUrl ? getVideoEmbedUrl() : getVideoIframeCode()" (ngModelChange)="updateEmbedCode()"
[withToggle]="false" [withCopy]="true" [show]="true" [readonly]="true"
></my-input-toggle-hidden>
<div i18n *ngIf="notSecure()" class="alert alert-warning">
The url is not secured (no HTTPS), so the embed video won't work on HTTPS websites (web browsers block non secured HTTP requests on HTTPS websites).
</div>
<div class="embed" [innerHTML]="videoEmbedHTML"></div>
</div>
</ng-template>
</ng-container>
</div>
<div [ngbNavOutlet]="nav"></div>
<div class="filters">
<div>
<div class="form-group start-at" *ngIf="!video.isLive">
<my-peertube-checkbox
inputName="startAt" [(ngModel)]="customizations.startAtCheckbox"
i18n-labelText labelText="Start at"
></my-peertube-checkbox>
<my-timestamp-input
[timestamp]="customizations.startAt"
[maxTimestamp]="video.duration"
[disabled]="!customizations.startAtCheckbox"
[(ngModel)]="customizations.startAt"
>
</my-timestamp-input>
</div>
<div *ngIf="videoCaptions.length !== 0" class="form-group video-caption-block">
<my-peertube-checkbox
inputName="subtitleCheckbox" [(ngModel)]="customizations.subtitleCheckbox"
i18n-labelText labelText="Auto select subtitle"
></my-peertube-checkbox>
<div class="peertube-select-container" [ngClass]="{ disabled: !customizations.subtitleCheckbox }">
<select [(ngModel)]="customizations.subtitle" [disabled]="!customizations.subtitleCheckbox" class="form-control">
<option *ngFor="let caption of videoCaptions" [value]="caption.language.id">{{ caption.language.label }}</option>
</select>
</div>
</div>
<div class="form-group" *ngIf="isInVideoEmbedTab()">
<my-peertube-checkbox
inputName="onlyEmbedUrl" [(ngModel)]="customizations.onlyEmbedUrl"
i18n-labelText labelText="Only display embed URL"
></my-peertube-checkbox>
</div>
</div>
<div class="advanced-filters collapse-transition" [ngbCollapse]="isAdvancedCustomizationCollapsed">
<div>
<div class="form-group stop-at" *ngIf="!video.isLive">
<my-peertube-checkbox
inputName="stopAt" [(ngModel)]="customizations.stopAtCheckbox"
i18n-labelText labelText="Stop at"
></my-peertube-checkbox>
<my-timestamp-input
[timestamp]="customizations.stopAt"
[maxTimestamp]="video.duration"
[disabled]="!customizations.stopAtCheckbox"
[(ngModel)]="customizations.stopAt"
>
</my-timestamp-input>
</div>
<div class="form-group">
<my-peertube-checkbox
inputName="autoplay" [(ngModel)]="customizations.autoplay"
i18n-labelText labelText="Autoplay"
></my-peertube-checkbox>
</div>
<div class="form-group">
<my-peertube-checkbox
inputName="muted" [(ngModel)]="customizations.muted"
i18n-labelText labelText="Muted"
></my-peertube-checkbox>
</div>
<div class="form-group" *ngIf="!video.isLive">
<my-peertube-checkbox
inputName="loop" [(ngModel)]="customizations.loop"
i18n-labelText labelText="Loop"
></my-peertube-checkbox>
</div>
<div *ngIf="!isLocalVideo() && !isInVideoEmbedTab()" class="form-group">
<my-peertube-checkbox
inputName="originUrl" [(ngModel)]="customizations.originUrl"
i18n-labelText labelText="Use origin instance URL"
></my-peertube-checkbox>
</div>
</div>
<ng-container *ngIf="isInVideoEmbedTab()">
<div class="form-group">
<my-peertube-checkbox
inputName="title" [(ngModel)]="customizations.title"
i18n-labelText labelText="Display video title"
></my-peertube-checkbox>
</div>
<div class="form-group">
<my-peertube-checkbox
inputName="embedP2P" [(ngModel)]="customizations.embedP2P"
i18n-labelText labelText="P2P"
></my-peertube-checkbox>
</div>
<div class="form-group">
<my-peertube-checkbox
inputName="warningTitle" [(ngModel)]="customizations.warningTitle"
i18n-labelText labelText="Display privacy warning" [disabled]="!customizations.embedP2P"
></my-peertube-checkbox>
</div>
<div class="form-group">
<my-peertube-checkbox
inputName="controlBar" [(ngModel)]="customizations.controlBar"
i18n-labelText labelText="Display player control bar"
></my-peertube-checkbox>
</div>
<div class="form-group">
<my-peertube-checkbox
inputName="peertubeLink" [(ngModel)]="customizations.peertubeLink"
i18n-labelText labelText="Display PeerTube button link"
></my-peertube-checkbox>
</div>
</ng-container>
</div>
<div (click)="isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed" role="button" class="advanced-filters-button"
[attr.aria-expanded]="!isAdvancedCustomizationCollapsed" aria-controls="collapseBasic">
<ng-container *ngIf="isAdvancedCustomizationCollapsed">
<span class="glyphicon glyphicon-menu-down"></span>
<ng-container i18n>
More customization
</ng-container>
</ng-container>
<ng-container *ngIf="!isAdvancedCustomizationCollapsed">
<span class="glyphicon glyphicon-menu-up"></span>
<ng-container i18n>
Less customization
</ng-container>
</ng-container>
</div>
</div>
</div>
</div>
</ng-template>
|