@ngxsplayer/ngx-smart-player 0.3.0 → 0.3.1-next.555
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { PlayerFacade, createSsaiManifestRewritePlugin, decodeSubtitleBytes, describeSubtitleFile, subtitleTextToVtt } from "@ngxsp/core";
|
|
1
|
+
import { PlayerFacade, createSsaiManifestRewritePlugin, decodeSubtitleBytes, describeSubtitleFile, playableDurationSec, subtitleTextToVtt } from "@ngxsp/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, InjectionToken, Input, Output, ViewChild, computed, inject, input, makeEnvironmentProviders, output } from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, HostListener, Injectable, InjectionToken, Input, Output, ViewChild, computed, inject, input, makeEnvironmentProviders, output, signal } from "@angular/core";
|
|
4
4
|
import { CommonModule } from "@angular/common";
|
|
5
5
|
import { Subscription } from "rxjs";
|
|
6
|
-
import { NgxspLabeledControl, NgxspLiveBadge, NgxspPlayButton, NgxspTimeSlider, NgxspVolumeControl } from "@ngxsplayer/ngx-smart-player-ui-core";
|
|
6
|
+
import { NgxspLabeledControl, NgxspLiveBadge, NgxspPlayButton, NgxspTimeSlider, NgxspVolumeControl, formatTime } from "@ngxsplayer/ngx-smart-player-ui-core";
|
|
7
7
|
export * from "@ngxsp/core";
|
|
8
8
|
var SmartPlayerIconComponent = class SmartPlayerIconComponent {
|
|
9
9
|
name = "play";
|
|
10
10
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
11
11
|
minVersion: "12.0.0",
|
|
12
|
-
version: "22.
|
|
12
|
+
version: "22.3.0",
|
|
13
13
|
ngImport: i0,
|
|
14
14
|
type: SmartPlayerIconComponent,
|
|
15
15
|
deps: [],
|
|
@@ -17,7 +17,7 @@ var SmartPlayerIconComponent = class SmartPlayerIconComponent {
|
|
|
17
17
|
});
|
|
18
18
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
19
19
|
minVersion: "17.0.0",
|
|
20
|
-
version: "22.
|
|
20
|
+
version: "22.3.0",
|
|
21
21
|
type: SmartPlayerIconComponent,
|
|
22
22
|
isStandalone: true,
|
|
23
23
|
selector: "ngxsp-smart-icon",
|
|
@@ -103,8 +103,14 @@ var SmartPlayerIconComponent = class SmartPlayerIconComponent {
|
|
|
103
103
|
@case ('server') {
|
|
104
104
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="3.25" width="16" height="11" rx="2"/><path d="M7.5 6.75h.01M7.5 10.75h.01M10.5 6.75h6M10.5 10.75h6"/><path d="M12 14.25v4.5M3.5 20.5h6.75M13.75 20.5h6.75"/><circle cx="12" cy="20.5" r="1.6"/></svg>
|
|
105
105
|
}
|
|
106
|
+
<!--
|
|
107
|
+
The miniature: a window with the small one it shrinks to, in the corner the mini window
|
|
108
|
+
opens in. It drew that small window AND an arrow out of the frame — two gestures in one
|
|
109
|
+
glyph, neither of them legible at 16 pixels. Miniature.dc.html draws the frame and the
|
|
110
|
+
corner, and nothing else.
|
|
111
|
+
-->
|
|
106
112
|
@case ('window-mini') {
|
|
107
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4.5" width="18" height="15" rx="2.5"/><
|
|
113
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4.5" width="18" height="15" rx="2.5"/><rect x="11.5" y="11.5" width="7" height="5.5" rx="1.2"/></svg>
|
|
108
114
|
}
|
|
109
115
|
@case ('window-bar') {
|
|
110
116
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4.5" width="18" height="15" rx="2.5"/><rect x="5" y="15" width="14" height="2.8" rx="1" fill="currentColor" stroke="none"/></svg>
|
|
@@ -217,12 +223,23 @@ var SmartPlayerIconComponent = class SmartPlayerIconComponent {
|
|
|
217
223
|
@case ('check') {
|
|
218
224
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m5 12.5 4.5 4.5L19 7.5"/></svg>
|
|
219
225
|
}
|
|
226
|
+
@case ('refresh') {
|
|
227
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M20 12a8 8 0 1 0-8 8"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M20 20.5v-5h-5"/></svg>
|
|
228
|
+
}
|
|
220
229
|
@case ('menu') {
|
|
221
230
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-width="1.8" d="M4 7h16M4 12h16M4 17h16"/></svg>
|
|
222
231
|
}
|
|
223
232
|
@case ('panel-right') {
|
|
224
233
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><rect x="3.5" y="4.5" width="17" height="15" rx="2.5" stroke-width="1.8"/><path stroke-width="1.8" d="M14.5 4.5v15"/></svg>
|
|
225
234
|
}
|
|
235
|
+
<!--
|
|
236
|
+
What is lined up to play: the lines of a list, the last one short to leave room, and the
|
|
237
|
+
triangle that says the list plays. It is the glyph every player draws for its queue, and
|
|
238
|
+
the one the boards draw beside "File d'attente".
|
|
239
|
+
-->
|
|
240
|
+
@case ('queue') {
|
|
241
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-width="1.8" d="M4 7h13M4 12h13M4 17h7"/><path fill="currentColor" stroke="none" d="M16.6 12.9a.9.9 0 0 1 1.37-.77l4.1 2.56a.9.9 0 0 1 0 1.53l-4.1 2.56a.9.9 0 0 1-1.37-.76v-5.12Z"/></svg>
|
|
242
|
+
}
|
|
226
243
|
@case ('chevron-left') {
|
|
227
244
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m14.5 6-6 6 6 6"/></svg>
|
|
228
245
|
}
|
|
@@ -250,7 +267,7 @@ var SmartPlayerIconComponent = class SmartPlayerIconComponent {
|
|
|
250
267
|
};
|
|
251
268
|
i0.ɵɵngDeclareClassMetadata({
|
|
252
269
|
minVersion: "12.0.0",
|
|
253
|
-
version: "22.
|
|
270
|
+
version: "22.3.0",
|
|
254
271
|
ngImport: i0,
|
|
255
272
|
type: SmartPlayerIconComponent,
|
|
256
273
|
decorators: [{
|
|
@@ -338,8 +355,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
338
355
|
@case ('server') {
|
|
339
356
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4" y="3.25" width="16" height="11" rx="2"/><path d="M7.5 6.75h.01M7.5 10.75h.01M10.5 6.75h6M10.5 10.75h6"/><path d="M12 14.25v4.5M3.5 20.5h6.75M13.75 20.5h6.75"/><circle cx="12" cy="20.5" r="1.6"/></svg>
|
|
340
357
|
}
|
|
358
|
+
<!--
|
|
359
|
+
The miniature: a window with the small one it shrinks to, in the corner the mini window
|
|
360
|
+
opens in. It drew that small window AND an arrow out of the frame — two gestures in one
|
|
361
|
+
glyph, neither of them legible at 16 pixels. Miniature.dc.html draws the frame and the
|
|
362
|
+
corner, and nothing else.
|
|
363
|
+
-->
|
|
341
364
|
@case ('window-mini') {
|
|
342
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4.5" width="18" height="15" rx="2.5"/><
|
|
365
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4.5" width="18" height="15" rx="2.5"/><rect x="11.5" y="11.5" width="7" height="5.5" rx="1.2"/></svg>
|
|
343
366
|
}
|
|
344
367
|
@case ('window-bar') {
|
|
345
368
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4.5" width="18" height="15" rx="2.5"/><rect x="5" y="15" width="14" height="2.8" rx="1" fill="currentColor" stroke="none"/></svg>
|
|
@@ -452,12 +475,23 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
452
475
|
@case ('check') {
|
|
453
476
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m5 12.5 4.5 4.5L19 7.5"/></svg>
|
|
454
477
|
}
|
|
478
|
+
@case ('refresh') {
|
|
479
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M20 12a8 8 0 1 0-8 8"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M20 20.5v-5h-5"/></svg>
|
|
480
|
+
}
|
|
455
481
|
@case ('menu') {
|
|
456
482
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-width="1.8" d="M4 7h16M4 12h16M4 17h16"/></svg>
|
|
457
483
|
}
|
|
458
484
|
@case ('panel-right') {
|
|
459
485
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><rect x="3.5" y="4.5" width="17" height="15" rx="2.5" stroke-width="1.8"/><path stroke-width="1.8" d="M14.5 4.5v15"/></svg>
|
|
460
486
|
}
|
|
487
|
+
<!--
|
|
488
|
+
What is lined up to play: the lines of a list, the last one short to leave room, and the
|
|
489
|
+
triangle that says the list plays. It is the glyph every player draws for its queue, and
|
|
490
|
+
the one the boards draw beside "File d'attente".
|
|
491
|
+
-->
|
|
492
|
+
@case ('queue') {
|
|
493
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-width="1.8" d="M4 7h13M4 12h13M4 17h7"/><path fill="currentColor" stroke="none" d="M16.6 12.9a.9.9 0 0 1 1.37-.77l4.1 2.56a.9.9 0 0 1 0 1.53l-4.1 2.56a.9.9 0 0 1-1.37-.76v-5.12Z"/></svg>
|
|
494
|
+
}
|
|
461
495
|
@case ('chevron-left') {
|
|
462
496
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="m14.5 6-6 6 6 6"/></svg>
|
|
463
497
|
}
|
|
@@ -487,6 +521,253 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
487
521
|
args: [{ required: true }]
|
|
488
522
|
}] }
|
|
489
523
|
});
|
|
524
|
+
var SmartEmptyPageComponent = class SmartEmptyPageComponent {
|
|
525
|
+
page = null;
|
|
526
|
+
pageAction = new EventEmitter();
|
|
527
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
528
|
+
minVersion: "12.0.0",
|
|
529
|
+
version: "22.3.0",
|
|
530
|
+
ngImport: i0,
|
|
531
|
+
type: SmartEmptyPageComponent,
|
|
532
|
+
deps: [],
|
|
533
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
534
|
+
});
|
|
535
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
536
|
+
minVersion: "17.0.0",
|
|
537
|
+
version: "22.3.0",
|
|
538
|
+
type: SmartEmptyPageComponent,
|
|
539
|
+
isStandalone: true,
|
|
540
|
+
selector: "ngxsp-empty-page",
|
|
541
|
+
inputs: { page: "page" },
|
|
542
|
+
outputs: { pageAction: "pageAction" },
|
|
543
|
+
ngImport: i0,
|
|
544
|
+
template: `
|
|
545
|
+
@if (page; as data) {
|
|
546
|
+
<div class="ngxsp-empty-inner">
|
|
547
|
+
<span class="ngxsp-empty-mark" aria-hidden="true"><ngxsp-smart-icon [name]="data.icon || 'folder'" /></span>
|
|
548
|
+
<h1>{{ data.title }}</h1>
|
|
549
|
+
@if (data.body) { <p class="ngxsp-empty-body">{{ data.body }}</p> }
|
|
550
|
+
@if (data.actions?.length) {
|
|
551
|
+
<div class="ngxsp-empty-actions">
|
|
552
|
+
@for (action of data.actions; track action.id) {
|
|
553
|
+
<button type="button" [class.primary]="action.primary" (click)="pageAction.emit(action.id)">
|
|
554
|
+
@if (action.icon) { <ngxsp-smart-icon [name]="action.icon" /> }
|
|
555
|
+
<span>{{ action.label }}</span>
|
|
556
|
+
</button>
|
|
557
|
+
}
|
|
558
|
+
</div>
|
|
559
|
+
}
|
|
560
|
+
@if (data.hintTitle) {
|
|
561
|
+
<div class="ngxsp-empty-hint">
|
|
562
|
+
<strong><ngxsp-smart-icon name="plus" />{{ data.hintTitle }}</strong>
|
|
563
|
+
@if (data.hintBody) { <p>{{ data.hintBody }}</p> }
|
|
564
|
+
</div>
|
|
565
|
+
}
|
|
566
|
+
@if (data.footnote) { <p class="ngxsp-empty-footnote">{{ data.footnote }}</p> }
|
|
567
|
+
</div>
|
|
568
|
+
}
|
|
569
|
+
`,
|
|
570
|
+
isInline: true,
|
|
571
|
+
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_accent-text:var(--ngxsp-settings-accent-text, #fff);display:grid;place-items:center;min-height:100%;padding:24px;color:var(--_text)}.ngxsp-empty-inner{max-width:560px;text-align:center}.ngxsp-empty-mark{display:grid;place-items:center;width:96px;height:96px;margin:0 auto 22px;border:1px solid var(--_line);border-radius:24px;background:var(--_surface);color:var(--_muted)}.ngxsp-empty-mark ngxsp-smart-icon{width:44px;height:44px}h1{margin:0;font-size:22px;font-weight:600;letter-spacing:-.2px;overflow-wrap:anywhere}.ngxsp-empty-body{margin:10px auto 0;max-width:46ch;color:var(--_muted);font-size:13px;line-height:1.6}.ngxsp-empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:22px}.ngxsp-empty-actions button{height:38px;display:inline-flex;align-items:center;gap:9px;padding:0 16px;border:1px solid var(--_line);border-radius:19px;background:transparent;color:var(--_text);font:inherit;font-size:13px;cursor:pointer}.ngxsp-empty-actions button ngxsp-smart-icon{width:16px;height:16px}.ngxsp-empty-actions button.primary{border-color:transparent;background:var(--_accent);color:var(--_accent-text);padding:0 18px;font-weight:600}.ngxsp-empty-actions button:hover:not(.primary){background:var(--_surface)}.ngxsp-empty-hint{margin-top:34px;padding:16px 18px;border:1px dashed var(--_line);border-radius:12px;text-align:start}.ngxsp-empty-hint strong{display:flex;align-items:center;gap:9px;color:var(--_muted);font-size:12px;font-weight:600}.ngxsp-empty-hint strong ngxsp-smart-icon{flex:none;width:15px;height:15px}.ngxsp-empty-hint p{margin:8px 0 0;color:var(--_muted);font-size:11.5px;line-height:1.55}.ngxsp-empty-footnote{margin:26px 0 0;color:var(--_muted);font-size:11.5px}\n"],
|
|
572
|
+
dependencies: [{
|
|
573
|
+
kind: "component",
|
|
574
|
+
type: SmartPlayerIconComponent,
|
|
575
|
+
selector: "ngxsp-smart-icon",
|
|
576
|
+
inputs: ["name"]
|
|
577
|
+
}],
|
|
578
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
582
|
+
minVersion: "12.0.0",
|
|
583
|
+
version: "22.3.0",
|
|
584
|
+
ngImport: i0,
|
|
585
|
+
type: SmartEmptyPageComponent,
|
|
586
|
+
decorators: [{
|
|
587
|
+
type: Component,
|
|
588
|
+
args: [{
|
|
589
|
+
selector: "ngxsp-empty-page",
|
|
590
|
+
standalone: true,
|
|
591
|
+
imports: [SmartPlayerIconComponent],
|
|
592
|
+
template: `
|
|
593
|
+
@if (page; as data) {
|
|
594
|
+
<div class="ngxsp-empty-inner">
|
|
595
|
+
<span class="ngxsp-empty-mark" aria-hidden="true"><ngxsp-smart-icon [name]="data.icon || 'folder'" /></span>
|
|
596
|
+
<h1>{{ data.title }}</h1>
|
|
597
|
+
@if (data.body) { <p class="ngxsp-empty-body">{{ data.body }}</p> }
|
|
598
|
+
@if (data.actions?.length) {
|
|
599
|
+
<div class="ngxsp-empty-actions">
|
|
600
|
+
@for (action of data.actions; track action.id) {
|
|
601
|
+
<button type="button" [class.primary]="action.primary" (click)="pageAction.emit(action.id)">
|
|
602
|
+
@if (action.icon) { <ngxsp-smart-icon [name]="action.icon" /> }
|
|
603
|
+
<span>{{ action.label }}</span>
|
|
604
|
+
</button>
|
|
605
|
+
}
|
|
606
|
+
</div>
|
|
607
|
+
}
|
|
608
|
+
@if (data.hintTitle) {
|
|
609
|
+
<div class="ngxsp-empty-hint">
|
|
610
|
+
<strong><ngxsp-smart-icon name="plus" />{{ data.hintTitle }}</strong>
|
|
611
|
+
@if (data.hintBody) { <p>{{ data.hintBody }}</p> }
|
|
612
|
+
</div>
|
|
613
|
+
}
|
|
614
|
+
@if (data.footnote) { <p class="ngxsp-empty-footnote">{{ data.footnote }}</p> }
|
|
615
|
+
</div>
|
|
616
|
+
}
|
|
617
|
+
`,
|
|
618
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
619
|
+
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_accent-text:var(--ngxsp-settings-accent-text, #fff);display:grid;place-items:center;min-height:100%;padding:24px;color:var(--_text)}.ngxsp-empty-inner{max-width:560px;text-align:center}.ngxsp-empty-mark{display:grid;place-items:center;width:96px;height:96px;margin:0 auto 22px;border:1px solid var(--_line);border-radius:24px;background:var(--_surface);color:var(--_muted)}.ngxsp-empty-mark ngxsp-smart-icon{width:44px;height:44px}h1{margin:0;font-size:22px;font-weight:600;letter-spacing:-.2px;overflow-wrap:anywhere}.ngxsp-empty-body{margin:10px auto 0;max-width:46ch;color:var(--_muted);font-size:13px;line-height:1.6}.ngxsp-empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:22px}.ngxsp-empty-actions button{height:38px;display:inline-flex;align-items:center;gap:9px;padding:0 16px;border:1px solid var(--_line);border-radius:19px;background:transparent;color:var(--_text);font:inherit;font-size:13px;cursor:pointer}.ngxsp-empty-actions button ngxsp-smart-icon{width:16px;height:16px}.ngxsp-empty-actions button.primary{border-color:transparent;background:var(--_accent);color:var(--_accent-text);padding:0 18px;font-weight:600}.ngxsp-empty-actions button:hover:not(.primary){background:var(--_surface)}.ngxsp-empty-hint{margin-top:34px;padding:16px 18px;border:1px dashed var(--_line);border-radius:12px;text-align:start}.ngxsp-empty-hint strong{display:flex;align-items:center;gap:9px;color:var(--_muted);font-size:12px;font-weight:600}.ngxsp-empty-hint strong ngxsp-smart-icon{flex:none;width:15px;height:15px}.ngxsp-empty-hint p{margin:8px 0 0;color:var(--_muted);font-size:11.5px;line-height:1.55}.ngxsp-empty-footnote{margin:26px 0 0;color:var(--_muted);font-size:11.5px}\n"]
|
|
620
|
+
}]
|
|
621
|
+
}],
|
|
622
|
+
propDecorators: {
|
|
623
|
+
page: [{ type: Input }],
|
|
624
|
+
pageAction: [{ type: Output }]
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
const KIND_ICONS = {
|
|
628
|
+
info: "info",
|
|
629
|
+
success: "check",
|
|
630
|
+
warning: "info",
|
|
631
|
+
error: "close"
|
|
632
|
+
};
|
|
633
|
+
var SmartNotificationsComponent = class SmartNotificationsComponent {
|
|
634
|
+
page = null;
|
|
635
|
+
entryAction = new EventEmitter();
|
|
636
|
+
markAllRead = new EventEmitter();
|
|
637
|
+
get hasUnread() {
|
|
638
|
+
return (this.page?.groups ?? []).some((group) => group.entries.some((entry) => entry.unread));
|
|
639
|
+
}
|
|
640
|
+
iconFor(entry) {
|
|
641
|
+
return KIND_ICONS[entry.kind ?? "info"];
|
|
642
|
+
}
|
|
643
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
644
|
+
minVersion: "12.0.0",
|
|
645
|
+
version: "22.3.0",
|
|
646
|
+
ngImport: i0,
|
|
647
|
+
type: SmartNotificationsComponent,
|
|
648
|
+
deps: [],
|
|
649
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
650
|
+
});
|
|
651
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
652
|
+
minVersion: "17.0.0",
|
|
653
|
+
version: "22.3.0",
|
|
654
|
+
type: SmartNotificationsComponent,
|
|
655
|
+
isStandalone: true,
|
|
656
|
+
selector: "ngxsp-notifications",
|
|
657
|
+
inputs: { page: "page" },
|
|
658
|
+
outputs: {
|
|
659
|
+
entryAction: "entryAction",
|
|
660
|
+
markAllRead: "markAllRead"
|
|
661
|
+
},
|
|
662
|
+
ngImport: i0,
|
|
663
|
+
template: `
|
|
664
|
+
@if (page; as data) {
|
|
665
|
+
<div class="ngxsp-notifications-head">
|
|
666
|
+
<div>
|
|
667
|
+
<h1>{{ data.title }}</h1>
|
|
668
|
+
@if (data.summary) { <p>{{ data.summary }}</p> }
|
|
669
|
+
</div>
|
|
670
|
+
@if (data.markAllLabel && hasUnread) {
|
|
671
|
+
<button class="ngxsp-notifications-button" type="button" (click)="markAllRead.emit()">{{ data.markAllLabel }}</button>
|
|
672
|
+
}
|
|
673
|
+
</div>
|
|
674
|
+
@for (group of data.groups; track group.id) {
|
|
675
|
+
<section class="ngxsp-notifications-group" [attr.aria-labelledby]="'ngxsp-notifications-' + group.id">
|
|
676
|
+
<h2 [id]="'ngxsp-notifications-' + group.id">{{ group.title }}</h2>
|
|
677
|
+
<ul>
|
|
678
|
+
@for (entry of group.entries; track entry.id) {
|
|
679
|
+
<li class="ngxsp-notifications-entry" [class.unread]="entry.unread" [attr.data-kind]="entry.kind || 'info'">
|
|
680
|
+
<span class="ngxsp-notifications-tile" aria-hidden="true">
|
|
681
|
+
<ngxsp-smart-icon [name]="entry.icon || iconFor(entry)" />
|
|
682
|
+
@if (entry.unread) { <i></i> }
|
|
683
|
+
</span>
|
|
684
|
+
<span class="ngxsp-notifications-copy">
|
|
685
|
+
<strong>{{ entry.title }}</strong>
|
|
686
|
+
@if (entry.body) { <small>{{ entry.body }}</small> }
|
|
687
|
+
</span>
|
|
688
|
+
@if (entry.action; as action) {
|
|
689
|
+
<button class="ngxsp-notifications-button" type="button" (click)="entryAction.emit({ id: entry.id, actionId: action.id })">{{ action.label }}</button>
|
|
690
|
+
}
|
|
691
|
+
@if (entry.ago) { <time>{{ entry.ago }}</time> }
|
|
692
|
+
</li>
|
|
693
|
+
}
|
|
694
|
+
</ul>
|
|
695
|
+
</section>
|
|
696
|
+
} @empty {
|
|
697
|
+
@if (data.emptyLabel) { <p class="ngxsp-notifications-empty">{{ data.emptyLabel }}</p> }
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
`,
|
|
701
|
+
isInline: true,
|
|
702
|
+
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_success:var(--ngxsp-notifications-success, #3ecf8e);--_warning:var(--ngxsp-notifications-warning, #f2a93b);--_danger:var(--ngxsp-notifications-danger, #f25f5c);display:grid;gap:22px;max-width:860px;color:var(--_text)}.ngxsp-notifications-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px}.ngxsp-notifications-head h1{margin:0;font-size:21px;font-weight:600;letter-spacing:-.2px}.ngxsp-notifications-head p{margin:5px 0 0;color:var(--_muted);font-size:12px}.ngxsp-notifications-group{display:grid;gap:10px}.ngxsp-notifications-group h2{margin:0;font-size:13px;font-weight:600;color:var(--_muted)}.ngxsp-notifications-group ul{margin:0;padding:0;list-style:none;display:grid;gap:8px}.ngxsp-notifications-entry{display:flex;flex-wrap:wrap;align-items:flex-start;gap:13px;padding:13px 14px;border:1px solid var(--_line);border-radius:12px}.ngxsp-notifications-entry.unread{background:color-mix(in srgb,var(--_accent) 7%,transparent)}.ngxsp-notifications-tile{position:relative;flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--_surface);color:var(--_muted)}.ngxsp-notifications-tile ngxsp-smart-icon{width:17px;height:17px}.ngxsp-notifications-tile i{position:absolute;left:-2px;top:-2px;width:8px;height:8px;border-radius:50%;background:var(--_accent);box-shadow:0 0 0 2px var(--ngxsp-notifications-dot-ring, rgb(0 0 0 / .4))}.ngxsp-notifications-entry[data-kind=success] .ngxsp-notifications-tile{background:color-mix(in srgb,var(--_success) 14%,transparent);color:var(--_success)}.ngxsp-notifications-entry[data-kind=warning] .ngxsp-notifications-tile{background:color-mix(in srgb,var(--_warning) 14%,transparent);color:var(--_warning)}.ngxsp-notifications-entry[data-kind=error] .ngxsp-notifications-tile{background:color-mix(in srgb,var(--_danger) 14%,transparent);color:var(--_danger)}.ngxsp-notifications-copy{flex:1 1 220px;min-width:0;display:grid;gap:3px}.ngxsp-notifications-copy strong{font-size:12.5px;font-weight:600;overflow-wrap:anywhere}.ngxsp-notifications-copy small{color:var(--_muted);font-size:11.5px;line-height:1.5;overflow-wrap:anywhere}.ngxsp-notifications-entry time{flex:none;color:var(--_muted);font-size:11px;white-space:nowrap}.ngxsp-notifications-button{flex:none;height:28px;padding:0 12px;border:1px solid var(--_line);border-radius:14px;background:transparent;color:var(--_text);font:inherit;font-size:12px;cursor:pointer}.ngxsp-notifications-head .ngxsp-notifications-button{height:30px;padding:0 13px}.ngxsp-notifications-button:hover{background:var(--_surface)}.ngxsp-notifications-empty{margin:0;color:var(--_muted);font-size:12px}\n"],
|
|
703
|
+
dependencies: [{
|
|
704
|
+
kind: "component",
|
|
705
|
+
type: SmartPlayerIconComponent,
|
|
706
|
+
selector: "ngxsp-smart-icon",
|
|
707
|
+
inputs: ["name"]
|
|
708
|
+
}],
|
|
709
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
710
|
+
});
|
|
711
|
+
};
|
|
712
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
713
|
+
minVersion: "12.0.0",
|
|
714
|
+
version: "22.3.0",
|
|
715
|
+
ngImport: i0,
|
|
716
|
+
type: SmartNotificationsComponent,
|
|
717
|
+
decorators: [{
|
|
718
|
+
type: Component,
|
|
719
|
+
args: [{
|
|
720
|
+
selector: "ngxsp-notifications",
|
|
721
|
+
standalone: true,
|
|
722
|
+
imports: [SmartPlayerIconComponent],
|
|
723
|
+
template: `
|
|
724
|
+
@if (page; as data) {
|
|
725
|
+
<div class="ngxsp-notifications-head">
|
|
726
|
+
<div>
|
|
727
|
+
<h1>{{ data.title }}</h1>
|
|
728
|
+
@if (data.summary) { <p>{{ data.summary }}</p> }
|
|
729
|
+
</div>
|
|
730
|
+
@if (data.markAllLabel && hasUnread) {
|
|
731
|
+
<button class="ngxsp-notifications-button" type="button" (click)="markAllRead.emit()">{{ data.markAllLabel }}</button>
|
|
732
|
+
}
|
|
733
|
+
</div>
|
|
734
|
+
@for (group of data.groups; track group.id) {
|
|
735
|
+
<section class="ngxsp-notifications-group" [attr.aria-labelledby]="'ngxsp-notifications-' + group.id">
|
|
736
|
+
<h2 [id]="'ngxsp-notifications-' + group.id">{{ group.title }}</h2>
|
|
737
|
+
<ul>
|
|
738
|
+
@for (entry of group.entries; track entry.id) {
|
|
739
|
+
<li class="ngxsp-notifications-entry" [class.unread]="entry.unread" [attr.data-kind]="entry.kind || 'info'">
|
|
740
|
+
<span class="ngxsp-notifications-tile" aria-hidden="true">
|
|
741
|
+
<ngxsp-smart-icon [name]="entry.icon || iconFor(entry)" />
|
|
742
|
+
@if (entry.unread) { <i></i> }
|
|
743
|
+
</span>
|
|
744
|
+
<span class="ngxsp-notifications-copy">
|
|
745
|
+
<strong>{{ entry.title }}</strong>
|
|
746
|
+
@if (entry.body) { <small>{{ entry.body }}</small> }
|
|
747
|
+
</span>
|
|
748
|
+
@if (entry.action; as action) {
|
|
749
|
+
<button class="ngxsp-notifications-button" type="button" (click)="entryAction.emit({ id: entry.id, actionId: action.id })">{{ action.label }}</button>
|
|
750
|
+
}
|
|
751
|
+
@if (entry.ago) { <time>{{ entry.ago }}</time> }
|
|
752
|
+
</li>
|
|
753
|
+
}
|
|
754
|
+
</ul>
|
|
755
|
+
</section>
|
|
756
|
+
} @empty {
|
|
757
|
+
@if (data.emptyLabel) { <p class="ngxsp-notifications-empty">{{ data.emptyLabel }}</p> }
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
`,
|
|
761
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
762
|
+
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_success:var(--ngxsp-notifications-success, #3ecf8e);--_warning:var(--ngxsp-notifications-warning, #f2a93b);--_danger:var(--ngxsp-notifications-danger, #f25f5c);display:grid;gap:22px;max-width:860px;color:var(--_text)}.ngxsp-notifications-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px}.ngxsp-notifications-head h1{margin:0;font-size:21px;font-weight:600;letter-spacing:-.2px}.ngxsp-notifications-head p{margin:5px 0 0;color:var(--_muted);font-size:12px}.ngxsp-notifications-group{display:grid;gap:10px}.ngxsp-notifications-group h2{margin:0;font-size:13px;font-weight:600;color:var(--_muted)}.ngxsp-notifications-group ul{margin:0;padding:0;list-style:none;display:grid;gap:8px}.ngxsp-notifications-entry{display:flex;flex-wrap:wrap;align-items:flex-start;gap:13px;padding:13px 14px;border:1px solid var(--_line);border-radius:12px}.ngxsp-notifications-entry.unread{background:color-mix(in srgb,var(--_accent) 7%,transparent)}.ngxsp-notifications-tile{position:relative;flex:none;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:var(--_surface);color:var(--_muted)}.ngxsp-notifications-tile ngxsp-smart-icon{width:17px;height:17px}.ngxsp-notifications-tile i{position:absolute;left:-2px;top:-2px;width:8px;height:8px;border-radius:50%;background:var(--_accent);box-shadow:0 0 0 2px var(--ngxsp-notifications-dot-ring, rgb(0 0 0 / .4))}.ngxsp-notifications-entry[data-kind=success] .ngxsp-notifications-tile{background:color-mix(in srgb,var(--_success) 14%,transparent);color:var(--_success)}.ngxsp-notifications-entry[data-kind=warning] .ngxsp-notifications-tile{background:color-mix(in srgb,var(--_warning) 14%,transparent);color:var(--_warning)}.ngxsp-notifications-entry[data-kind=error] .ngxsp-notifications-tile{background:color-mix(in srgb,var(--_danger) 14%,transparent);color:var(--_danger)}.ngxsp-notifications-copy{flex:1 1 220px;min-width:0;display:grid;gap:3px}.ngxsp-notifications-copy strong{font-size:12.5px;font-weight:600;overflow-wrap:anywhere}.ngxsp-notifications-copy small{color:var(--_muted);font-size:11.5px;line-height:1.5;overflow-wrap:anywhere}.ngxsp-notifications-entry time{flex:none;color:var(--_muted);font-size:11px;white-space:nowrap}.ngxsp-notifications-button{flex:none;height:28px;padding:0 12px;border:1px solid var(--_line);border-radius:14px;background:transparent;color:var(--_text);font:inherit;font-size:12px;cursor:pointer}.ngxsp-notifications-head .ngxsp-notifications-button{height:30px;padding:0 13px}.ngxsp-notifications-button:hover{background:var(--_surface)}.ngxsp-notifications-empty{margin:0;color:var(--_muted);font-size:12px}\n"]
|
|
763
|
+
}]
|
|
764
|
+
}],
|
|
765
|
+
propDecorators: {
|
|
766
|
+
page: [{ type: Input }],
|
|
767
|
+
entryAction: [{ type: Output }],
|
|
768
|
+
markAllRead: [{ type: Output }]
|
|
769
|
+
}
|
|
770
|
+
});
|
|
490
771
|
var SmartSettingsComponent = class SmartSettingsComponent {
|
|
491
772
|
sections = [];
|
|
492
773
|
settingChange = new EventEmitter();
|
|
@@ -509,7 +790,7 @@ var SmartSettingsComponent = class SmartSettingsComponent {
|
|
|
509
790
|
}
|
|
510
791
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
511
792
|
minVersion: "12.0.0",
|
|
512
|
-
version: "22.
|
|
793
|
+
version: "22.3.0",
|
|
513
794
|
ngImport: i0,
|
|
514
795
|
type: SmartSettingsComponent,
|
|
515
796
|
deps: [],
|
|
@@ -517,7 +798,7 @@ var SmartSettingsComponent = class SmartSettingsComponent {
|
|
|
517
798
|
});
|
|
518
799
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
519
800
|
minVersion: "17.0.0",
|
|
520
|
-
version: "22.
|
|
801
|
+
version: "22.3.0",
|
|
521
802
|
type: SmartSettingsComponent,
|
|
522
803
|
isStandalone: true,
|
|
523
804
|
selector: "ngxsp-settings",
|
|
@@ -531,6 +812,7 @@ var SmartSettingsComponent = class SmartSettingsComponent {
|
|
|
531
812
|
@for (section of sections; track section.id) {
|
|
532
813
|
<section class="ngxsp-settings-section" [attr.aria-labelledby]="'ngxsp-settings-' + section.id">
|
|
533
814
|
<h2 [id]="'ngxsp-settings-' + section.id">{{ section.title }}</h2>
|
|
815
|
+
@if (section.description) { <p class="ngxsp-settings-hint">{{ section.description }}</p> }
|
|
534
816
|
<ul class="ngxsp-settings-items">
|
|
535
817
|
@for (item of section.items; track item.id) {
|
|
536
818
|
<li class="ngxsp-settings-item" [class.stacked]="item.kind === 'list'" [class.wraps]="item.kind === 'choice' || item.kind === 'action'">
|
|
@@ -551,6 +833,22 @@ var SmartSettingsComponent = class SmartSettingsComponent {
|
|
|
551
833
|
}
|
|
552
834
|
</span>
|
|
553
835
|
}
|
|
836
|
+
@case ('swatches') {
|
|
837
|
+
<span class="ngxsp-settings-swatches" role="group" [attr.aria-labelledby]="'ngxsp-setting-' + item.id">
|
|
838
|
+
@for (option of item.options; track option.id) {
|
|
839
|
+
<button
|
|
840
|
+
class="ngxsp-settings-swatch"
|
|
841
|
+
type="button"
|
|
842
|
+
[class.active]="option.id === item.value"
|
|
843
|
+
[style.--ngxsp-swatch]="option.color"
|
|
844
|
+
[title]="option.label"
|
|
845
|
+
[attr.aria-label]="option.label"
|
|
846
|
+
[attr.aria-pressed]="option.id === item.value"
|
|
847
|
+
(click)="option.id !== item.value && settingChange.emit({ id: item.id, value: option.id })"
|
|
848
|
+
></button>
|
|
849
|
+
}
|
|
850
|
+
</span>
|
|
851
|
+
}
|
|
554
852
|
@case ('secret') {
|
|
555
853
|
<form class="ngxsp-settings-secret" (submit)="submitSecret($event, item.id)">
|
|
556
854
|
@if (item.secondPlaceholder) {
|
|
@@ -577,6 +875,9 @@ var SmartSettingsComponent = class SmartSettingsComponent {
|
|
|
577
875
|
<button class="ngxsp-settings-button" type="submit" [disabled]="item.disabled || item.busy">{{ item.actionLabel }}</button>
|
|
578
876
|
</form>
|
|
579
877
|
}
|
|
878
|
+
@case ('status') {
|
|
879
|
+
@if (item.value) { <span class="ngxsp-settings-tag" [attr.data-tone]="item.tone || 'neutral'">{{ item.value }}</span> }
|
|
880
|
+
}
|
|
580
881
|
@case ('action') {
|
|
581
882
|
<button class="ngxsp-settings-button" type="button" [disabled]="item.disabled || item.busy" [attr.aria-describedby]="item.description ? 'ngxsp-setting-help-' + item.id : null" (click)="settingAction.emit({ id: item.id })">{{ item.actionLabel }}</button>
|
|
582
883
|
}
|
|
@@ -607,7 +908,7 @@ var SmartSettingsComponent = class SmartSettingsComponent {
|
|
|
607
908
|
}
|
|
608
909
|
`,
|
|
609
910
|
isInline: true,
|
|
610
|
-
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_control:var(--ngxsp-settings-control, rgb(127 127 127 / .2));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_accent-text:var(--ngxsp-settings-accent-text, #fff);--_radius:var(--ngxsp-settings-radius, 10px);display:grid;gap:
|
|
911
|
+
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_control:var(--ngxsp-settings-control, rgb(127 127 127 / .2));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_accent-text:var(--ngxsp-settings-accent-text, #fff);--_success:var(--ngxsp-settings-success, #3ecf8e);--_warning:var(--ngxsp-settings-warning, #f2a93b);--_danger:var(--ngxsp-settings-danger, #f25f5c);--_radius:var(--ngxsp-settings-radius, 10px);display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));min-width:0;align-items:start;gap:14px 20px;max-width:980px;color:var(--_text)}.ngxsp-settings-section{display:grid;gap:0;padding:4px 14px;border:1px solid var(--_line);border-radius:12px;background:var(--_surface)}h2{margin:12px 0 4px;font-size:13px;font-weight:600;color:var(--_text)}.ngxsp-settings-hint{margin:0 0 10px;color:var(--_muted);font-size:11.5px;line-height:1.45}.ngxsp-settings-items{margin:0;padding:0;list-style:none;display:grid;gap:0}.ngxsp-settings-item{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;padding:11px 0;border-top:1px solid var(--_line);background:transparent}.ngxsp-settings-item:first-child{border-top:0}.ngxsp-settings-item.stacked{display:grid;justify-content:stretch}.ngxsp-settings-item.wraps{flex-wrap:wrap}.ngxsp-settings-item.wraps .ngxsp-settings-copy{flex:1 1 220px}.ngxsp-settings-copy{min-width:0;display:grid;gap:4px}.ngxsp-settings-copy strong{font-size:14px;font-weight:600}.ngxsp-settings-copy small{font-size:12px;line-height:1.45;color:var(--_muted)}.ngxsp-settings-switch{position:relative;flex:0 0 auto;width:42px;height:24px;padding:0;border:1px solid var(--_line);border-radius:999px;background:var(--_control);cursor:pointer;transition:background-color .16s ease,border-color .16s ease}.ngxsp-settings-knob{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0000004d;transition:transform .16s ease}.ngxsp-settings-switch[aria-checked=true]{border-color:var(--_accent);background:var(--_accent)}.ngxsp-settings-switch[aria-checked=true] .ngxsp-settings-knob{transform:translate(18px)}.ngxsp-settings-choice{flex:0 0 auto;display:inline-flex;padding:2px;gap:2px;border:1px solid var(--_line);border-radius:999px;background:var(--_control)}.ngxsp-settings-swatches{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px}.ngxsp-settings-swatch{width:20px;height:20px;flex:0 0 auto;padding:0;border:0;border-radius:50%;background:var(--ngxsp-swatch, currentColor);cursor:pointer;box-shadow:0 0 0 2px var(--_surface)}.ngxsp-settings-swatch:hover{box-shadow:0 0 0 2px var(--_muted)}.ngxsp-settings-swatch.active{box-shadow:0 0 0 2px var(--_text)}.ngxsp-settings-swatch:focus-visible{outline:2px solid var(--_text);outline-offset:3px}.ngxsp-settings-choice button{height:28px;padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--_text);font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}.ngxsp-settings-choice button.active{background:var(--_accent);color:var(--_accent-text)}.ngxsp-settings-button{justify-self:start;flex:0 0 auto;height:32px;padding:0 14px;border:1px solid var(--_line);border-radius:999px;background:var(--_control);color:var(--_text);font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}.ngxsp-settings-tag{flex:0 0 auto;padding:3px 9px;border-radius:11px;background:var(--_control);color:var(--_muted);font-size:11px;font-weight:600;white-space:nowrap}.ngxsp-settings-tag[data-tone=success]{background:color-mix(in srgb,var(--_success) 14%,transparent);color:var(--_success)}.ngxsp-settings-tag[data-tone=warning]{background:color-mix(in srgb,var(--_warning) 14%,transparent);color:var(--_warning)}.ngxsp-settings-tag[data-tone=danger]{background:color-mix(in srgb,var(--_danger) 14%,transparent);color:var(--_danger)}.ngxsp-settings-button:disabled,.ngxsp-settings-switch:disabled,.ngxsp-settings-remove:disabled{opacity:.5;cursor:default}.ngxsp-settings-secret{display:flex;align-items:center;gap:8px;min-width:0}.ngxsp-settings-secret input{flex:1 1 96px;min-width:0;height:32px;padding:0 10px;border:1px solid var(--_line);border-radius:8px;background:var(--_control);color:var(--_text);font:inherit;font-size:12px;letter-spacing:.14em}.ngxsp-settings-secret input::placeholder{color:var(--_muted);letter-spacing:0}@media(hover:none){.ngxsp-settings-secret input{font-size:16px}}.ngxsp-settings-entries{margin:0;padding:0;list-style:none;display:grid;gap:4px}.ngxsp-settings-entries li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 8px 8px 12px;border:1px solid var(--_line);border-radius:8px}.ngxsp-settings-entries li.empty{display:block;color:var(--_muted);font-size:12px}.ngxsp-settings-entry{min-width:0;display:grid;gap:2px;font-size:13px}.ngxsp-settings-entry small{overflow:hidden;color:var(--_muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.ngxsp-settings-remove{flex:0 0 auto;width:30px;height:30px;display:grid;place-items:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--_muted);cursor:pointer}.ngxsp-settings-remove:hover{background:var(--_control);color:var(--_text)}.ngxsp-settings-remove ngxsp-smart-icon{width:16px;height:16px}button:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}@media(max-width:560px){.ngxsp-settings-secret{flex-wrap:wrap}.ngxsp-settings-choice{flex:0 1 auto;flex-wrap:wrap;max-width:100%}}\n"],
|
|
611
912
|
dependencies: [{
|
|
612
913
|
kind: "component",
|
|
613
914
|
type: SmartPlayerIconComponent,
|
|
@@ -619,7 +920,7 @@ var SmartSettingsComponent = class SmartSettingsComponent {
|
|
|
619
920
|
};
|
|
620
921
|
i0.ɵɵngDeclareClassMetadata({
|
|
621
922
|
minVersion: "12.0.0",
|
|
622
|
-
version: "22.
|
|
923
|
+
version: "22.3.0",
|
|
623
924
|
ngImport: i0,
|
|
624
925
|
type: SmartSettingsComponent,
|
|
625
926
|
decorators: [{
|
|
@@ -632,6 +933,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
632
933
|
@for (section of sections; track section.id) {
|
|
633
934
|
<section class="ngxsp-settings-section" [attr.aria-labelledby]="'ngxsp-settings-' + section.id">
|
|
634
935
|
<h2 [id]="'ngxsp-settings-' + section.id">{{ section.title }}</h2>
|
|
936
|
+
@if (section.description) { <p class="ngxsp-settings-hint">{{ section.description }}</p> }
|
|
635
937
|
<ul class="ngxsp-settings-items">
|
|
636
938
|
@for (item of section.items; track item.id) {
|
|
637
939
|
<li class="ngxsp-settings-item" [class.stacked]="item.kind === 'list'" [class.wraps]="item.kind === 'choice' || item.kind === 'action'">
|
|
@@ -652,6 +954,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
652
954
|
}
|
|
653
955
|
</span>
|
|
654
956
|
}
|
|
957
|
+
@case ('swatches') {
|
|
958
|
+
<span class="ngxsp-settings-swatches" role="group" [attr.aria-labelledby]="'ngxsp-setting-' + item.id">
|
|
959
|
+
@for (option of item.options; track option.id) {
|
|
960
|
+
<button
|
|
961
|
+
class="ngxsp-settings-swatch"
|
|
962
|
+
type="button"
|
|
963
|
+
[class.active]="option.id === item.value"
|
|
964
|
+
[style.--ngxsp-swatch]="option.color"
|
|
965
|
+
[title]="option.label"
|
|
966
|
+
[attr.aria-label]="option.label"
|
|
967
|
+
[attr.aria-pressed]="option.id === item.value"
|
|
968
|
+
(click)="option.id !== item.value && settingChange.emit({ id: item.id, value: option.id })"
|
|
969
|
+
></button>
|
|
970
|
+
}
|
|
971
|
+
</span>
|
|
972
|
+
}
|
|
655
973
|
@case ('secret') {
|
|
656
974
|
<form class="ngxsp-settings-secret" (submit)="submitSecret($event, item.id)">
|
|
657
975
|
@if (item.secondPlaceholder) {
|
|
@@ -678,6 +996,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
678
996
|
<button class="ngxsp-settings-button" type="submit" [disabled]="item.disabled || item.busy">{{ item.actionLabel }}</button>
|
|
679
997
|
</form>
|
|
680
998
|
}
|
|
999
|
+
@case ('status') {
|
|
1000
|
+
@if (item.value) { <span class="ngxsp-settings-tag" [attr.data-tone]="item.tone || 'neutral'">{{ item.value }}</span> }
|
|
1001
|
+
}
|
|
681
1002
|
@case ('action') {
|
|
682
1003
|
<button class="ngxsp-settings-button" type="button" [disabled]="item.disabled || item.busy" [attr.aria-describedby]="item.description ? 'ngxsp-setting-help-' + item.id : null" (click)="settingAction.emit({ id: item.id })">{{ item.actionLabel }}</button>
|
|
683
1004
|
}
|
|
@@ -708,7 +1029,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
708
1029
|
}
|
|
709
1030
|
`,
|
|
710
1031
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
711
|
-
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_control:var(--ngxsp-settings-control, rgb(127 127 127 / .2));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_accent-text:var(--ngxsp-settings-accent-text, #fff);--_radius:var(--ngxsp-settings-radius, 10px);display:grid;gap:
|
|
1032
|
+
styles: [":host{--_surface:var(--ngxsp-settings-surface, rgb(255 255 255 / .04));--_text:var(--ngxsp-settings-text, currentColor);--_muted:var(--ngxsp-settings-muted, rgb(127 127 127));--_line:var(--ngxsp-settings-line, rgb(127 127 127 / .3));--_control:var(--ngxsp-settings-control, rgb(127 127 127 / .2));--_accent:var(--ngxsp-settings-accent, #5b5bd6);--_accent-text:var(--ngxsp-settings-accent-text, #fff);--_success:var(--ngxsp-settings-success, #3ecf8e);--_warning:var(--ngxsp-settings-warning, #f2a93b);--_danger:var(--ngxsp-settings-danger, #f25f5c);--_radius:var(--ngxsp-settings-radius, 10px);display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));min-width:0;align-items:start;gap:14px 20px;max-width:980px;color:var(--_text)}.ngxsp-settings-section{display:grid;gap:0;padding:4px 14px;border:1px solid var(--_line);border-radius:12px;background:var(--_surface)}h2{margin:12px 0 4px;font-size:13px;font-weight:600;color:var(--_text)}.ngxsp-settings-hint{margin:0 0 10px;color:var(--_muted);font-size:11.5px;line-height:1.45}.ngxsp-settings-items{margin:0;padding:0;list-style:none;display:grid;gap:0}.ngxsp-settings-item{display:flex;align-items:center;justify-content:space-between;gap:12px 24px;padding:11px 0;border-top:1px solid var(--_line);background:transparent}.ngxsp-settings-item:first-child{border-top:0}.ngxsp-settings-item.stacked{display:grid;justify-content:stretch}.ngxsp-settings-item.wraps{flex-wrap:wrap}.ngxsp-settings-item.wraps .ngxsp-settings-copy{flex:1 1 220px}.ngxsp-settings-copy{min-width:0;display:grid;gap:4px}.ngxsp-settings-copy strong{font-size:14px;font-weight:600}.ngxsp-settings-copy small{font-size:12px;line-height:1.45;color:var(--_muted)}.ngxsp-settings-switch{position:relative;flex:0 0 auto;width:42px;height:24px;padding:0;border:1px solid var(--_line);border-radius:999px;background:var(--_control);cursor:pointer;transition:background-color .16s ease,border-color .16s ease}.ngxsp-settings-knob{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0000004d;transition:transform .16s ease}.ngxsp-settings-switch[aria-checked=true]{border-color:var(--_accent);background:var(--_accent)}.ngxsp-settings-switch[aria-checked=true] .ngxsp-settings-knob{transform:translate(18px)}.ngxsp-settings-choice{flex:0 0 auto;display:inline-flex;padding:2px;gap:2px;border:1px solid var(--_line);border-radius:999px;background:var(--_control)}.ngxsp-settings-swatches{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px}.ngxsp-settings-swatch{width:20px;height:20px;flex:0 0 auto;padding:0;border:0;border-radius:50%;background:var(--ngxsp-swatch, currentColor);cursor:pointer;box-shadow:0 0 0 2px var(--_surface)}.ngxsp-settings-swatch:hover{box-shadow:0 0 0 2px var(--_muted)}.ngxsp-settings-swatch.active{box-shadow:0 0 0 2px var(--_text)}.ngxsp-settings-swatch:focus-visible{outline:2px solid var(--_text);outline-offset:3px}.ngxsp-settings-choice button{height:28px;padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--_text);font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}.ngxsp-settings-choice button.active{background:var(--_accent);color:var(--_accent-text)}.ngxsp-settings-button{justify-self:start;flex:0 0 auto;height:32px;padding:0 14px;border:1px solid var(--_line);border-radius:999px;background:var(--_control);color:var(--_text);font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}.ngxsp-settings-tag{flex:0 0 auto;padding:3px 9px;border-radius:11px;background:var(--_control);color:var(--_muted);font-size:11px;font-weight:600;white-space:nowrap}.ngxsp-settings-tag[data-tone=success]{background:color-mix(in srgb,var(--_success) 14%,transparent);color:var(--_success)}.ngxsp-settings-tag[data-tone=warning]{background:color-mix(in srgb,var(--_warning) 14%,transparent);color:var(--_warning)}.ngxsp-settings-tag[data-tone=danger]{background:color-mix(in srgb,var(--_danger) 14%,transparent);color:var(--_danger)}.ngxsp-settings-button:disabled,.ngxsp-settings-switch:disabled,.ngxsp-settings-remove:disabled{opacity:.5;cursor:default}.ngxsp-settings-secret{display:flex;align-items:center;gap:8px;min-width:0}.ngxsp-settings-secret input{flex:1 1 96px;min-width:0;height:32px;padding:0 10px;border:1px solid var(--_line);border-radius:8px;background:var(--_control);color:var(--_text);font:inherit;font-size:12px;letter-spacing:.14em}.ngxsp-settings-secret input::placeholder{color:var(--_muted);letter-spacing:0}@media(hover:none){.ngxsp-settings-secret input{font-size:16px}}.ngxsp-settings-entries{margin:0;padding:0;list-style:none;display:grid;gap:4px}.ngxsp-settings-entries li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 8px 8px 12px;border:1px solid var(--_line);border-radius:8px}.ngxsp-settings-entries li.empty{display:block;color:var(--_muted);font-size:12px}.ngxsp-settings-entry{min-width:0;display:grid;gap:2px;font-size:13px}.ngxsp-settings-entry small{overflow:hidden;color:var(--_muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.ngxsp-settings-remove{flex:0 0 auto;width:30px;height:30px;display:grid;place-items:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--_muted);cursor:pointer}.ngxsp-settings-remove:hover{background:var(--_control);color:var(--_text)}.ngxsp-settings-remove ngxsp-smart-icon{width:16px;height:16px}button:focus-visible{outline:2px solid var(--_accent);outline-offset:2px}@media(max-width:560px){.ngxsp-settings-secret{flex-wrap:wrap}.ngxsp-settings-choice{flex:0 1 auto;flex-wrap:wrap;max-width:100%}}\n"]
|
|
712
1033
|
}]
|
|
713
1034
|
}],
|
|
714
1035
|
propDecorators: {
|
|
@@ -736,7 +1057,7 @@ var SmartConfirmDialogComponent = class SmartConfirmDialogComponent {
|
|
|
736
1057
|
}
|
|
737
1058
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
738
1059
|
minVersion: "12.0.0",
|
|
739
|
-
version: "22.
|
|
1060
|
+
version: "22.3.0",
|
|
740
1061
|
ngImport: i0,
|
|
741
1062
|
type: SmartConfirmDialogComponent,
|
|
742
1063
|
deps: [],
|
|
@@ -744,7 +1065,7 @@ var SmartConfirmDialogComponent = class SmartConfirmDialogComponent {
|
|
|
744
1065
|
});
|
|
745
1066
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
746
1067
|
minVersion: "14.0.0",
|
|
747
|
-
version: "22.
|
|
1068
|
+
version: "22.3.0",
|
|
748
1069
|
type: SmartConfirmDialogComponent,
|
|
749
1070
|
isStandalone: true,
|
|
750
1071
|
selector: "ngxsp-confirm-dialog",
|
|
@@ -785,7 +1106,7 @@ var SmartConfirmDialogComponent = class SmartConfirmDialogComponent {
|
|
|
785
1106
|
};
|
|
786
1107
|
i0.ɵɵngDeclareClassMetadata({
|
|
787
1108
|
minVersion: "12.0.0",
|
|
788
|
-
version: "22.
|
|
1109
|
+
version: "22.3.0",
|
|
789
1110
|
ngImport: i0,
|
|
790
1111
|
type: SmartConfirmDialogComponent,
|
|
791
1112
|
decorators: [{
|
|
@@ -826,124 +1147,350 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
826
1147
|
}]
|
|
827
1148
|
}
|
|
828
1149
|
});
|
|
829
|
-
const
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
tracks: "Tracks",
|
|
843
|
-
media: "Media"
|
|
1150
|
+
const DEFAULT_PLAYER_OVERLAY_LABELS = {
|
|
1151
|
+
retry: "Retry",
|
|
1152
|
+
play: "Play",
|
|
1153
|
+
engineMissing: "Playback engine missing",
|
|
1154
|
+
engineMissingHint: "This source requires an additional engine. Install @ngxsp/engine-shaka and pass it via [engines].",
|
|
1155
|
+
autoplayBlocked: "Click to start playback",
|
|
1156
|
+
autoplayBlockedHint: "Your browser blocked autoplay. Press Play to start.",
|
|
1157
|
+
networkError: "Network error",
|
|
1158
|
+
networkErrorHint: "Check your connection or try again.",
|
|
1159
|
+
decodeError: "Decode error",
|
|
1160
|
+
formatNotSupported: "Format not supported",
|
|
1161
|
+
playbackError: "Playback error",
|
|
1162
|
+
unknownError: "Unknown error"
|
|
844
1163
|
};
|
|
845
|
-
var
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
} catch {
|
|
870
|
-
return code;
|
|
1164
|
+
var PlayerOverlaysComponent = class PlayerOverlaysComponent {
|
|
1165
|
+
error = input(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
1166
|
+
debug = input(false, ...ngDevMode ? [{ debugName: "debug" }] : /* istanbul ignore next */ []);
|
|
1167
|
+
debugJson = input("{}", ...ngDevMode ? [{ debugName: "debugJson" }] : /* istanbul ignore next */ []);
|
|
1168
|
+
labels = input({}, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
1169
|
+
words = computed(() => ({
|
|
1170
|
+
...DEFAULT_PLAYER_OVERLAY_LABELS,
|
|
1171
|
+
...this.labels()
|
|
1172
|
+
}), ...ngDevMode ? [{ debugName: "words" }] : /* istanbul ignore next */ []);
|
|
1173
|
+
retry = output();
|
|
1174
|
+
requestPlay = output();
|
|
1175
|
+
copyJson = output();
|
|
1176
|
+
downloadJson = output();
|
|
1177
|
+
code = computed(() => this.error()?.code ?? "UNKNOWN", ...ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []);
|
|
1178
|
+
autoplayBlocked = computed(() => this.code() === "AUTOPLAY_BLOCKED", ...ngDevMode ? [{ debugName: "autoplayBlocked" }] : /* istanbul ignore next */ []);
|
|
1179
|
+
title = computed(() => {
|
|
1180
|
+
const words = this.words();
|
|
1181
|
+
switch (this.code()) {
|
|
1182
|
+
case "ENGINE_MISSING": return words.engineMissing;
|
|
1183
|
+
case "AUTOPLAY_BLOCKED": return words.autoplayBlocked;
|
|
1184
|
+
case "NETWORK_HTTP": return words.networkError;
|
|
1185
|
+
case "DECODE_ERROR": return words.decodeError;
|
|
1186
|
+
case "SRC_NOT_SUPPORTED": return words.formatNotSupported;
|
|
1187
|
+
default: return words.playbackError;
|
|
871
1188
|
}
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
}
|
|
1189
|
+
}, ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
1190
|
+
hint = computed(() => {
|
|
1191
|
+
const words = this.words();
|
|
1192
|
+
switch (this.code()) {
|
|
1193
|
+
case "ENGINE_MISSING": return words.engineMissingHint;
|
|
1194
|
+
case "AUTOPLAY_BLOCKED": return words.autoplayBlockedHint;
|
|
1195
|
+
case "NETWORK_HTTP": return words.networkErrorHint;
|
|
1196
|
+
default: return this.error()?.message ? String(this.error().message) : words.unknownError;
|
|
1197
|
+
}
|
|
1198
|
+
}, ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
883
1199
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
884
1200
|
minVersion: "12.0.0",
|
|
885
|
-
version: "22.
|
|
1201
|
+
version: "22.3.0",
|
|
886
1202
|
ngImport: i0,
|
|
887
|
-
type:
|
|
1203
|
+
type: PlayerOverlaysComponent,
|
|
888
1204
|
deps: [],
|
|
889
1205
|
target: i0.ɵɵFactoryTarget.Component
|
|
890
1206
|
});
|
|
891
1207
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
892
1208
|
minVersion: "17.0.0",
|
|
893
|
-
version: "22.
|
|
894
|
-
type:
|
|
1209
|
+
version: "22.3.0",
|
|
1210
|
+
type: PlayerOverlaysComponent,
|
|
895
1211
|
isStandalone: true,
|
|
896
|
-
selector: "ngxsp-player-
|
|
1212
|
+
selector: "ngxsp-player-overlays",
|
|
897
1213
|
inputs: {
|
|
898
|
-
|
|
899
|
-
classPropertyName: "
|
|
900
|
-
publicName: "
|
|
901
|
-
isSignal: true,
|
|
902
|
-
isRequired: false,
|
|
903
|
-
transformFunction: null
|
|
904
|
-
},
|
|
905
|
-
isAudioMode: {
|
|
906
|
-
classPropertyName: "isAudioMode",
|
|
907
|
-
publicName: "isAudioMode",
|
|
908
|
-
isSignal: true,
|
|
909
|
-
isRequired: false,
|
|
910
|
-
transformFunction: null
|
|
911
|
-
},
|
|
912
|
-
textTracks: {
|
|
913
|
-
classPropertyName: "textTracks",
|
|
914
|
-
publicName: "textTracks",
|
|
915
|
-
isSignal: true,
|
|
916
|
-
isRequired: false,
|
|
917
|
-
transformFunction: null
|
|
918
|
-
},
|
|
919
|
-
audioTracks: {
|
|
920
|
-
classPropertyName: "audioTracks",
|
|
921
|
-
publicName: "audioTracks",
|
|
1214
|
+
error: {
|
|
1215
|
+
classPropertyName: "error",
|
|
1216
|
+
publicName: "error",
|
|
922
1217
|
isSignal: true,
|
|
923
1218
|
isRequired: false,
|
|
924
1219
|
transformFunction: null
|
|
925
1220
|
},
|
|
926
|
-
|
|
927
|
-
classPropertyName: "
|
|
928
|
-
publicName: "
|
|
1221
|
+
debug: {
|
|
1222
|
+
classPropertyName: "debug",
|
|
1223
|
+
publicName: "debug",
|
|
929
1224
|
isSignal: true,
|
|
930
1225
|
isRequired: false,
|
|
931
1226
|
transformFunction: null
|
|
932
1227
|
},
|
|
933
|
-
|
|
934
|
-
classPropertyName: "
|
|
935
|
-
publicName: "
|
|
1228
|
+
debugJson: {
|
|
1229
|
+
classPropertyName: "debugJson",
|
|
1230
|
+
publicName: "debugJson",
|
|
936
1231
|
isSignal: true,
|
|
937
1232
|
isRequired: false,
|
|
938
1233
|
transformFunction: null
|
|
939
1234
|
},
|
|
940
|
-
|
|
941
|
-
classPropertyName: "
|
|
942
|
-
publicName: "
|
|
1235
|
+
labels: {
|
|
1236
|
+
classPropertyName: "labels",
|
|
1237
|
+
publicName: "labels",
|
|
943
1238
|
isSignal: true,
|
|
944
1239
|
isRequired: false,
|
|
945
1240
|
transformFunction: null
|
|
946
|
-
}
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
outputs: {
|
|
1244
|
+
retry: "retry",
|
|
1245
|
+
requestPlay: "requestPlay",
|
|
1246
|
+
copyJson: "copyJson",
|
|
1247
|
+
downloadJson: "downloadJson"
|
|
1248
|
+
},
|
|
1249
|
+
ngImport: i0,
|
|
1250
|
+
template: `
|
|
1251
|
+
@if (error()) {
|
|
1252
|
+
<div class="ngxsp-overlay" role="alert">
|
|
1253
|
+
<div class="ngxsp-overlay-card">
|
|
1254
|
+
<span class="ngxsp-overlay-icon" aria-hidden="true">!</span>
|
|
1255
|
+
<div class="ngxsp-overlay-title">{{ title() }}</div>
|
|
1256
|
+
<div class="ngxsp-overlay-msg">{{ hint() }}</div>
|
|
1257
|
+
<div class="ngxsp-overlay-actions">
|
|
1258
|
+
<button type="button" class="ngxsp-btn" (click)="retry.emit()">{{ words().retry }}</button>
|
|
1259
|
+
@if (autoplayBlocked()) {
|
|
1260
|
+
<button type="button" class="ngxsp-btn primary" (click)="requestPlay.emit()">{{ words().play }}</button>
|
|
1261
|
+
}
|
|
1262
|
+
</div>
|
|
1263
|
+
</div>
|
|
1264
|
+
</div>
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
@if (debug()) {
|
|
1268
|
+
<details class="ngxsp-debug">
|
|
1269
|
+
<summary>Debug</summary>
|
|
1270
|
+
<div class="ngxsp-debug-actions">
|
|
1271
|
+
<button type="button" class="ngxsp-btn" (click)="copyJson.emit()">Copy JSON</button>
|
|
1272
|
+
<button type="button" class="ngxsp-btn" (click)="downloadJson.emit()">Download</button>
|
|
1273
|
+
</div>
|
|
1274
|
+
<pre>{{ debugJson() }}</pre>
|
|
1275
|
+
</details>
|
|
1276
|
+
}
|
|
1277
|
+
`,
|
|
1278
|
+
isInline: true,
|
|
1279
|
+
styles: [":host{display:contents}.ngxsp-btn{height:32px;padding:0 14px;border:1px solid rgb(255 255 255 / .16);border-radius:6px;background:#ffffff0f;color:#fff;font:inherit;font-size:13px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}.ngxsp-btn:hover{background:#ffffff1f}.ngxsp-btn.primary{border-color:transparent;background:var(--nsp-accent-strong, #5d63ee)}.ngxsp-btn:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:2px}.ngxsp-overlay{position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:24px;background:#000000c7;text-align:center}.ngxsp-overlay-card{display:grid;justify-items:center;gap:8px;max-width:440px}.ngxsp-overlay-icon{width:40px;height:40px;display:grid;place-items:center;margin-bottom:4px;border-radius:999px;background:#f25f5c29;color:var(--nsp-danger, #f25f5c);font-size:18px;font-weight:700}.ngxsp-overlay-title{font-size:16px;font-weight:600;color:#fff}.ngxsp-overlay-msg{color:#ffffffb3;font-size:13px;line-height:1.5}.ngxsp-overlay-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:8px}.ngxsp-debug{position:absolute;top:12px;right:12px;z-index:6;margin:0;max-width:min(420px,calc(100% - 24px));opacity:0;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease;color:#fff}:host-context(.ngxsp-ui-visible) .ngxsp-debug,.ngxsp-debug[open]{opacity:1;transform:translateY(0)}.ngxsp-debug summary{cursor:pointer;list-style:none;width:max-content;margin-left:auto;padding:4px 10px;border-radius:999px;background:#0009;color:#fffc;font-size:12px}.ngxsp-debug[open]{padding:12px;max-height:calc(100% - 24px);overflow:auto;border-radius:10px;background:#121317f5;box-shadow:0 12px 32px #00000073,0 0 0 1px #ffffff14}.ngxsp-debug-actions{display:flex;gap:8px;margin:8px 0;flex-wrap:wrap}.ngxsp-debug pre{margin:0;white-space:pre-wrap;word-break:break-word;font-family:var(--nsp-font-mono, ui-monospace, Menlo, monospace);font-size:11px}\n"],
|
|
1280
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1281
|
+
});
|
|
1282
|
+
};
|
|
1283
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1284
|
+
minVersion: "12.0.0",
|
|
1285
|
+
version: "22.3.0",
|
|
1286
|
+
ngImport: i0,
|
|
1287
|
+
type: PlayerOverlaysComponent,
|
|
1288
|
+
decorators: [{
|
|
1289
|
+
type: Component,
|
|
1290
|
+
args: [{
|
|
1291
|
+
selector: "ngxsp-player-overlays",
|
|
1292
|
+
standalone: true,
|
|
1293
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1294
|
+
template: `
|
|
1295
|
+
@if (error()) {
|
|
1296
|
+
<div class="ngxsp-overlay" role="alert">
|
|
1297
|
+
<div class="ngxsp-overlay-card">
|
|
1298
|
+
<span class="ngxsp-overlay-icon" aria-hidden="true">!</span>
|
|
1299
|
+
<div class="ngxsp-overlay-title">{{ title() }}</div>
|
|
1300
|
+
<div class="ngxsp-overlay-msg">{{ hint() }}</div>
|
|
1301
|
+
<div class="ngxsp-overlay-actions">
|
|
1302
|
+
<button type="button" class="ngxsp-btn" (click)="retry.emit()">{{ words().retry }}</button>
|
|
1303
|
+
@if (autoplayBlocked()) {
|
|
1304
|
+
<button type="button" class="ngxsp-btn primary" (click)="requestPlay.emit()">{{ words().play }}</button>
|
|
1305
|
+
}
|
|
1306
|
+
</div>
|
|
1307
|
+
</div>
|
|
1308
|
+
</div>
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
@if (debug()) {
|
|
1312
|
+
<details class="ngxsp-debug">
|
|
1313
|
+
<summary>Debug</summary>
|
|
1314
|
+
<div class="ngxsp-debug-actions">
|
|
1315
|
+
<button type="button" class="ngxsp-btn" (click)="copyJson.emit()">Copy JSON</button>
|
|
1316
|
+
<button type="button" class="ngxsp-btn" (click)="downloadJson.emit()">Download</button>
|
|
1317
|
+
</div>
|
|
1318
|
+
<pre>{{ debugJson() }}</pre>
|
|
1319
|
+
</details>
|
|
1320
|
+
}
|
|
1321
|
+
`,
|
|
1322
|
+
styles: [":host{display:contents}.ngxsp-btn{height:32px;padding:0 14px;border:1px solid rgb(255 255 255 / .16);border-radius:6px;background:#ffffff0f;color:#fff;font:inherit;font-size:13px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}.ngxsp-btn:hover{background:#ffffff1f}.ngxsp-btn.primary{border-color:transparent;background:var(--nsp-accent-strong, #5d63ee)}.ngxsp-btn:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:2px}.ngxsp-overlay{position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:24px;background:#000000c7;text-align:center}.ngxsp-overlay-card{display:grid;justify-items:center;gap:8px;max-width:440px}.ngxsp-overlay-icon{width:40px;height:40px;display:grid;place-items:center;margin-bottom:4px;border-radius:999px;background:#f25f5c29;color:var(--nsp-danger, #f25f5c);font-size:18px;font-weight:700}.ngxsp-overlay-title{font-size:16px;font-weight:600;color:#fff}.ngxsp-overlay-msg{color:#ffffffb3;font-size:13px;line-height:1.5}.ngxsp-overlay-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:8px}.ngxsp-debug{position:absolute;top:12px;right:12px;z-index:6;margin:0;max-width:min(420px,calc(100% - 24px));opacity:0;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease;color:#fff}:host-context(.ngxsp-ui-visible) .ngxsp-debug,.ngxsp-debug[open]{opacity:1;transform:translateY(0)}.ngxsp-debug summary{cursor:pointer;list-style:none;width:max-content;margin-left:auto;padding:4px 10px;border-radius:999px;background:#0009;color:#fffc;font-size:12px}.ngxsp-debug[open]{padding:12px;max-height:calc(100% - 24px);overflow:auto;border-radius:10px;background:#121317f5;box-shadow:0 12px 32px #00000073,0 0 0 1px #ffffff14}.ngxsp-debug-actions{display:flex;gap:8px;margin:8px 0;flex-wrap:wrap}.ngxsp-debug pre{margin:0;white-space:pre-wrap;word-break:break-word;font-family:var(--nsp-font-mono, ui-monospace, Menlo, monospace);font-size:11px}\n"]
|
|
1323
|
+
}]
|
|
1324
|
+
}],
|
|
1325
|
+
propDecorators: {
|
|
1326
|
+
error: [{
|
|
1327
|
+
type: i0.Input,
|
|
1328
|
+
args: [{
|
|
1329
|
+
isSignal: true,
|
|
1330
|
+
alias: "error",
|
|
1331
|
+
required: false
|
|
1332
|
+
}]
|
|
1333
|
+
}],
|
|
1334
|
+
debug: [{
|
|
1335
|
+
type: i0.Input,
|
|
1336
|
+
args: [{
|
|
1337
|
+
isSignal: true,
|
|
1338
|
+
alias: "debug",
|
|
1339
|
+
required: false
|
|
1340
|
+
}]
|
|
1341
|
+
}],
|
|
1342
|
+
debugJson: [{
|
|
1343
|
+
type: i0.Input,
|
|
1344
|
+
args: [{
|
|
1345
|
+
isSignal: true,
|
|
1346
|
+
alias: "debugJson",
|
|
1347
|
+
required: false
|
|
1348
|
+
}]
|
|
1349
|
+
}],
|
|
1350
|
+
labels: [{
|
|
1351
|
+
type: i0.Input,
|
|
1352
|
+
args: [{
|
|
1353
|
+
isSignal: true,
|
|
1354
|
+
alias: "labels",
|
|
1355
|
+
required: false
|
|
1356
|
+
}]
|
|
1357
|
+
}],
|
|
1358
|
+
retry: [{
|
|
1359
|
+
type: i0.Output,
|
|
1360
|
+
args: ["retry"]
|
|
1361
|
+
}],
|
|
1362
|
+
requestPlay: [{
|
|
1363
|
+
type: i0.Output,
|
|
1364
|
+
args: ["requestPlay"]
|
|
1365
|
+
}],
|
|
1366
|
+
copyJson: [{
|
|
1367
|
+
type: i0.Output,
|
|
1368
|
+
args: ["copyJson"]
|
|
1369
|
+
}],
|
|
1370
|
+
downloadJson: [{
|
|
1371
|
+
type: i0.Output,
|
|
1372
|
+
args: ["downloadJson"]
|
|
1373
|
+
}]
|
|
1374
|
+
}
|
|
1375
|
+
});
|
|
1376
|
+
const DEFAULT_PLAYER_MENU_LABELS = {
|
|
1377
|
+
captions: "Captions",
|
|
1378
|
+
off: "Off",
|
|
1379
|
+
audio: "Audio",
|
|
1380
|
+
singleAudio: "Single audio track",
|
|
1381
|
+
quality: "Quality",
|
|
1382
|
+
auto: "Auto",
|
|
1383
|
+
singleQuality: "Single quality",
|
|
1384
|
+
speed: "Playback speed",
|
|
1385
|
+
subtitles: "Subtitles",
|
|
1386
|
+
current: "Showing",
|
|
1387
|
+
noSubtitles: "No subtitles in this video yet.",
|
|
1388
|
+
loadSubtitles: "Load a file (SRT, VTT)…",
|
|
1389
|
+
tracks: "Tracks",
|
|
1390
|
+
media: "Media"
|
|
1391
|
+
};
|
|
1392
|
+
var PlayerMenuComponent = class PlayerMenuComponent {
|
|
1393
|
+
openMenu = input(null, ...ngDevMode ? [{ debugName: "openMenu" }] : /* istanbul ignore next */ []);
|
|
1394
|
+
isAudioMode = input(false, ...ngDevMode ? [{ debugName: "isAudioMode" }] : /* istanbul ignore next */ []);
|
|
1395
|
+
textTracks = input([], ...ngDevMode ? [{ debugName: "textTracks" }] : /* istanbul ignore next */ []);
|
|
1396
|
+
audioTracks = input([], ...ngDevMode ? [{ debugName: "audioTracks" }] : /* istanbul ignore next */ []);
|
|
1397
|
+
videoTracks = input([], ...ngDevMode ? [{ debugName: "videoTracks" }] : /* istanbul ignore next */ []);
|
|
1398
|
+
selectedTextTrackId = input(null, ...ngDevMode ? [{ debugName: "selectedTextTrackId" }] : /* istanbul ignore next */ []);
|
|
1399
|
+
selectedAudioTrackId = input(null, ...ngDevMode ? [{ debugName: "selectedAudioTrackId" }] : /* istanbul ignore next */ []);
|
|
1400
|
+
selectedVideoTrackId = input(null, ...ngDevMode ? [{ debugName: "selectedVideoTrackId" }] : /* istanbul ignore next */ []);
|
|
1401
|
+
playbackRates = input([], ...ngDevMode ? [{ debugName: "playbackRates" }] : /* istanbul ignore next */ []);
|
|
1402
|
+
playbackRate = input(1, ...ngDevMode ? [{ debugName: "playbackRate" }] : /* istanbul ignore next */ []);
|
|
1403
|
+
labels = input(DEFAULT_PLAYER_MENU_LABELS, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
1404
|
+
selectText = output();
|
|
1405
|
+
selectAudio = output();
|
|
1406
|
+
selectVideo = output();
|
|
1407
|
+
selectRate = output();
|
|
1408
|
+
loadSubtitles = output();
|
|
1409
|
+
currentTextLabel() {
|
|
1410
|
+
const track = this.textTracks().find((entry) => entry.id === this.selectedTextTrackId());
|
|
1411
|
+
return track ? this.trackLabel(track) : this.labels().off;
|
|
1412
|
+
}
|
|
1413
|
+
languageName(code) {
|
|
1414
|
+
try {
|
|
1415
|
+
return new Intl.DisplayNames(this.labels().locale ? [this.labels().locale] : void 0, { type: "language" }).of(code) ?? code;
|
|
1416
|
+
} catch {
|
|
1417
|
+
return code;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
trackLabel(track) {
|
|
1421
|
+
return track.label || (track.language ? this.languageName(track.language) : track.id);
|
|
1422
|
+
}
|
|
1423
|
+
qualityLabel(track) {
|
|
1424
|
+
if (track.label) return track.label;
|
|
1425
|
+
const parts = [];
|
|
1426
|
+
if (track.height) parts.push(`${track.height}p`);
|
|
1427
|
+
if (track.bandwidth) parts.push(`${(track.bandwidth / 1e6).toFixed(1)} Mbps`);
|
|
1428
|
+
return parts.join(" • ") || track.id;
|
|
1429
|
+
}
|
|
1430
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1431
|
+
minVersion: "12.0.0",
|
|
1432
|
+
version: "22.3.0",
|
|
1433
|
+
ngImport: i0,
|
|
1434
|
+
type: PlayerMenuComponent,
|
|
1435
|
+
deps: [],
|
|
1436
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1437
|
+
});
|
|
1438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1439
|
+
minVersion: "17.0.0",
|
|
1440
|
+
version: "22.3.0",
|
|
1441
|
+
type: PlayerMenuComponent,
|
|
1442
|
+
isStandalone: true,
|
|
1443
|
+
selector: "ngxsp-player-menu",
|
|
1444
|
+
inputs: {
|
|
1445
|
+
openMenu: {
|
|
1446
|
+
classPropertyName: "openMenu",
|
|
1447
|
+
publicName: "openMenu",
|
|
1448
|
+
isSignal: true,
|
|
1449
|
+
isRequired: false,
|
|
1450
|
+
transformFunction: null
|
|
1451
|
+
},
|
|
1452
|
+
isAudioMode: {
|
|
1453
|
+
classPropertyName: "isAudioMode",
|
|
1454
|
+
publicName: "isAudioMode",
|
|
1455
|
+
isSignal: true,
|
|
1456
|
+
isRequired: false,
|
|
1457
|
+
transformFunction: null
|
|
1458
|
+
},
|
|
1459
|
+
textTracks: {
|
|
1460
|
+
classPropertyName: "textTracks",
|
|
1461
|
+
publicName: "textTracks",
|
|
1462
|
+
isSignal: true,
|
|
1463
|
+
isRequired: false,
|
|
1464
|
+
transformFunction: null
|
|
1465
|
+
},
|
|
1466
|
+
audioTracks: {
|
|
1467
|
+
classPropertyName: "audioTracks",
|
|
1468
|
+
publicName: "audioTracks",
|
|
1469
|
+
isSignal: true,
|
|
1470
|
+
isRequired: false,
|
|
1471
|
+
transformFunction: null
|
|
1472
|
+
},
|
|
1473
|
+
videoTracks: {
|
|
1474
|
+
classPropertyName: "videoTracks",
|
|
1475
|
+
publicName: "videoTracks",
|
|
1476
|
+
isSignal: true,
|
|
1477
|
+
isRequired: false,
|
|
1478
|
+
transformFunction: null
|
|
1479
|
+
},
|
|
1480
|
+
selectedTextTrackId: {
|
|
1481
|
+
classPropertyName: "selectedTextTrackId",
|
|
1482
|
+
publicName: "selectedTextTrackId",
|
|
1483
|
+
isSignal: true,
|
|
1484
|
+
isRequired: false,
|
|
1485
|
+
transformFunction: null
|
|
1486
|
+
},
|
|
1487
|
+
selectedAudioTrackId: {
|
|
1488
|
+
classPropertyName: "selectedAudioTrackId",
|
|
1489
|
+
publicName: "selectedAudioTrackId",
|
|
1490
|
+
isSignal: true,
|
|
1491
|
+
isRequired: false,
|
|
1492
|
+
transformFunction: null
|
|
1493
|
+
},
|
|
947
1494
|
selectedVideoTrackId: {
|
|
948
1495
|
classPropertyName: "selectedVideoTrackId",
|
|
949
1496
|
publicName: "selectedVideoTrackId",
|
|
@@ -1065,7 +1612,7 @@ var PlayerMenuComponent = class PlayerMenuComponent {
|
|
|
1065
1612
|
};
|
|
1066
1613
|
i0.ɵɵngDeclareClassMetadata({
|
|
1067
1614
|
minVersion: "12.0.0",
|
|
1068
|
-
version: "22.
|
|
1615
|
+
version: "22.3.0",
|
|
1069
1616
|
ngImport: i0,
|
|
1070
1617
|
type: PlayerMenuComponent,
|
|
1071
1618
|
decorators: [{
|
|
@@ -1131,327 +1678,137 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1131
1678
|
</div>
|
|
1132
1679
|
}
|
|
1133
1680
|
|
|
1134
|
-
@if (openMenu() === 'captions') {
|
|
1135
|
-
<div class="ngxsp-menu ngxsp-menuCompact ngxsp-menuCaptions">
|
|
1136
|
-
<div class="ngxsp-menuSection">
|
|
1137
|
-
<div class="ngxsp-menuTitle">{{ labels().subtitles }}</div>
|
|
1138
|
-
<div class="ngxsp-menuCurrent">{{ labels().current }} <strong>{{ currentTextLabel() }}</strong></div>
|
|
1139
|
-
<div class="ngxsp-menuScroll" role="group" [attr.aria-label]="labels().subtitles">
|
|
1140
|
-
<button type="button" class="ngxsp-menuItem" [class.active]="selectedTextTrackId() === null" [attr.aria-pressed]="selectedTextTrackId() === null" (click)="selectText.emit(null)">{{ labels().off }}</button>
|
|
1141
|
-
@for (track of textTracks(); track track.id) {
|
|
1142
|
-
<button type="button" class="ngxsp-menuItem" [class.active]="selectedTextTrackId() === track.id" [attr.aria-pressed]="selectedTextTrackId() === track.id" (click)="selectText.emit(track.id)">
|
|
1143
|
-
<span class="ngxsp-menuItemLabel">{{ trackLabel(track) }}</span>
|
|
1144
|
-
@if (track.language && track.label) { <small>{{ languageName(track.language) }}</small> }
|
|
1145
|
-
</button>
|
|
1146
|
-
}
|
|
1147
|
-
</div>
|
|
1148
|
-
@if (!textTracks().length) { <div class="ngxsp-menuHint">{{ labels().noSubtitles }}</div> }
|
|
1149
|
-
<button type="button" class="ngxsp-menuItem ngxsp-menuAction" (click)="loadSubtitles.emit()">{{ labels().loadSubtitles }}</button>
|
|
1150
|
-
</div>
|
|
1151
|
-
</div>
|
|
1152
|
-
}
|
|
1153
|
-
`,
|
|
1154
|
-
styles: [":host{display:block}.ngxsp-menu{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:6px 0 4px;padding:12px;border-radius:10px;background:#121317eb;box-shadow:0 12px 32px #00000073,0 0 0 1px #ffffff14;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.ngxsp-menuCompact{grid-template-columns:minmax(160px,220px);justify-self:end}.ngxsp-menuSection{display:flex;flex-direction:column;gap:2px}.ngxsp-menuTitle{padding:0 8px 6px;font-size:12px;font-weight:600;color:#fff9}.ngxsp-menuItem{height:32px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#ffffffe6;text-align:left;cursor:pointer;font:inherit;font-size:13px}.ngxsp-menuItem:hover{background:#ffffff1a}.ngxsp-menuItem.active{background:#8b90ff2e;color:var(--nsp-media-accent, #8b90ff);font-weight:500}.ngxsp-menuItem:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:-2px}.ngxsp-menuHint{font-size:12px;color:#fff9;padding:6px 8px}.ngxsp-menuCaptions{grid-template-columns:minmax(200px,280px)}.ngxsp-menuCurrent{padding:0 8px 8px;font-size:12px;color:#fff9;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngxsp-menuCurrent strong{color:#ffffffeb;font-weight:600}.ngxsp-menuScroll{display:flex;flex-direction:column;gap:2px;max-height:min(36vh,232px);overflow:auto;overscroll-behavior:contain}.ngxsp-menuItem{display:flex;align-items:center;gap:8px;flex:none}.ngxsp-menuItemLabel{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngxsp-menuItem small{flex:none;font-size:11px;color:#ffffff8c}.ngxsp-menuAction{margin-top:6px;border-top:1px solid rgb(255 255 255 / .1);border-radius:0 0 6px 6px;color:var(--nsp-media-accent, #8b90ff)}@media(max-width:860px){.ngxsp-menu{grid-template-columns:1fr}}\n"]
|
|
1155
|
-
}]
|
|
1156
|
-
}],
|
|
1157
|
-
propDecorators: {
|
|
1158
|
-
openMenu: [{
|
|
1159
|
-
type: i0.Input,
|
|
1160
|
-
args: [{
|
|
1161
|
-
isSignal: true,
|
|
1162
|
-
alias: "openMenu",
|
|
1163
|
-
required: false
|
|
1164
|
-
}]
|
|
1165
|
-
}],
|
|
1166
|
-
isAudioMode: [{
|
|
1167
|
-
type: i0.Input,
|
|
1168
|
-
args: [{
|
|
1169
|
-
isSignal: true,
|
|
1170
|
-
alias: "isAudioMode",
|
|
1171
|
-
required: false
|
|
1172
|
-
}]
|
|
1173
|
-
}],
|
|
1174
|
-
textTracks: [{
|
|
1175
|
-
type: i0.Input,
|
|
1176
|
-
args: [{
|
|
1177
|
-
isSignal: true,
|
|
1178
|
-
alias: "textTracks",
|
|
1179
|
-
required: false
|
|
1180
|
-
}]
|
|
1181
|
-
}],
|
|
1182
|
-
audioTracks: [{
|
|
1183
|
-
type: i0.Input,
|
|
1184
|
-
args: [{
|
|
1185
|
-
isSignal: true,
|
|
1186
|
-
alias: "audioTracks",
|
|
1187
|
-
required: false
|
|
1188
|
-
}]
|
|
1189
|
-
}],
|
|
1190
|
-
videoTracks: [{
|
|
1191
|
-
type: i0.Input,
|
|
1192
|
-
args: [{
|
|
1193
|
-
isSignal: true,
|
|
1194
|
-
alias: "videoTracks",
|
|
1195
|
-
required: false
|
|
1196
|
-
}]
|
|
1197
|
-
}],
|
|
1198
|
-
selectedTextTrackId: [{
|
|
1199
|
-
type: i0.Input,
|
|
1200
|
-
args: [{
|
|
1201
|
-
isSignal: true,
|
|
1202
|
-
alias: "selectedTextTrackId",
|
|
1203
|
-
required: false
|
|
1204
|
-
}]
|
|
1205
|
-
}],
|
|
1206
|
-
selectedAudioTrackId: [{
|
|
1207
|
-
type: i0.Input,
|
|
1208
|
-
args: [{
|
|
1209
|
-
isSignal: true,
|
|
1210
|
-
alias: "selectedAudioTrackId",
|
|
1211
|
-
required: false
|
|
1212
|
-
}]
|
|
1213
|
-
}],
|
|
1214
|
-
selectedVideoTrackId: [{
|
|
1215
|
-
type: i0.Input,
|
|
1216
|
-
args: [{
|
|
1217
|
-
isSignal: true,
|
|
1218
|
-
alias: "selectedVideoTrackId",
|
|
1219
|
-
required: false
|
|
1220
|
-
}]
|
|
1221
|
-
}],
|
|
1222
|
-
playbackRates: [{
|
|
1223
|
-
type: i0.Input,
|
|
1224
|
-
args: [{
|
|
1225
|
-
isSignal: true,
|
|
1226
|
-
alias: "playbackRates",
|
|
1227
|
-
required: false
|
|
1228
|
-
}]
|
|
1229
|
-
}],
|
|
1230
|
-
playbackRate: [{
|
|
1231
|
-
type: i0.Input,
|
|
1232
|
-
args: [{
|
|
1233
|
-
isSignal: true,
|
|
1234
|
-
alias: "playbackRate",
|
|
1235
|
-
required: false
|
|
1236
|
-
}]
|
|
1237
|
-
}],
|
|
1238
|
-
labels: [{
|
|
1239
|
-
type: i0.Input,
|
|
1240
|
-
args: [{
|
|
1241
|
-
isSignal: true,
|
|
1242
|
-
alias: "labels",
|
|
1243
|
-
required: false
|
|
1244
|
-
}]
|
|
1245
|
-
}],
|
|
1246
|
-
selectText: [{
|
|
1247
|
-
type: i0.Output,
|
|
1248
|
-
args: ["selectText"]
|
|
1249
|
-
}],
|
|
1250
|
-
selectAudio: [{
|
|
1251
|
-
type: i0.Output,
|
|
1252
|
-
args: ["selectAudio"]
|
|
1253
|
-
}],
|
|
1254
|
-
selectVideo: [{
|
|
1255
|
-
type: i0.Output,
|
|
1256
|
-
args: ["selectVideo"]
|
|
1257
|
-
}],
|
|
1258
|
-
selectRate: [{
|
|
1259
|
-
type: i0.Output,
|
|
1260
|
-
args: ["selectRate"]
|
|
1261
|
-
}],
|
|
1262
|
-
loadSubtitles: [{
|
|
1263
|
-
type: i0.Output,
|
|
1264
|
-
args: ["loadSubtitles"]
|
|
1265
|
-
}]
|
|
1266
|
-
}
|
|
1267
|
-
});
|
|
1268
|
-
var PlayerOverlaysComponent = class PlayerOverlaysComponent {
|
|
1269
|
-
error = input(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
|
|
1270
|
-
debug = input(false, ...ngDevMode ? [{ debugName: "debug" }] : /* istanbul ignore next */ []);
|
|
1271
|
-
debugJson = input("{}", ...ngDevMode ? [{ debugName: "debugJson" }] : /* istanbul ignore next */ []);
|
|
1272
|
-
retry = output();
|
|
1273
|
-
requestPlay = output();
|
|
1274
|
-
copyJson = output();
|
|
1275
|
-
downloadJson = output();
|
|
1276
|
-
code = computed(() => this.error()?.code ?? "UNKNOWN", ...ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []);
|
|
1277
|
-
autoplayBlocked = computed(() => this.code() === "AUTOPLAY_BLOCKED", ...ngDevMode ? [{ debugName: "autoplayBlocked" }] : /* istanbul ignore next */ []);
|
|
1278
|
-
title = computed(() => {
|
|
1279
|
-
switch (this.code()) {
|
|
1280
|
-
case "ENGINE_MISSING": return "Playback engine missing";
|
|
1281
|
-
case "AUTOPLAY_BLOCKED": return "Click to start playback";
|
|
1282
|
-
case "NETWORK_HTTP": return "Network error";
|
|
1283
|
-
case "DECODE_ERROR": return "Decode error";
|
|
1284
|
-
case "SRC_NOT_SUPPORTED": return "Format not supported";
|
|
1285
|
-
default: return "Playback error";
|
|
1286
|
-
}
|
|
1287
|
-
}, ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
1288
|
-
hint = computed(() => {
|
|
1289
|
-
switch (this.code()) {
|
|
1290
|
-
case "ENGINE_MISSING": return "This source requires an additional engine. Install @ngxsp/engine-shaka and pass it via [engines].";
|
|
1291
|
-
case "AUTOPLAY_BLOCKED": return "Your browser blocked autoplay. Press Play to start.";
|
|
1292
|
-
case "NETWORK_HTTP": return "Check your connection or try again.";
|
|
1293
|
-
default: return this.error()?.message ? String(this.error().message) : "Unknown error";
|
|
1294
|
-
}
|
|
1295
|
-
}, ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
|
|
1296
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1297
|
-
minVersion: "12.0.0",
|
|
1298
|
-
version: "22.2.2",
|
|
1299
|
-
ngImport: i0,
|
|
1300
|
-
type: PlayerOverlaysComponent,
|
|
1301
|
-
deps: [],
|
|
1302
|
-
target: i0.ɵɵFactoryTarget.Component
|
|
1303
|
-
});
|
|
1304
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1305
|
-
minVersion: "17.0.0",
|
|
1306
|
-
version: "22.2.2",
|
|
1307
|
-
type: PlayerOverlaysComponent,
|
|
1308
|
-
isStandalone: true,
|
|
1309
|
-
selector: "ngxsp-player-overlays",
|
|
1310
|
-
inputs: {
|
|
1311
|
-
error: {
|
|
1312
|
-
classPropertyName: "error",
|
|
1313
|
-
publicName: "error",
|
|
1314
|
-
isSignal: true,
|
|
1315
|
-
isRequired: false,
|
|
1316
|
-
transformFunction: null
|
|
1317
|
-
},
|
|
1318
|
-
debug: {
|
|
1319
|
-
classPropertyName: "debug",
|
|
1320
|
-
publicName: "debug",
|
|
1321
|
-
isSignal: true,
|
|
1322
|
-
isRequired: false,
|
|
1323
|
-
transformFunction: null
|
|
1324
|
-
},
|
|
1325
|
-
debugJson: {
|
|
1326
|
-
classPropertyName: "debugJson",
|
|
1327
|
-
publicName: "debugJson",
|
|
1328
|
-
isSignal: true,
|
|
1329
|
-
isRequired: false,
|
|
1330
|
-
transformFunction: null
|
|
1331
|
-
}
|
|
1332
|
-
},
|
|
1333
|
-
outputs: {
|
|
1334
|
-
retry: "retry",
|
|
1335
|
-
requestPlay: "requestPlay",
|
|
1336
|
-
copyJson: "copyJson",
|
|
1337
|
-
downloadJson: "downloadJson"
|
|
1338
|
-
},
|
|
1339
|
-
ngImport: i0,
|
|
1340
|
-
template: `
|
|
1341
|
-
@if (error()) {
|
|
1342
|
-
<div class="ngxsp-overlay" role="alert">
|
|
1343
|
-
<div class="ngxsp-overlay-card">
|
|
1344
|
-
<span class="ngxsp-overlay-icon" aria-hidden="true">!</span>
|
|
1345
|
-
<div class="ngxsp-overlay-title">{{ title() }}</div>
|
|
1346
|
-
<div class="ngxsp-overlay-msg">{{ hint() }}</div>
|
|
1347
|
-
<div class="ngxsp-overlay-actions">
|
|
1348
|
-
<button type="button" class="ngxsp-btn" (click)="retry.emit()">Retry</button>
|
|
1349
|
-
@if (autoplayBlocked()) {
|
|
1350
|
-
<button type="button" class="ngxsp-btn primary" (click)="requestPlay.emit()">Play</button>
|
|
1351
|
-
}
|
|
1352
|
-
</div>
|
|
1353
|
-
</div>
|
|
1354
|
-
</div>
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
@if (debug()) {
|
|
1358
|
-
<details class="ngxsp-debug">
|
|
1359
|
-
<summary>Debug</summary>
|
|
1360
|
-
<div class="ngxsp-debug-actions">
|
|
1361
|
-
<button type="button" class="ngxsp-btn" (click)="copyJson.emit()">Copy JSON</button>
|
|
1362
|
-
<button type="button" class="ngxsp-btn" (click)="downloadJson.emit()">Download</button>
|
|
1363
|
-
</div>
|
|
1364
|
-
<pre>{{ debugJson() }}</pre>
|
|
1365
|
-
</details>
|
|
1366
|
-
}
|
|
1367
|
-
`,
|
|
1368
|
-
isInline: true,
|
|
1369
|
-
styles: [":host{display:contents}.ngxsp-btn{height:32px;padding:0 14px;border:1px solid rgb(255 255 255 / .16);border-radius:6px;background:#ffffff0f;color:#fff;font:inherit;font-size:13px;font-weight:500;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px}.ngxsp-btn:hover{background:#ffffff1f}.ngxsp-btn.primary{border-color:transparent;background:var(--nsp-accent-strong, #5d63ee)}.ngxsp-btn:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:2px}.ngxsp-overlay{position:absolute;inset:0;z-index:5;display:grid;place-items:center;padding:24px;background:#000000c7;text-align:center}.ngxsp-overlay-card{display:grid;justify-items:center;gap:8px;max-width:440px}.ngxsp-overlay-icon{width:40px;height:40px;display:grid;place-items:center;margin-bottom:4px;border-radius:999px;background:#f25f5c29;color:var(--nsp-danger, #f25f5c);font-size:18px;font-weight:700}.ngxsp-overlay-title{font-size:16px;font-weight:600;color:#fff}.ngxsp-overlay-msg{color:#ffffffb3;font-size:13px;line-height:1.5}.ngxsp-overlay-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin-top:8px}.ngxsp-debug{position:absolute;top:12px;right:12px;z-index:6;margin:0;max-width:min(420px,calc(100% - 24px));opacity:0;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease;color:#fff}:host-context(.ngxsp-ui-visible) .ngxsp-debug,.ngxsp-debug[open]{opacity:1;transform:translateY(0)}.ngxsp-debug summary{cursor:pointer;list-style:none;width:max-content;margin-left:auto;padding:4px 10px;border-radius:999px;background:#0009;color:#fffc;font-size:12px}.ngxsp-debug[open]{padding:12px;max-height:calc(100% - 24px);overflow:auto;border-radius:10px;background:#121317f5;box-shadow:0 12px 32px #00000073,0 0 0 1px #ffffff14}.ngxsp-debug-actions{display:flex;gap:8px;margin:8px 0;flex-wrap:wrap}.ngxsp-debug pre{margin:0;white-space:pre-wrap;word-break:break-word;font-family:var(--nsp-font-mono, ui-monospace, Menlo, monospace);font-size:11px}\n"],
|
|
1370
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1371
|
-
});
|
|
1372
|
-
};
|
|
1373
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1374
|
-
minVersion: "12.0.0",
|
|
1375
|
-
version: "22.2.2",
|
|
1376
|
-
ngImport: i0,
|
|
1377
|
-
type: PlayerOverlaysComponent,
|
|
1378
|
-
decorators: [{
|
|
1379
|
-
type: Component,
|
|
1380
|
-
args: [{
|
|
1381
|
-
selector: "ngxsp-player-overlays",
|
|
1382
|
-
standalone: true,
|
|
1383
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1384
|
-
template: `
|
|
1385
|
-
@if (error()) {
|
|
1386
|
-
<div class="ngxsp-overlay" role="alert">
|
|
1387
|
-
<div class="ngxsp-overlay-card">
|
|
1388
|
-
<span class="ngxsp-overlay-icon" aria-hidden="true">!</span>
|
|
1389
|
-
<div class="ngxsp-overlay-title">{{ title() }}</div>
|
|
1390
|
-
<div class="ngxsp-overlay-msg">{{ hint() }}</div>
|
|
1391
|
-
<div class="ngxsp-overlay-actions">
|
|
1392
|
-
<button type="button" class="ngxsp-btn" (click)="retry.emit()">Retry</button>
|
|
1393
|
-
@if (autoplayBlocked()) {
|
|
1394
|
-
<button type="button" class="ngxsp-btn primary" (click)="requestPlay.emit()">Play</button>
|
|
1395
|
-
}
|
|
1396
|
-
</div>
|
|
1397
|
-
</div>
|
|
1398
|
-
</div>
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
@if (debug()) {
|
|
1402
|
-
<details class="ngxsp-debug">
|
|
1403
|
-
<summary>Debug</summary>
|
|
1404
|
-
<div class="ngxsp-debug-actions">
|
|
1405
|
-
<button type="button" class="ngxsp-btn" (click)="copyJson.emit()">Copy JSON</button>
|
|
1406
|
-
<button type="button" class="ngxsp-btn" (click)="downloadJson.emit()">Download</button>
|
|
1681
|
+
@if (openMenu() === 'captions') {
|
|
1682
|
+
<div class="ngxsp-menu ngxsp-menuCompact ngxsp-menuCaptions">
|
|
1683
|
+
<div class="ngxsp-menuSection">
|
|
1684
|
+
<div class="ngxsp-menuTitle">{{ labels().subtitles }}</div>
|
|
1685
|
+
<div class="ngxsp-menuCurrent">{{ labels().current }} <strong>{{ currentTextLabel() }}</strong></div>
|
|
1686
|
+
<div class="ngxsp-menuScroll" role="group" [attr.aria-label]="labels().subtitles">
|
|
1687
|
+
<button type="button" class="ngxsp-menuItem" [class.active]="selectedTextTrackId() === null" [attr.aria-pressed]="selectedTextTrackId() === null" (click)="selectText.emit(null)">{{ labels().off }}</button>
|
|
1688
|
+
@for (track of textTracks(); track track.id) {
|
|
1689
|
+
<button type="button" class="ngxsp-menuItem" [class.active]="selectedTextTrackId() === track.id" [attr.aria-pressed]="selectedTextTrackId() === track.id" (click)="selectText.emit(track.id)">
|
|
1690
|
+
<span class="ngxsp-menuItemLabel">{{ trackLabel(track) }}</span>
|
|
1691
|
+
@if (track.language && track.label) { <small>{{ languageName(track.language) }}</small> }
|
|
1692
|
+
</button>
|
|
1693
|
+
}
|
|
1694
|
+
</div>
|
|
1695
|
+
@if (!textTracks().length) { <div class="ngxsp-menuHint">{{ labels().noSubtitles }}</div> }
|
|
1696
|
+
<button type="button" class="ngxsp-menuItem ngxsp-menuAction" (click)="loadSubtitles.emit()">{{ labels().loadSubtitles }}</button>
|
|
1407
1697
|
</div>
|
|
1408
|
-
|
|
1409
|
-
</details>
|
|
1698
|
+
</div>
|
|
1410
1699
|
}
|
|
1411
1700
|
`,
|
|
1412
|
-
styles: [":host{display:
|
|
1701
|
+
styles: [":host{display:block}.ngxsp-menu{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:6px 0 4px;padding:12px;border-radius:10px;background:#121317eb;box-shadow:0 12px 32px #00000073,0 0 0 1px #ffffff14;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.ngxsp-menuCompact{grid-template-columns:minmax(160px,220px);justify-self:end}.ngxsp-menuSection{display:flex;flex-direction:column;gap:2px}.ngxsp-menuTitle{padding:0 8px 6px;font-size:12px;font-weight:600;color:#fff9}.ngxsp-menuItem{height:32px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#ffffffe6;text-align:left;cursor:pointer;font:inherit;font-size:13px}.ngxsp-menuItem:hover{background:#ffffff1a}.ngxsp-menuItem.active{background:#8b90ff2e;color:var(--nsp-media-accent, #8b90ff);font-weight:500}.ngxsp-menuItem:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:-2px}.ngxsp-menuHint{font-size:12px;color:#fff9;padding:6px 8px}.ngxsp-menuCaptions{grid-template-columns:minmax(200px,280px)}.ngxsp-menuCurrent{padding:0 8px 8px;font-size:12px;color:#fff9;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngxsp-menuCurrent strong{color:#ffffffeb;font-weight:600}.ngxsp-menuScroll{display:flex;flex-direction:column;gap:2px;max-height:min(36vh,232px);overflow:auto;overscroll-behavior:contain}.ngxsp-menuItem{display:flex;align-items:center;gap:8px;flex:none}.ngxsp-menuItemLabel{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngxsp-menuItem small{flex:none;font-size:11px;color:#ffffff8c}.ngxsp-menuAction{margin-top:6px;border-top:1px solid rgb(255 255 255 / .1);border-radius:0 0 6px 6px;color:var(--nsp-media-accent, #8b90ff)}@media(max-width:860px){.ngxsp-menu{grid-template-columns:1fr}}\n"]
|
|
1413
1702
|
}]
|
|
1414
1703
|
}],
|
|
1415
1704
|
propDecorators: {
|
|
1416
|
-
|
|
1705
|
+
openMenu: [{
|
|
1417
1706
|
type: i0.Input,
|
|
1418
1707
|
args: [{
|
|
1419
1708
|
isSignal: true,
|
|
1420
|
-
alias: "
|
|
1709
|
+
alias: "openMenu",
|
|
1421
1710
|
required: false
|
|
1422
1711
|
}]
|
|
1423
1712
|
}],
|
|
1424
|
-
|
|
1713
|
+
isAudioMode: [{
|
|
1425
1714
|
type: i0.Input,
|
|
1426
1715
|
args: [{
|
|
1427
1716
|
isSignal: true,
|
|
1428
|
-
alias: "
|
|
1717
|
+
alias: "isAudioMode",
|
|
1429
1718
|
required: false
|
|
1430
1719
|
}]
|
|
1431
1720
|
}],
|
|
1432
|
-
|
|
1721
|
+
textTracks: [{
|
|
1433
1722
|
type: i0.Input,
|
|
1434
1723
|
args: [{
|
|
1435
1724
|
isSignal: true,
|
|
1436
|
-
alias: "
|
|
1725
|
+
alias: "textTracks",
|
|
1437
1726
|
required: false
|
|
1438
1727
|
}]
|
|
1439
1728
|
}],
|
|
1440
|
-
|
|
1729
|
+
audioTracks: [{
|
|
1730
|
+
type: i0.Input,
|
|
1731
|
+
args: [{
|
|
1732
|
+
isSignal: true,
|
|
1733
|
+
alias: "audioTracks",
|
|
1734
|
+
required: false
|
|
1735
|
+
}]
|
|
1736
|
+
}],
|
|
1737
|
+
videoTracks: [{
|
|
1738
|
+
type: i0.Input,
|
|
1739
|
+
args: [{
|
|
1740
|
+
isSignal: true,
|
|
1741
|
+
alias: "videoTracks",
|
|
1742
|
+
required: false
|
|
1743
|
+
}]
|
|
1744
|
+
}],
|
|
1745
|
+
selectedTextTrackId: [{
|
|
1746
|
+
type: i0.Input,
|
|
1747
|
+
args: [{
|
|
1748
|
+
isSignal: true,
|
|
1749
|
+
alias: "selectedTextTrackId",
|
|
1750
|
+
required: false
|
|
1751
|
+
}]
|
|
1752
|
+
}],
|
|
1753
|
+
selectedAudioTrackId: [{
|
|
1754
|
+
type: i0.Input,
|
|
1755
|
+
args: [{
|
|
1756
|
+
isSignal: true,
|
|
1757
|
+
alias: "selectedAudioTrackId",
|
|
1758
|
+
required: false
|
|
1759
|
+
}]
|
|
1760
|
+
}],
|
|
1761
|
+
selectedVideoTrackId: [{
|
|
1762
|
+
type: i0.Input,
|
|
1763
|
+
args: [{
|
|
1764
|
+
isSignal: true,
|
|
1765
|
+
alias: "selectedVideoTrackId",
|
|
1766
|
+
required: false
|
|
1767
|
+
}]
|
|
1768
|
+
}],
|
|
1769
|
+
playbackRates: [{
|
|
1770
|
+
type: i0.Input,
|
|
1771
|
+
args: [{
|
|
1772
|
+
isSignal: true,
|
|
1773
|
+
alias: "playbackRates",
|
|
1774
|
+
required: false
|
|
1775
|
+
}]
|
|
1776
|
+
}],
|
|
1777
|
+
playbackRate: [{
|
|
1778
|
+
type: i0.Input,
|
|
1779
|
+
args: [{
|
|
1780
|
+
isSignal: true,
|
|
1781
|
+
alias: "playbackRate",
|
|
1782
|
+
required: false
|
|
1783
|
+
}]
|
|
1784
|
+
}],
|
|
1785
|
+
labels: [{
|
|
1786
|
+
type: i0.Input,
|
|
1787
|
+
args: [{
|
|
1788
|
+
isSignal: true,
|
|
1789
|
+
alias: "labels",
|
|
1790
|
+
required: false
|
|
1791
|
+
}]
|
|
1792
|
+
}],
|
|
1793
|
+
selectText: [{
|
|
1441
1794
|
type: i0.Output,
|
|
1442
|
-
args: ["
|
|
1795
|
+
args: ["selectText"]
|
|
1443
1796
|
}],
|
|
1444
|
-
|
|
1797
|
+
selectAudio: [{
|
|
1445
1798
|
type: i0.Output,
|
|
1446
|
-
args: ["
|
|
1799
|
+
args: ["selectAudio"]
|
|
1447
1800
|
}],
|
|
1448
|
-
|
|
1801
|
+
selectVideo: [{
|
|
1449
1802
|
type: i0.Output,
|
|
1450
|
-
args: ["
|
|
1803
|
+
args: ["selectVideo"]
|
|
1451
1804
|
}],
|
|
1452
|
-
|
|
1805
|
+
selectRate: [{
|
|
1453
1806
|
type: i0.Output,
|
|
1454
|
-
args: ["
|
|
1807
|
+
args: ["selectRate"]
|
|
1808
|
+
}],
|
|
1809
|
+
loadSubtitles: [{
|
|
1810
|
+
type: i0.Output,
|
|
1811
|
+
args: ["loadSubtitles"]
|
|
1455
1812
|
}]
|
|
1456
1813
|
}
|
|
1457
1814
|
});
|
|
@@ -1502,16 +1859,11 @@ var PlayerControlsComponent = class PlayerControlsComponent {
|
|
|
1502
1859
|
scrub = output();
|
|
1503
1860
|
volumeChange = output();
|
|
1504
1861
|
fmtTime(sec) {
|
|
1505
|
-
|
|
1506
|
-
const h = Math.floor(s / 3600);
|
|
1507
|
-
const m = Math.floor(s % 3600 / 60);
|
|
1508
|
-
const r = s % 60;
|
|
1509
|
-
if (h > 0) return `${h}:${String(m).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
|
|
1510
|
-
return `${m}:${String(r).padStart(2, "0")}`;
|
|
1862
|
+
return formatTime(sec);
|
|
1511
1863
|
}
|
|
1512
1864
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1513
1865
|
minVersion: "12.0.0",
|
|
1514
|
-
version: "22.
|
|
1866
|
+
version: "22.3.0",
|
|
1515
1867
|
ngImport: i0,
|
|
1516
1868
|
type: PlayerControlsComponent,
|
|
1517
1869
|
deps: [],
|
|
@@ -1519,7 +1871,7 @@ var PlayerControlsComponent = class PlayerControlsComponent {
|
|
|
1519
1871
|
});
|
|
1520
1872
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1521
1873
|
minVersion: "17.0.0",
|
|
1522
|
-
version: "22.
|
|
1874
|
+
version: "22.3.0",
|
|
1523
1875
|
type: PlayerControlsComponent,
|
|
1524
1876
|
isStandalone: true,
|
|
1525
1877
|
selector: "ngxsp-player-controls",
|
|
@@ -1910,7 +2262,7 @@ var PlayerControlsComponent = class PlayerControlsComponent {
|
|
|
1910
2262
|
};
|
|
1911
2263
|
i0.ɵɵngDeclareClassMetadata({
|
|
1912
2264
|
minVersion: "12.0.0",
|
|
1913
|
-
version: "22.
|
|
2265
|
+
version: "22.3.0",
|
|
1914
2266
|
ngImport: i0,
|
|
1915
2267
|
type: PlayerControlsComponent,
|
|
1916
2268
|
decorators: [{
|
|
@@ -2323,6 +2675,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2323
2675
|
}]
|
|
2324
2676
|
}
|
|
2325
2677
|
});
|
|
2678
|
+
const DEFAULT_CAST_LABELS = {
|
|
2679
|
+
play: "Play on device",
|
|
2680
|
+
playing: "Playing on remote device",
|
|
2681
|
+
connecting: "Connecting to remote device",
|
|
2682
|
+
playHint: "Choose a device on your local network.",
|
|
2683
|
+
playingHint: "This media is currently playing on a nearby device.",
|
|
2684
|
+
connectingHint: "Trying to connect to a nearby playback device.",
|
|
2685
|
+
unavailableHint: "Available when your platform supports remote playback on the same network."
|
|
2686
|
+
};
|
|
2326
2687
|
var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
2327
2688
|
playing = input(false, ...ngDevMode ? [{ debugName: "playing" }] : /* istanbul ignore next */ []);
|
|
2328
2689
|
isAudioMode = input(false, ...ngDevMode ? [{ debugName: "isAudioMode" }] : /* istanbul ignore next */ []);
|
|
@@ -2333,6 +2694,7 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2333
2694
|
statusLabel = input("Ready", ...ngDevMode ? [{ debugName: "statusLabel" }] : /* istanbul ignore next */ []);
|
|
2334
2695
|
keyboardHint = input("", ...ngDevMode ? [{ debugName: "keyboardHint" }] : /* istanbul ignore next */ []);
|
|
2335
2696
|
hasPlaylistControls = input(false, ...ngDevMode ? [{ debugName: "hasPlaylistControls" }] : /* istanbul ignore next */ []);
|
|
2697
|
+
showPlaylistModes = input(true, ...ngDevMode ? [{ debugName: "showPlaylistModes" }] : /* istanbul ignore next */ []);
|
|
2336
2698
|
canPrev = input(false, ...ngDevMode ? [{ debugName: "canPrev" }] : /* istanbul ignore next */ []);
|
|
2337
2699
|
canNext = input(false, ...ngDevMode ? [{ debugName: "canNext" }] : /* istanbul ignore next */ []);
|
|
2338
2700
|
previousLabel = input("Previous item", ...ngDevMode ? [{ debugName: "previousLabel" }] : /* istanbul ignore next */ []);
|
|
@@ -2347,10 +2709,14 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2347
2709
|
tracksLabel = input("Tracks", ...ngDevMode ? [{ debugName: "tracksLabel" }] : /* istanbul ignore next */ []);
|
|
2348
2710
|
captionsLabel = input("Load subtitles", ...ngDevMode ? [{ debugName: "captionsLabel" }] : /* istanbul ignore next */ []);
|
|
2349
2711
|
speedLabel = input("1x", ...ngDevMode ? [{ debugName: "speedLabel" }] : /* istanbul ignore next */ []);
|
|
2712
|
+
speedActionLabel = input("Playback speed", ...ngDevMode ? [{ debugName: "speedActionLabel" }] : /* istanbul ignore next */ []);
|
|
2350
2713
|
speedBadge = computed(() => this.speedLabel().replace(/x$/i, "×"), ...ngDevMode ? [{ debugName: "speedBadge" }] : /* istanbul ignore next */ []);
|
|
2714
|
+
speedTitle = computed(() => `${this.speedActionLabel()} ${this.speedLabel()}`, ...ngDevMode ? [{ debugName: "speedTitle" }] : /* istanbul ignore next */ []);
|
|
2351
2715
|
volumeLabel = input("Volume", ...ngDevMode ? [{ debugName: "volumeLabel" }] : /* istanbul ignore next */ []);
|
|
2352
2716
|
muteLabel = input("Mute", ...ngDevMode ? [{ debugName: "muteLabel" }] : /* istanbul ignore next */ []);
|
|
2353
2717
|
unmuteLabel = input("Restore sound", ...ngDevMode ? [{ debugName: "unmuteLabel" }] : /* istanbul ignore next */ []);
|
|
2718
|
+
showTracks = input(true, ...ngDevMode ? [{ debugName: "showTracks" }] : /* istanbul ignore next */ []);
|
|
2719
|
+
showCaptions = input(true, ...ngDevMode ? [{ debugName: "showCaptions" }] : /* istanbul ignore next */ []);
|
|
2354
2720
|
showAirPlay = input(false, ...ngDevMode ? [{ debugName: "showAirPlay" }] : /* istanbul ignore next */ []);
|
|
2355
2721
|
airPlayActive = input(false, ...ngDevMode ? [{ debugName: "airPlayActive" }] : /* istanbul ignore next */ []);
|
|
2356
2722
|
airPlayLabel = input("AirPlay", ...ngDevMode ? [{ debugName: "airPlayLabel" }] : /* istanbul ignore next */ []);
|
|
@@ -2385,17 +2751,16 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2385
2751
|
mute = output();
|
|
2386
2752
|
scrub = output();
|
|
2387
2753
|
volumeChange = output();
|
|
2754
|
+
fmtRemaining(current, total) {
|
|
2755
|
+
if (!(total > 0)) return "";
|
|
2756
|
+
return `-${this.fmtTime(Math.max(0, total - (current || 0)))}`;
|
|
2757
|
+
}
|
|
2388
2758
|
fmtTime(sec) {
|
|
2389
|
-
|
|
2390
|
-
const h = Math.floor(s / 3600);
|
|
2391
|
-
const m = Math.floor(s % 3600 / 60);
|
|
2392
|
-
const r = s % 60;
|
|
2393
|
-
if (h > 0) return `${h}:${String(m).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
|
|
2394
|
-
return `${m}:${String(r).padStart(2, "0")}`;
|
|
2759
|
+
return formatTime(sec);
|
|
2395
2760
|
}
|
|
2396
2761
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2397
2762
|
minVersion: "12.0.0",
|
|
2398
|
-
version: "22.
|
|
2763
|
+
version: "22.3.0",
|
|
2399
2764
|
ngImport: i0,
|
|
2400
2765
|
type: PlayerControlsVodComponent,
|
|
2401
2766
|
deps: [],
|
|
@@ -2403,7 +2768,7 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2403
2768
|
});
|
|
2404
2769
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2405
2770
|
minVersion: "17.0.0",
|
|
2406
|
-
version: "22.
|
|
2771
|
+
version: "22.3.0",
|
|
2407
2772
|
type: PlayerControlsVodComponent,
|
|
2408
2773
|
isStandalone: true,
|
|
2409
2774
|
selector: "ngxsp-player-controls-vod",
|
|
@@ -2471,6 +2836,13 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2471
2836
|
isRequired: false,
|
|
2472
2837
|
transformFunction: null
|
|
2473
2838
|
},
|
|
2839
|
+
showPlaylistModes: {
|
|
2840
|
+
classPropertyName: "showPlaylistModes",
|
|
2841
|
+
publicName: "showPlaylistModes",
|
|
2842
|
+
isSignal: true,
|
|
2843
|
+
isRequired: false,
|
|
2844
|
+
transformFunction: null
|
|
2845
|
+
},
|
|
2474
2846
|
canPrev: {
|
|
2475
2847
|
classPropertyName: "canPrev",
|
|
2476
2848
|
publicName: "canPrev",
|
|
@@ -2569,6 +2941,13 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2569
2941
|
isRequired: false,
|
|
2570
2942
|
transformFunction: null
|
|
2571
2943
|
},
|
|
2944
|
+
speedActionLabel: {
|
|
2945
|
+
classPropertyName: "speedActionLabel",
|
|
2946
|
+
publicName: "speedActionLabel",
|
|
2947
|
+
isSignal: true,
|
|
2948
|
+
isRequired: false,
|
|
2949
|
+
transformFunction: null
|
|
2950
|
+
},
|
|
2572
2951
|
volumeLabel: {
|
|
2573
2952
|
classPropertyName: "volumeLabel",
|
|
2574
2953
|
publicName: "volumeLabel",
|
|
@@ -2590,6 +2969,20 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2590
2969
|
isRequired: false,
|
|
2591
2970
|
transformFunction: null
|
|
2592
2971
|
},
|
|
2972
|
+
showTracks: {
|
|
2973
|
+
classPropertyName: "showTracks",
|
|
2974
|
+
publicName: "showTracks",
|
|
2975
|
+
isSignal: true,
|
|
2976
|
+
isRequired: false,
|
|
2977
|
+
transformFunction: null
|
|
2978
|
+
},
|
|
2979
|
+
showCaptions: {
|
|
2980
|
+
classPropertyName: "showCaptions",
|
|
2981
|
+
publicName: "showCaptions",
|
|
2982
|
+
isSignal: true,
|
|
2983
|
+
isRequired: false,
|
|
2984
|
+
transformFunction: null
|
|
2985
|
+
},
|
|
2593
2986
|
showAirPlay: {
|
|
2594
2987
|
classPropertyName: "showAirPlay",
|
|
2595
2988
|
publicName: "showAirPlay",
|
|
@@ -2800,7 +3193,11 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2800
3193
|
<ngxsp-smart-icon class="ngxsp-icon" name="next" />
|
|
2801
3194
|
</button>
|
|
2802
3195
|
}
|
|
3196
|
+
<!-- Where it is, and how long it runs. A window too narrow for both says the one a
|
|
3197
|
+
viewer asks for at that size — how much is left — which is what the mini window's
|
|
3198
|
+
board draws in its place. -->
|
|
2803
3199
|
<div class="ngxsp-vod-time">{{ fmtTime(currentTime()) }} / {{ fmtTime(duration()) }}</div>
|
|
3200
|
+
<div class="ngxsp-vod-remaining">{{ fmtRemaining(currentTime(), duration()) }}</div>
|
|
2804
3201
|
<div class="ngxsp-vod-volumeGroup">
|
|
2805
3202
|
<ngxsp-volume-control
|
|
2806
3203
|
class="ngxsp-vod-volumeControl"
|
|
@@ -2815,7 +3212,7 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2815
3212
|
</div>
|
|
2816
3213
|
<ng-content select="[ngxsp-player-inline-controls]" />
|
|
2817
3214
|
<div class="ngxsp-vod-spacer"></div>
|
|
2818
|
-
@if (hasPlaylistControls()) {
|
|
3215
|
+
@if (hasPlaylistControls() && showPlaylistModes()) {
|
|
2819
3216
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-playlist" [class.accent]="shuffleActive()" (click)="toggleShuffle.emit()" [attr.title]="shuffleLabel()" [attr.aria-label]="shuffleLabel()">
|
|
2820
3217
|
<ngxsp-smart-icon class="ngxsp-icon" name="shuffle" />
|
|
2821
3218
|
</button>
|
|
@@ -2827,9 +3224,12 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2827
3224
|
}
|
|
2828
3225
|
</button>
|
|
2829
3226
|
}
|
|
3227
|
+
@if (showTracks()) {
|
|
2830
3228
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-tracks" (click)="openMenu.emit('tracks')" [attr.title]="tracksLabel()" [attr.aria-label]="tracksLabel()">
|
|
2831
3229
|
<ngxsp-smart-icon class="ngxsp-icon" name="tracks" />
|
|
2832
3230
|
</button>
|
|
3231
|
+
}
|
|
3232
|
+
@if (showCaptions()) {
|
|
2833
3233
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-captions" (click)="captions.emit()" [attr.title]="captionsLabel()" [attr.aria-label]="captionsLabel()">
|
|
2834
3234
|
@if (captionsActive()) {
|
|
2835
3235
|
<ngxsp-smart-icon class="ngxsp-icon" name="captions" />
|
|
@@ -2837,20 +3237,35 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2837
3237
|
<ngxsp-smart-icon class="ngxsp-icon" name="captions-off" />
|
|
2838
3238
|
}
|
|
2839
3239
|
</button>
|
|
2840
|
-
|
|
2841
|
-
|
|
3240
|
+
}
|
|
3241
|
+
<!--
|
|
3242
|
+
The rate itself, as a pill: what it is shows at a glance. Its name says what pressing it
|
|
3243
|
+
does as well — read out, "1x, button" told nobody that this is where the speed is chosen,
|
|
3244
|
+
while every other chip on this bar names its own job.
|
|
3245
|
+
-->
|
|
3246
|
+
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-speed" (click)="openMenu.emit('speed')" [attr.title]="speedTitle()" [attr.aria-label]="speedTitle()">
|
|
2842
3247
|
<span class="ngxsp-vod-speedBadge">{{ speedBadge() }}</span>
|
|
2843
3248
|
</button>
|
|
3249
|
+
<!--
|
|
3250
|
+
The host's own buttons that belong on this side rather than beside the picture controls:
|
|
3251
|
+
where the picture goes, and what follows it. Its others arrive before the spacer, above.
|
|
3252
|
+
-->
|
|
3253
|
+
<ng-content select="[ngxsp-player-inline-trailing]" />
|
|
2844
3254
|
@if (showAirPlay()) {
|
|
2845
3255
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-airplay" [class.accent]="airPlayActive()" (click)="airPlay.emit()" [attr.title]="airPlayLabel()" [attr.aria-label]="airPlayLabel()">
|
|
2846
3256
|
<ngxsp-smart-icon class="ngxsp-icon" [name]="airPlayActive() ? 'airplay-active' : 'airplay'" />
|
|
2847
3257
|
</button>
|
|
2848
3258
|
}
|
|
2849
3259
|
@if (showCast()) {
|
|
2850
|
-
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-cast" [class.accent]="castActive()" (click)="cast.emit()" [attr.title]="castHint()" [attr.aria-label]="castLabel()">
|
|
3260
|
+
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-cast" [class.accent]="castActive()" (click)="cast.emit()" [attr.title]="castHint() || castLabel()" [attr.aria-label]="castLabel()">
|
|
2851
3261
|
<ngxsp-smart-icon class="ngxsp-icon" [name]="castActive() ? 'devices-active' : 'devices'" />
|
|
2852
3262
|
</button>
|
|
2853
3263
|
}
|
|
3264
|
+
@if (!isAudioMode()) {
|
|
3265
|
+
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-fullscreen" (click)="fullscreen.emit()" [attr.title]="fullscreenLabel()" [attr.aria-label]="fullscreenLabel()">
|
|
3266
|
+
<ngxsp-smart-icon class="ngxsp-icon" name="fullscreen" />
|
|
3267
|
+
</button>
|
|
3268
|
+
}
|
|
2854
3269
|
@if (!isAudioMode() && pipSupported()) {
|
|
2855
3270
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-pip" (click)="pip.emit()" [attr.title]="pipLabel()" [attr.aria-label]="pipLabel()">
|
|
2856
3271
|
@if (pipActive()) {
|
|
@@ -2860,11 +3275,6 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2860
3275
|
}
|
|
2861
3276
|
</button>
|
|
2862
3277
|
}
|
|
2863
|
-
@if (!isAudioMode()) {
|
|
2864
|
-
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-fullscreen" (click)="fullscreen.emit()" [attr.title]="fullscreenLabel()" [attr.aria-label]="fullscreenLabel()">
|
|
2865
|
-
<ngxsp-smart-icon class="ngxsp-icon" name="fullscreen" />
|
|
2866
|
-
</button>
|
|
2867
|
-
}
|
|
2868
3278
|
</div>
|
|
2869
3279
|
|
|
2870
3280
|
<ngxsp-time-slider
|
|
@@ -2882,7 +3292,7 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2882
3292
|
</div>
|
|
2883
3293
|
`,
|
|
2884
3294
|
isInline: true,
|
|
2885
|
-
styles: [":host{display:contents}.ngxsp-icon{width:20px;height:20px;display:block;flex:0 0 auto}.ngxsp-icon-lg{width:28px;height:28px}.ngxsp-vod-top{position:absolute;left:0;right:0;top:0;display:flex;align-items:flex-start;gap:12px;padding:16px 18px 40px;background:linear-gradient(to bottom,#0000009e,#0000);pointer-events:none;opacity:0;transition:opacity .2s ease;z-index:3}:host-context(.ngxsp-ui-visible) .ngxsp-vod-top{opacity:1}.ngxsp-vod-titleWrap{min-width:0;display:flex;flex-direction:column;gap:2px}.ngxsp-vod-eyebrow{font-size:12px;font-weight:600;color:#ffffffb8}.ngxsp-vod-title{font-weight:600;font-size:16px;color:#fff;text-shadow:0 1px 2px rgb(0 0 0 / .5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngxsp-vod-topHint{display:none}.ngxsp-vod-status{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:#00000073;color:#ffffffdb;font-size:11px;font-weight:500;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.ngxsp-vod-status:before{content:\"\";width:6px;height:6px;border-radius:50%;background:#ffffff80}.ngxsp-vod-status[data-state=playing]:before{background:var(--nsp-success, #3ecf8e)}.ngxsp-vod-spacer{flex:1}.ngxsp-vod-centerDock{position:absolute;inset:0;margin:auto;width:max-content;height:max-content;display:flex;align-items:center;gap:20px;z-index:4;opacity:0;visibility:hidden;transform:scale(.96);transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s;pointer-events:none}:host-context(.ngxsp-ui-visible) .ngxsp-vod-centerDock{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .2s ease,transform .2s ease,visibility 0s}:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-centerDock,:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-top{display:none}.ngxsp-vod-center{height:68px;width:68px;border-radius:999px;border:0;background:#fffffff0;color:#0d0e11;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 12px 40px #00000073;transition:transform .15s ease,background-color .15s ease}.ngxsp-vod-center:hover{transform:scale(1.05);background:#fff}.ngxsp-vod-side{position:relative;height:48px;min-width:48px;width:48px;border-radius:999px;border:0;background:#00000073;color:#fff;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:background-color .15s ease}.ngxsp-vod-side-wide{min-width:48px}.ngxsp-vod-side-wide .ngxsp-icon{width:24px;height:24px}.ngxsp-vod-side:hover{background:#000000a6}.ngxsp-vod-bottom{position:absolute;left:0;right:0;bottom:0;padding:40px 14px 8px;background:linear-gradient(180deg,#0000,#0000008c 45%,#000000d1);display:flex;flex-direction:column;align-items:stretch;gap:0;z-index:4;opacity:0;transition:opacity .2s ease}:host-context(.ngxsp-ui-visible) .ngxsp-vod-bottom{opacity:1}.ngxsp-vod-metaRow{display:flex;align-items:center;gap:4px;width:100%;min-height:40px}.ngxsp-vod-speedBadge{box-sizing:border-box;min-width:30px;padding:2px 5px;border:1.5px solid currentColor;border-radius:999px;font-size:11px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap}.ngxsp-vod-time{padding:0 8px;color:#ffffffeb;font-variant-numeric:tabular-nums;font-size:12px;font-weight:500;white-space:nowrap}.ngxsp-vod-range{order:-1;min-width:100%;min-height:32px;--ngxsp-track-size:4px;--ngxsp-track-bg:rgb(255 255 255 / .22);--ngxsp-buffered-bg:rgb(255 255 255 / .34);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-thumb-size:13px;--ngxsp-thumb-bg:#fff;--ngxsp-marker-width:2px;--ngxsp-marker-height:8px;--ngxsp-marker-bg:rgb(0 0 0 / .55);--ngxsp-marker-active-bg:#fff;--ngxsp-marker-active-shadow:none;--ngxsp-preview-bg:rgb(13 14 17 / .92);--ngxsp-preview-border:rgb(255 255 255 / .12);--ngxsp-preview-muted:rgb(255 255 255 / .64)}.ngxsp-vod-range:hover{--ngxsp-track-size:6px}.ngxsp-vod-volumeGroup{display:inline-flex;align-items:center}.ngxsp-vod-volumeControl{--ngxsp-control-size:36px;--ngxsp-volume-compact-min:72px;--ngxsp-volume-compact-max:104px;--ngxsp-volume-button-bg:transparent;--ngxsp-volume-button-border:0;--ngxsp-volume-button-radius:6px;--ngxsp-volume-accent:#fff;--ngxsp-volume-track-bg:rgb(255 255 255 / .28);--ngxsp-volume-thumb-bg:#fff;--ngxsp-volume-thumb-size:12px;--ngxsp-volume-thumb-shadow:none;--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);color:#fff}.ngxsp-vod-label{font-size:12px;color:#ffffffa3}.ngxsp-vod-chip{position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:0;border-radius:6px;background:transparent;color:#ffffffeb;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.ngxsp-vod-chip:hover:not(:disabled){background:#ffffff1f;color:#fff}.ngxsp-vod-chip:disabled{opacity:.4;cursor:default}.ngxsp-vod-chip.accent{color:var(--nsp-media-accent, #8b90ff)}.ngxsp-vod-chip-quiet{background:transparent}.ngxsp-vod-center:disabled,.ngxsp-vod-side:disabled{opacity:.38;cursor:not-allowed}.ngxsp-vod-center:focus-visible,.ngxsp-vod-side:focus-visible,.ngxsp-vod-chip:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:1px}.ngxsp-buffer{height:4px;border-radius:999px;background:#ffffff1f;overflow:hidden}.ngxsp-bufferFill{height:100%;border-radius:999px;background:var(--nsp-media-accent, #8b90ff)}@media(max-width:860px){.ngxsp-vod-top{padding:12px 14px 28px}.ngxsp-vod-centerDock{gap:14px}.ngxsp-vod-center{height:58px;width:58px}.ngxsp-vod-side{height:42px;width:42px;min-width:42px}.ngxsp-vod-bottom{padding:36px 8px 6px}.ngxsp-vod-chip-speed,.ngxsp-vod-chip-tracks{display:none}}@media(max-width:640px){.ngxsp-icon{width:18px;height:18px}.ngxsp-icon-lg{width:24px;height:24px}.ngxsp-vod-title{font-size:14px}.ngxsp-vod-status{display:none}.ngxsp-vod-time{font-size:11px;padding:0 4px}.ngxsp-vod-center{height:52px;width:52px}.ngxsp-vod-side{height:38px;width:38px;min-width:38px}.ngxsp-vod-metaRow{min-height:34px;gap:2px}.ngxsp-vod-chip{width:32px;height:32px;min-width:32px;min-height:32px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-shell{grid-template-columns:32px 64px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-range{opacity:1;visibility:visible;transform:none;pointer-events:auto}.ngxsp-vod-chip-playlist,.ngxsp-vod-chip-captions,.ngxsp-vod-chip-pip,.ngxsp-vod-top,.ngxsp-vod-side{display:none}}@media(prefers-reduced-motion:reduce){.ngxsp-vod-top,.ngxsp-vod-centerDock,.ngxsp-vod-bottom,.ngxsp-vod-center,.ngxsp-vod-side,.ngxsp-vod-chip{transition:none}}\n"],
|
|
3295
|
+
styles: [":host{display:contents}.ngxsp-icon{width:20px;height:20px;display:block;flex:0 0 auto}.ngxsp-icon-lg{width:28px;height:28px}.ngxsp-vod-top{position:absolute;left:0;right:0;top:0;display:flex;align-items:flex-start;gap:12px;padding:16px 18px 40px;background:linear-gradient(to bottom,#0000009e,#0000);pointer-events:none;opacity:0;transition:opacity .2s ease;z-index:3}:host-context(.ngxsp-ui-visible) .ngxsp-vod-top{opacity:1}.ngxsp-vod-titleWrap{min-width:0;display:flex;flex-direction:column;gap:2px}.ngxsp-vod-eyebrow{font-size:12px;font-weight:600;color:#ffffffb8}.ngxsp-vod-title{font-weight:600;font-size:16px;color:#fff;text-shadow:0 1px 2px rgb(0 0 0 / .5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngxsp-vod-topHint{display:none}.ngxsp-vod-status{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:#00000073;color:#ffffffdb;font-size:11px;font-weight:500;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.ngxsp-vod-status:before{content:\"\";width:6px;height:6px;border-radius:50%;background:#ffffff80}.ngxsp-vod-status[data-state=playing]:before{background:var(--nsp-success, #3ecf8e)}.ngxsp-vod-spacer{flex:1}.ngxsp-vod-centerDock{position:absolute;inset:0;margin:auto;width:max-content;height:max-content;display:flex;align-items:center;gap:20px;z-index:4;opacity:0;visibility:hidden;transform:scale(.96);transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s;pointer-events:none}:host-context(.ngxsp-ui-visible) .ngxsp-vod-centerDock{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .2s ease,transform .2s ease,visibility 0s}:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-centerDock,:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-top{display:none}.ngxsp-vod-center{height:68px;width:68px;border-radius:999px;border:0;background:#fffffff0;color:#0d0e11;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 12px 40px #00000073;transition:transform .15s ease,background-color .15s ease}.ngxsp-vod-center:hover{transform:scale(1.05);background:#fff}.ngxsp-vod-side{position:relative;height:48px;min-width:48px;width:48px;border-radius:999px;border:0;background:#00000073;color:#fff;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:background-color .15s ease}.ngxsp-vod-side-wide{min-width:48px}.ngxsp-vod-side-wide .ngxsp-icon{width:24px;height:24px}.ngxsp-vod-side:hover{background:#000000a6}.ngxsp-vod-bottom{position:absolute;left:0;right:0;bottom:0;padding:40px 14px 8px;background:linear-gradient(180deg,#0000,#0000008c 45%,#000000d1);display:flex;flex-direction:column;align-items:stretch;gap:0;z-index:4;opacity:0;transition:opacity .2s ease}:host-context(.ngxsp-ui-visible) .ngxsp-vod-bottom{opacity:1}.ngxsp-vod-metaRow{display:flex;align-items:center;gap:4px;width:100%;min-height:40px}.ngxsp-vod-speedBadge{box-sizing:border-box;min-width:30px;padding:2px 5px;border:1.5px solid currentColor;border-radius:999px;font-size:11px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap}.ngxsp-vod-time{padding:0 8px;color:#ffffffeb;font-variant-numeric:tabular-nums;font-size:12px;font-weight:500;white-space:nowrap}.ngxsp-vod-remaining{display:none;padding:0 6px;color:#ffffffc7;font-variant-numeric:tabular-nums;font-size:11px;font-weight:500;white-space:nowrap}.ngxsp-vod-range{order:-1;min-width:100%;min-height:32px;--ngxsp-track-size:4px;--ngxsp-track-bg:rgb(255 255 255 / .22);--ngxsp-buffered-bg:rgb(255 255 255 / .34);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-thumb-size:13px;--ngxsp-thumb-bg:#fff;--ngxsp-marker-width:2px;--ngxsp-marker-height:8px;--ngxsp-marker-bg:rgb(0 0 0 / .55);--ngxsp-marker-active-bg:#fff;--ngxsp-marker-active-shadow:none;--ngxsp-preview-bg:rgb(13 14 17 / .92);--ngxsp-preview-border:rgb(255 255 255 / .12);--ngxsp-preview-muted:rgb(255 255 255 / .64)}.ngxsp-vod-range:hover{--ngxsp-track-size:6px}.ngxsp-vod-volumeGroup{display:inline-flex;align-items:center}.ngxsp-vod-volumeControl{--ngxsp-control-size:36px;--ngxsp-volume-compact-min:72px;--ngxsp-volume-compact-max:104px;--ngxsp-volume-button-bg:transparent;--ngxsp-volume-button-border:0;--ngxsp-volume-button-radius:6px;--ngxsp-volume-accent:#fff;--ngxsp-volume-track-bg:rgb(255 255 255 / .28);--ngxsp-volume-thumb-bg:#fff;--ngxsp-volume-thumb-size:12px;--ngxsp-volume-thumb-shadow:none;--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);color:#fff}.ngxsp-vod-label{font-size:12px;color:#ffffffa3}.ngxsp-vod-chip{position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:0;border-radius:6px;background:transparent;color:#ffffffeb;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.ngxsp-vod-chip:hover:not(:disabled){background:#ffffff1f;color:#fff}.ngxsp-vod-chip:disabled{opacity:.4;cursor:default}.ngxsp-vod-chip.accent{color:var(--nsp-media-accent, #8b90ff)}.ngxsp-vod-chip-quiet{background:transparent}.ngxsp-vod-center:disabled,.ngxsp-vod-side:disabled{opacity:.38;cursor:not-allowed}.ngxsp-vod-center:focus-visible,.ngxsp-vod-side:focus-visible,.ngxsp-vod-chip:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:1px}.ngxsp-buffer{height:4px;border-radius:999px;background:#ffffff1f;overflow:hidden}.ngxsp-bufferFill{height:100%;border-radius:999px;background:var(--nsp-media-accent, #8b90ff)}@media(max-width:860px){.ngxsp-vod-top{padding:12px 14px 28px}.ngxsp-vod-centerDock{gap:14px}.ngxsp-vod-center{height:58px;width:58px}.ngxsp-vod-side{height:42px;width:42px;min-width:42px}.ngxsp-vod-bottom{padding:36px 8px 6px}.ngxsp-vod-chip-speed,.ngxsp-vod-chip-tracks{display:none}}@media(max-width:640px)and (max-height:320px){.ngxsp-vod-time{display:none}.ngxsp-vod-remaining{display:block}}@media(max-width:640px){.ngxsp-icon{width:18px;height:18px}.ngxsp-icon-lg{width:24px;height:24px}.ngxsp-vod-title{font-size:14px}.ngxsp-vod-status{display:none}.ngxsp-vod-time{font-size:11px;padding:0 4px}.ngxsp-vod-center{height:52px;width:52px}.ngxsp-vod-side{height:38px;width:38px;min-width:38px}.ngxsp-vod-metaRow{min-height:34px;gap:2px;flex-wrap:wrap;row-gap:4px}.ngxsp-vod-chip{width:32px;height:32px;min-width:32px;min-height:32px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-shell{grid-template-columns:32px 64px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-range{opacity:1;visibility:visible;transform:none;pointer-events:auto}.ngxsp-vod-chip-playlist,.ngxsp-vod-chip-captions,.ngxsp-vod-chip-pip,.ngxsp-vod-top,.ngxsp-vod-side{display:none}}@media(prefers-reduced-motion:reduce){.ngxsp-vod-top,.ngxsp-vod-centerDock,.ngxsp-vod-bottom,.ngxsp-vod-center,.ngxsp-vod-side,.ngxsp-vod-chip{transition:none}}\n"],
|
|
2886
3296
|
dependencies: [
|
|
2887
3297
|
{
|
|
2888
3298
|
kind: "component",
|
|
@@ -2944,7 +3354,7 @@ var PlayerControlsVodComponent = class PlayerControlsVodComponent {
|
|
|
2944
3354
|
};
|
|
2945
3355
|
i0.ɵɵngDeclareClassMetadata({
|
|
2946
3356
|
minVersion: "12.0.0",
|
|
2947
|
-
version: "22.
|
|
3357
|
+
version: "22.3.0",
|
|
2948
3358
|
ngImport: i0,
|
|
2949
3359
|
type: PlayerControlsVodComponent,
|
|
2950
3360
|
decorators: [{
|
|
@@ -3017,7 +3427,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3017
3427
|
<ngxsp-smart-icon class="ngxsp-icon" name="next" />
|
|
3018
3428
|
</button>
|
|
3019
3429
|
}
|
|
3430
|
+
<!-- Where it is, and how long it runs. A window too narrow for both says the one a
|
|
3431
|
+
viewer asks for at that size — how much is left — which is what the mini window's
|
|
3432
|
+
board draws in its place. -->
|
|
3020
3433
|
<div class="ngxsp-vod-time">{{ fmtTime(currentTime()) }} / {{ fmtTime(duration()) }}</div>
|
|
3434
|
+
<div class="ngxsp-vod-remaining">{{ fmtRemaining(currentTime(), duration()) }}</div>
|
|
3021
3435
|
<div class="ngxsp-vod-volumeGroup">
|
|
3022
3436
|
<ngxsp-volume-control
|
|
3023
3437
|
class="ngxsp-vod-volumeControl"
|
|
@@ -3032,7 +3446,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3032
3446
|
</div>
|
|
3033
3447
|
<ng-content select="[ngxsp-player-inline-controls]" />
|
|
3034
3448
|
<div class="ngxsp-vod-spacer"></div>
|
|
3035
|
-
@if (hasPlaylistControls()) {
|
|
3449
|
+
@if (hasPlaylistControls() && showPlaylistModes()) {
|
|
3036
3450
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-playlist" [class.accent]="shuffleActive()" (click)="toggleShuffle.emit()" [attr.title]="shuffleLabel()" [attr.aria-label]="shuffleLabel()">
|
|
3037
3451
|
<ngxsp-smart-icon class="ngxsp-icon" name="shuffle" />
|
|
3038
3452
|
</button>
|
|
@@ -3044,9 +3458,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3044
3458
|
}
|
|
3045
3459
|
</button>
|
|
3046
3460
|
}
|
|
3461
|
+
@if (showTracks()) {
|
|
3047
3462
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-tracks" (click)="openMenu.emit('tracks')" [attr.title]="tracksLabel()" [attr.aria-label]="tracksLabel()">
|
|
3048
3463
|
<ngxsp-smart-icon class="ngxsp-icon" name="tracks" />
|
|
3049
3464
|
</button>
|
|
3465
|
+
}
|
|
3466
|
+
@if (showCaptions()) {
|
|
3050
3467
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-captions" (click)="captions.emit()" [attr.title]="captionsLabel()" [attr.aria-label]="captionsLabel()">
|
|
3051
3468
|
@if (captionsActive()) {
|
|
3052
3469
|
<ngxsp-smart-icon class="ngxsp-icon" name="captions" />
|
|
@@ -3054,20 +3471,35 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3054
3471
|
<ngxsp-smart-icon class="ngxsp-icon" name="captions-off" />
|
|
3055
3472
|
}
|
|
3056
3473
|
</button>
|
|
3057
|
-
|
|
3058
|
-
|
|
3474
|
+
}
|
|
3475
|
+
<!--
|
|
3476
|
+
The rate itself, as a pill: what it is shows at a glance. Its name says what pressing it
|
|
3477
|
+
does as well — read out, "1x, button" told nobody that this is where the speed is chosen,
|
|
3478
|
+
while every other chip on this bar names its own job.
|
|
3479
|
+
-->
|
|
3480
|
+
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-speed" (click)="openMenu.emit('speed')" [attr.title]="speedTitle()" [attr.aria-label]="speedTitle()">
|
|
3059
3481
|
<span class="ngxsp-vod-speedBadge">{{ speedBadge() }}</span>
|
|
3060
3482
|
</button>
|
|
3483
|
+
<!--
|
|
3484
|
+
The host's own buttons that belong on this side rather than beside the picture controls:
|
|
3485
|
+
where the picture goes, and what follows it. Its others arrive before the spacer, above.
|
|
3486
|
+
-->
|
|
3487
|
+
<ng-content select="[ngxsp-player-inline-trailing]" />
|
|
3061
3488
|
@if (showAirPlay()) {
|
|
3062
3489
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-airplay" [class.accent]="airPlayActive()" (click)="airPlay.emit()" [attr.title]="airPlayLabel()" [attr.aria-label]="airPlayLabel()">
|
|
3063
3490
|
<ngxsp-smart-icon class="ngxsp-icon" [name]="airPlayActive() ? 'airplay-active' : 'airplay'" />
|
|
3064
3491
|
</button>
|
|
3065
3492
|
}
|
|
3066
3493
|
@if (showCast()) {
|
|
3067
|
-
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-cast" [class.accent]="castActive()" (click)="cast.emit()" [attr.title]="castHint()" [attr.aria-label]="castLabel()">
|
|
3494
|
+
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-cast" [class.accent]="castActive()" (click)="cast.emit()" [attr.title]="castHint() || castLabel()" [attr.aria-label]="castLabel()">
|
|
3068
3495
|
<ngxsp-smart-icon class="ngxsp-icon" [name]="castActive() ? 'devices-active' : 'devices'" />
|
|
3069
3496
|
</button>
|
|
3070
3497
|
}
|
|
3498
|
+
@if (!isAudioMode()) {
|
|
3499
|
+
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-fullscreen" (click)="fullscreen.emit()" [attr.title]="fullscreenLabel()" [attr.aria-label]="fullscreenLabel()">
|
|
3500
|
+
<ngxsp-smart-icon class="ngxsp-icon" name="fullscreen" />
|
|
3501
|
+
</button>
|
|
3502
|
+
}
|
|
3071
3503
|
@if (!isAudioMode() && pipSupported()) {
|
|
3072
3504
|
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-pip" (click)="pip.emit()" [attr.title]="pipLabel()" [attr.aria-label]="pipLabel()">
|
|
3073
3505
|
@if (pipActive()) {
|
|
@@ -3077,11 +3509,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3077
3509
|
}
|
|
3078
3510
|
</button>
|
|
3079
3511
|
}
|
|
3080
|
-
@if (!isAudioMode()) {
|
|
3081
|
-
<button type="button" class="ngxsp-vod-chip ngxsp-vod-chip-fullscreen" (click)="fullscreen.emit()" [attr.title]="fullscreenLabel()" [attr.aria-label]="fullscreenLabel()">
|
|
3082
|
-
<ngxsp-smart-icon class="ngxsp-icon" name="fullscreen" />
|
|
3083
|
-
</button>
|
|
3084
|
-
}
|
|
3085
3512
|
</div>
|
|
3086
3513
|
|
|
3087
3514
|
<ngxsp-time-slider
|
|
@@ -3098,7 +3525,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3098
3525
|
<ng-content select="ngxsp-player-menu" />
|
|
3099
3526
|
</div>
|
|
3100
3527
|
`,
|
|
3101
|
-
styles: [":host{display:contents}.ngxsp-icon{width:20px;height:20px;display:block;flex:0 0 auto}.ngxsp-icon-lg{width:28px;height:28px}.ngxsp-vod-top{position:absolute;left:0;right:0;top:0;display:flex;align-items:flex-start;gap:12px;padding:16px 18px 40px;background:linear-gradient(to bottom,#0000009e,#0000);pointer-events:none;opacity:0;transition:opacity .2s ease;z-index:3}:host-context(.ngxsp-ui-visible) .ngxsp-vod-top{opacity:1}.ngxsp-vod-titleWrap{min-width:0;display:flex;flex-direction:column;gap:2px}.ngxsp-vod-eyebrow{font-size:12px;font-weight:600;color:#ffffffb8}.ngxsp-vod-title{font-weight:600;font-size:16px;color:#fff;text-shadow:0 1px 2px rgb(0 0 0 / .5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngxsp-vod-topHint{display:none}.ngxsp-vod-status{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:#00000073;color:#ffffffdb;font-size:11px;font-weight:500;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.ngxsp-vod-status:before{content:\"\";width:6px;height:6px;border-radius:50%;background:#ffffff80}.ngxsp-vod-status[data-state=playing]:before{background:var(--nsp-success, #3ecf8e)}.ngxsp-vod-spacer{flex:1}.ngxsp-vod-centerDock{position:absolute;inset:0;margin:auto;width:max-content;height:max-content;display:flex;align-items:center;gap:20px;z-index:4;opacity:0;visibility:hidden;transform:scale(.96);transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s;pointer-events:none}:host-context(.ngxsp-ui-visible) .ngxsp-vod-centerDock{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .2s ease,transform .2s ease,visibility 0s}:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-centerDock,:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-top{display:none}.ngxsp-vod-center{height:68px;width:68px;border-radius:999px;border:0;background:#fffffff0;color:#0d0e11;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 12px 40px #00000073;transition:transform .15s ease,background-color .15s ease}.ngxsp-vod-center:hover{transform:scale(1.05);background:#fff}.ngxsp-vod-side{position:relative;height:48px;min-width:48px;width:48px;border-radius:999px;border:0;background:#00000073;color:#fff;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:background-color .15s ease}.ngxsp-vod-side-wide{min-width:48px}.ngxsp-vod-side-wide .ngxsp-icon{width:24px;height:24px}.ngxsp-vod-side:hover{background:#000000a6}.ngxsp-vod-bottom{position:absolute;left:0;right:0;bottom:0;padding:40px 14px 8px;background:linear-gradient(180deg,#0000,#0000008c 45%,#000000d1);display:flex;flex-direction:column;align-items:stretch;gap:0;z-index:4;opacity:0;transition:opacity .2s ease}:host-context(.ngxsp-ui-visible) .ngxsp-vod-bottom{opacity:1}.ngxsp-vod-metaRow{display:flex;align-items:center;gap:4px;width:100%;min-height:40px}.ngxsp-vod-speedBadge{box-sizing:border-box;min-width:30px;padding:2px 5px;border:1.5px solid currentColor;border-radius:999px;font-size:11px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap}.ngxsp-vod-time{padding:0 8px;color:#ffffffeb;font-variant-numeric:tabular-nums;font-size:12px;font-weight:500;white-space:nowrap}.ngxsp-vod-range{order:-1;min-width:100%;min-height:32px;--ngxsp-track-size:4px;--ngxsp-track-bg:rgb(255 255 255 / .22);--ngxsp-buffered-bg:rgb(255 255 255 / .34);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-thumb-size:13px;--ngxsp-thumb-bg:#fff;--ngxsp-marker-width:2px;--ngxsp-marker-height:8px;--ngxsp-marker-bg:rgb(0 0 0 / .55);--ngxsp-marker-active-bg:#fff;--ngxsp-marker-active-shadow:none;--ngxsp-preview-bg:rgb(13 14 17 / .92);--ngxsp-preview-border:rgb(255 255 255 / .12);--ngxsp-preview-muted:rgb(255 255 255 / .64)}.ngxsp-vod-range:hover{--ngxsp-track-size:6px}.ngxsp-vod-volumeGroup{display:inline-flex;align-items:center}.ngxsp-vod-volumeControl{--ngxsp-control-size:36px;--ngxsp-volume-compact-min:72px;--ngxsp-volume-compact-max:104px;--ngxsp-volume-button-bg:transparent;--ngxsp-volume-button-border:0;--ngxsp-volume-button-radius:6px;--ngxsp-volume-accent:#fff;--ngxsp-volume-track-bg:rgb(255 255 255 / .28);--ngxsp-volume-thumb-bg:#fff;--ngxsp-volume-thumb-size:12px;--ngxsp-volume-thumb-shadow:none;--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);color:#fff}.ngxsp-vod-label{font-size:12px;color:#ffffffa3}.ngxsp-vod-chip{position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:0;border-radius:6px;background:transparent;color:#ffffffeb;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.ngxsp-vod-chip:hover:not(:disabled){background:#ffffff1f;color:#fff}.ngxsp-vod-chip:disabled{opacity:.4;cursor:default}.ngxsp-vod-chip.accent{color:var(--nsp-media-accent, #8b90ff)}.ngxsp-vod-chip-quiet{background:transparent}.ngxsp-vod-center:disabled,.ngxsp-vod-side:disabled{opacity:.38;cursor:not-allowed}.ngxsp-vod-center:focus-visible,.ngxsp-vod-side:focus-visible,.ngxsp-vod-chip:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:1px}.ngxsp-buffer{height:4px;border-radius:999px;background:#ffffff1f;overflow:hidden}.ngxsp-bufferFill{height:100%;border-radius:999px;background:var(--nsp-media-accent, #8b90ff)}@media(max-width:860px){.ngxsp-vod-top{padding:12px 14px 28px}.ngxsp-vod-centerDock{gap:14px}.ngxsp-vod-center{height:58px;width:58px}.ngxsp-vod-side{height:42px;width:42px;min-width:42px}.ngxsp-vod-bottom{padding:36px 8px 6px}.ngxsp-vod-chip-speed,.ngxsp-vod-chip-tracks{display:none}}@media(max-width:640px){.ngxsp-icon{width:18px;height:18px}.ngxsp-icon-lg{width:24px;height:24px}.ngxsp-vod-title{font-size:14px}.ngxsp-vod-status{display:none}.ngxsp-vod-time{font-size:11px;padding:0 4px}.ngxsp-vod-center{height:52px;width:52px}.ngxsp-vod-side{height:38px;width:38px;min-width:38px}.ngxsp-vod-metaRow{min-height:34px;gap:2px}.ngxsp-vod-chip{width:32px;height:32px;min-width:32px;min-height:32px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-shell{grid-template-columns:32px 64px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-range{opacity:1;visibility:visible;transform:none;pointer-events:auto}.ngxsp-vod-chip-playlist,.ngxsp-vod-chip-captions,.ngxsp-vod-chip-pip,.ngxsp-vod-top,.ngxsp-vod-side{display:none}}@media(prefers-reduced-motion:reduce){.ngxsp-vod-top,.ngxsp-vod-centerDock,.ngxsp-vod-bottom,.ngxsp-vod-center,.ngxsp-vod-side,.ngxsp-vod-chip{transition:none}}\n"]
|
|
3528
|
+
styles: [":host{display:contents}.ngxsp-icon{width:20px;height:20px;display:block;flex:0 0 auto}.ngxsp-icon-lg{width:28px;height:28px}.ngxsp-vod-top{position:absolute;left:0;right:0;top:0;display:flex;align-items:flex-start;gap:12px;padding:16px 18px 40px;background:linear-gradient(to bottom,#0000009e,#0000);pointer-events:none;opacity:0;transition:opacity .2s ease;z-index:3}:host-context(.ngxsp-ui-visible) .ngxsp-vod-top{opacity:1}.ngxsp-vod-titleWrap{min-width:0;display:flex;flex-direction:column;gap:2px}.ngxsp-vod-eyebrow{font-size:12px;font-weight:600;color:#ffffffb8}.ngxsp-vod-title{font-weight:600;font-size:16px;color:#fff;text-shadow:0 1px 2px rgb(0 0 0 / .5);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ngxsp-vod-topHint{display:none}.ngxsp-vod-status{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:#00000073;color:#ffffffdb;font-size:11px;font-weight:500;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.ngxsp-vod-status:before{content:\"\";width:6px;height:6px;border-radius:50%;background:#ffffff80}.ngxsp-vod-status[data-state=playing]:before{background:var(--nsp-success, #3ecf8e)}.ngxsp-vod-spacer{flex:1}.ngxsp-vod-centerDock{position:absolute;inset:0;margin:auto;width:max-content;height:max-content;display:flex;align-items:center;gap:20px;z-index:4;opacity:0;visibility:hidden;transform:scale(.96);transition:opacity .2s ease,transform .2s ease,visibility 0s linear .2s;pointer-events:none}:host-context(.ngxsp-ui-visible) .ngxsp-vod-centerDock{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .2s ease,transform .2s ease,visibility 0s}:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-centerDock,:host-context(.ngxsp-root[data-kind=\"error\"]) .ngxsp-vod-top{display:none}.ngxsp-vod-center{height:68px;width:68px;border-radius:999px;border:0;background:#fffffff0;color:#0d0e11;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 12px 40px #00000073;transition:transform .15s ease,background-color .15s ease}.ngxsp-vod-center:hover{transform:scale(1.05);background:#fff}.ngxsp-vod-side{position:relative;height:48px;min-width:48px;width:48px;border-radius:999px;border:0;background:#00000073;color:#fff;padding:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:background-color .15s ease}.ngxsp-vod-side-wide{min-width:48px}.ngxsp-vod-side-wide .ngxsp-icon{width:24px;height:24px}.ngxsp-vod-side:hover{background:#000000a6}.ngxsp-vod-bottom{position:absolute;left:0;right:0;bottom:0;padding:40px 14px 8px;background:linear-gradient(180deg,#0000,#0000008c 45%,#000000d1);display:flex;flex-direction:column;align-items:stretch;gap:0;z-index:4;opacity:0;transition:opacity .2s ease}:host-context(.ngxsp-ui-visible) .ngxsp-vod-bottom{opacity:1}.ngxsp-vod-metaRow{display:flex;align-items:center;gap:4px;width:100%;min-height:40px}.ngxsp-vod-speedBadge{box-sizing:border-box;min-width:30px;padding:2px 5px;border:1.5px solid currentColor;border-radius:999px;font-size:11px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap}.ngxsp-vod-time{padding:0 8px;color:#ffffffeb;font-variant-numeric:tabular-nums;font-size:12px;font-weight:500;white-space:nowrap}.ngxsp-vod-remaining{display:none;padding:0 6px;color:#ffffffc7;font-variant-numeric:tabular-nums;font-size:11px;font-weight:500;white-space:nowrap}.ngxsp-vod-range{order:-1;min-width:100%;min-height:32px;--ngxsp-track-size:4px;--ngxsp-track-bg:rgb(255 255 255 / .22);--ngxsp-buffered-bg:rgb(255 255 255 / .34);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-thumb-size:13px;--ngxsp-thumb-bg:#fff;--ngxsp-marker-width:2px;--ngxsp-marker-height:8px;--ngxsp-marker-bg:rgb(0 0 0 / .55);--ngxsp-marker-active-bg:#fff;--ngxsp-marker-active-shadow:none;--ngxsp-preview-bg:rgb(13 14 17 / .92);--ngxsp-preview-border:rgb(255 255 255 / .12);--ngxsp-preview-muted:rgb(255 255 255 / .64)}.ngxsp-vod-range:hover{--ngxsp-track-size:6px}.ngxsp-vod-volumeGroup{display:inline-flex;align-items:center}.ngxsp-vod-volumeControl{--ngxsp-control-size:36px;--ngxsp-volume-compact-min:72px;--ngxsp-volume-compact-max:104px;--ngxsp-volume-button-bg:transparent;--ngxsp-volume-button-border:0;--ngxsp-volume-button-radius:6px;--ngxsp-volume-accent:#fff;--ngxsp-volume-track-bg:rgb(255 255 255 / .28);--ngxsp-volume-thumb-bg:#fff;--ngxsp-volume-thumb-size:12px;--ngxsp-volume-thumb-shadow:none;--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);color:#fff}.ngxsp-vod-label{font-size:12px;color:#ffffffa3}.ngxsp-vod-chip{position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:0;border-radius:6px;background:transparent;color:#ffffffeb;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background-color .15s ease,color .15s ease}.ngxsp-vod-chip:hover:not(:disabled){background:#ffffff1f;color:#fff}.ngxsp-vod-chip:disabled{opacity:.4;cursor:default}.ngxsp-vod-chip.accent{color:var(--nsp-media-accent, #8b90ff)}.ngxsp-vod-chip-quiet{background:transparent}.ngxsp-vod-center:disabled,.ngxsp-vod-side:disabled{opacity:.38;cursor:not-allowed}.ngxsp-vod-center:focus-visible,.ngxsp-vod-side:focus-visible,.ngxsp-vod-chip:focus-visible{outline:2px solid var(--nsp-media-accent, #8b90ff);outline-offset:1px}.ngxsp-buffer{height:4px;border-radius:999px;background:#ffffff1f;overflow:hidden}.ngxsp-bufferFill{height:100%;border-radius:999px;background:var(--nsp-media-accent, #8b90ff)}@media(max-width:860px){.ngxsp-vod-top{padding:12px 14px 28px}.ngxsp-vod-centerDock{gap:14px}.ngxsp-vod-center{height:58px;width:58px}.ngxsp-vod-side{height:42px;width:42px;min-width:42px}.ngxsp-vod-bottom{padding:36px 8px 6px}.ngxsp-vod-chip-speed,.ngxsp-vod-chip-tracks{display:none}}@media(max-width:640px)and (max-height:320px){.ngxsp-vod-time{display:none}.ngxsp-vod-remaining{display:block}}@media(max-width:640px){.ngxsp-icon{width:18px;height:18px}.ngxsp-icon-lg{width:24px;height:24px}.ngxsp-vod-title{font-size:14px}.ngxsp-vod-status{display:none}.ngxsp-vod-time{font-size:11px;padding:0 4px}.ngxsp-vod-center{height:52px;width:52px}.ngxsp-vod-side{height:38px;width:38px;min-width:38px}.ngxsp-vod-metaRow{min-height:34px;gap:2px;flex-wrap:wrap;row-gap:4px}.ngxsp-vod-chip{width:32px;height:32px;min-width:32px;min-height:32px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-shell{grid-template-columns:32px 64px}.ngxsp-vod-bottom .ngxsp-vod-volumeControl.ngxsp-vc-compact ::ng-deep .ngxsp-vc-range{opacity:1;visibility:visible;transform:none;pointer-events:auto}.ngxsp-vod-chip-playlist,.ngxsp-vod-chip-captions,.ngxsp-vod-chip-pip,.ngxsp-vod-top,.ngxsp-vod-side{display:none}}@media(prefers-reduced-motion:reduce){.ngxsp-vod-top,.ngxsp-vod-centerDock,.ngxsp-vod-bottom,.ngxsp-vod-center,.ngxsp-vod-side,.ngxsp-vod-chip{transition:none}}\n"]
|
|
3102
3529
|
}]
|
|
3103
3530
|
}],
|
|
3104
3531
|
propDecorators: {
|
|
@@ -3174,6 +3601,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3174
3601
|
required: false
|
|
3175
3602
|
}]
|
|
3176
3603
|
}],
|
|
3604
|
+
showPlaylistModes: [{
|
|
3605
|
+
type: i0.Input,
|
|
3606
|
+
args: [{
|
|
3607
|
+
isSignal: true,
|
|
3608
|
+
alias: "showPlaylistModes",
|
|
3609
|
+
required: false
|
|
3610
|
+
}]
|
|
3611
|
+
}],
|
|
3177
3612
|
canPrev: [{
|
|
3178
3613
|
type: i0.Input,
|
|
3179
3614
|
args: [{
|
|
@@ -3286,6 +3721,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3286
3721
|
required: false
|
|
3287
3722
|
}]
|
|
3288
3723
|
}],
|
|
3724
|
+
speedActionLabel: [{
|
|
3725
|
+
type: i0.Input,
|
|
3726
|
+
args: [{
|
|
3727
|
+
isSignal: true,
|
|
3728
|
+
alias: "speedActionLabel",
|
|
3729
|
+
required: false
|
|
3730
|
+
}]
|
|
3731
|
+
}],
|
|
3289
3732
|
volumeLabel: [{
|
|
3290
3733
|
type: i0.Input,
|
|
3291
3734
|
args: [{
|
|
@@ -3310,6 +3753,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3310
3753
|
required: false
|
|
3311
3754
|
}]
|
|
3312
3755
|
}],
|
|
3756
|
+
showTracks: [{
|
|
3757
|
+
type: i0.Input,
|
|
3758
|
+
args: [{
|
|
3759
|
+
isSignal: true,
|
|
3760
|
+
alias: "showTracks",
|
|
3761
|
+
required: false
|
|
3762
|
+
}]
|
|
3763
|
+
}],
|
|
3764
|
+
showCaptions: [{
|
|
3765
|
+
type: i0.Input,
|
|
3766
|
+
args: [{
|
|
3767
|
+
isSignal: true,
|
|
3768
|
+
alias: "showCaptions",
|
|
3769
|
+
required: false
|
|
3770
|
+
}]
|
|
3771
|
+
}],
|
|
3313
3772
|
showAirPlay: [{
|
|
3314
3773
|
type: i0.Input,
|
|
3315
3774
|
args: [{
|
|
@@ -3533,6 +3992,8 @@ var PlayerControlsEditionComponent = class PlayerControlsEditionComponent {
|
|
|
3533
3992
|
behindSec = input(0, ...ngDevMode ? [{ debugName: "behindSec" }] : /* istanbul ignore next */ []);
|
|
3534
3993
|
liveLabel = input("Direct", ...ngDevMode ? [{ debugName: "liveLabel" }] : /* istanbul ignore next */ []);
|
|
3535
3994
|
captionsActive = input(false, ...ngDevMode ? [{ debugName: "captionsActive" }] : /* istanbul ignore next */ []);
|
|
3995
|
+
showTracks = input(true, ...ngDevMode ? [{ debugName: "showTracks" }] : /* istanbul ignore next */ []);
|
|
3996
|
+
showCaptions = input(true, ...ngDevMode ? [{ debugName: "showCaptions" }] : /* istanbul ignore next */ []);
|
|
3536
3997
|
speedLabel = input("1x", ...ngDevMode ? [{ debugName: "speedLabel" }] : /* istanbul ignore next */ []);
|
|
3537
3998
|
showAirPlay = input(false, ...ngDevMode ? [{ debugName: "showAirPlay" }] : /* istanbul ignore next */ []);
|
|
3538
3999
|
airPlayActive = input(false, ...ngDevMode ? [{ debugName: "airPlayActive" }] : /* istanbul ignore next */ []);
|
|
@@ -3560,16 +4021,11 @@ var PlayerControlsEditionComponent = class PlayerControlsEditionComponent {
|
|
|
3560
4021
|
volumeChange = output();
|
|
3561
4022
|
goLive = output();
|
|
3562
4023
|
fmtTime(sec) {
|
|
3563
|
-
|
|
3564
|
-
const h = Math.floor(s / 3600);
|
|
3565
|
-
const m = Math.floor(s % 3600 / 60);
|
|
3566
|
-
const r = s % 60;
|
|
3567
|
-
if (h > 0) return `${h}:${String(m).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
|
|
3568
|
-
return `${m}:${String(r).padStart(2, "0")}`;
|
|
4024
|
+
return formatTime(sec);
|
|
3569
4025
|
}
|
|
3570
4026
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3571
4027
|
minVersion: "12.0.0",
|
|
3572
|
-
version: "22.
|
|
4028
|
+
version: "22.3.0",
|
|
3573
4029
|
ngImport: i0,
|
|
3574
4030
|
type: PlayerControlsEditionComponent,
|
|
3575
4031
|
deps: [],
|
|
@@ -3577,7 +4033,7 @@ var PlayerControlsEditionComponent = class PlayerControlsEditionComponent {
|
|
|
3577
4033
|
});
|
|
3578
4034
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
3579
4035
|
minVersion: "17.0.0",
|
|
3580
|
-
version: "22.
|
|
4036
|
+
version: "22.3.0",
|
|
3581
4037
|
type: PlayerControlsEditionComponent,
|
|
3582
4038
|
isStandalone: true,
|
|
3583
4039
|
selector: "ngxsp-player-controls-edition",
|
|
@@ -3638,6 +4094,20 @@ var PlayerControlsEditionComponent = class PlayerControlsEditionComponent {
|
|
|
3638
4094
|
isRequired: false,
|
|
3639
4095
|
transformFunction: null
|
|
3640
4096
|
},
|
|
4097
|
+
showTracks: {
|
|
4098
|
+
classPropertyName: "showTracks",
|
|
4099
|
+
publicName: "showTracks",
|
|
4100
|
+
isSignal: true,
|
|
4101
|
+
isRequired: false,
|
|
4102
|
+
transformFunction: null
|
|
4103
|
+
},
|
|
4104
|
+
showCaptions: {
|
|
4105
|
+
classPropertyName: "showCaptions",
|
|
4106
|
+
publicName: "showCaptions",
|
|
4107
|
+
isSignal: true,
|
|
4108
|
+
isRequired: false,
|
|
4109
|
+
transformFunction: null
|
|
4110
|
+
},
|
|
3641
4111
|
speedLabel: {
|
|
3642
4112
|
classPropertyName: "speedLabel",
|
|
3643
4113
|
publicName: "speedLabel",
|
|
@@ -3803,8 +4273,12 @@ var PlayerControlsEditionComponent = class PlayerControlsEditionComponent {
|
|
|
3803
4273
|
|
|
3804
4274
|
<span class="ed-spacer"></span>
|
|
3805
4275
|
|
|
4276
|
+
@if (showCaptions()) {
|
|
3806
4277
|
<ngxsp-labeled-control label="Sous-titres" [pressed]="captionsActive()" (activate)="captions.emit()"><ngxsp-smart-icon class="ed-icon" [name]="captionsActive() ? 'captions' : 'captions-off'" /></ngxsp-labeled-control>
|
|
4278
|
+
}
|
|
4279
|
+
@if (showTracks()) {
|
|
3807
4280
|
<ngxsp-labeled-control label="Pistes" (activate)="openMenu.emit('tracks')"><ngxsp-smart-icon class="ed-icon" name="tracks" /></ngxsp-labeled-control>
|
|
4281
|
+
}
|
|
3808
4282
|
<ngxsp-labeled-control [label]="speedLabel()" (activate)="openMenu.emit('speed')"><ngxsp-smart-icon class="ed-icon" name="speed" /></ngxsp-labeled-control>
|
|
3809
4283
|
@if (showAirPlay()) {
|
|
3810
4284
|
<ngxsp-labeled-control [label]="airPlayLabel()" [active]="airPlayActive()" (activate)="airPlay.emit()"><ngxsp-smart-icon class="ed-icon" [name]="airPlayActive() ? 'airplay-active' : 'airplay'" /></ngxsp-labeled-control>
|
|
@@ -3911,7 +4385,7 @@ var PlayerControlsEditionComponent = class PlayerControlsEditionComponent {
|
|
|
3911
4385
|
};
|
|
3912
4386
|
i0.ɵɵngDeclareClassMetadata({
|
|
3913
4387
|
minVersion: "12.0.0",
|
|
3914
|
-
version: "22.
|
|
4388
|
+
version: "22.3.0",
|
|
3915
4389
|
ngImport: i0,
|
|
3916
4390
|
type: PlayerControlsEditionComponent,
|
|
3917
4391
|
decorators: [{
|
|
@@ -3973,8 +4447,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3973
4447
|
|
|
3974
4448
|
<span class="ed-spacer"></span>
|
|
3975
4449
|
|
|
4450
|
+
@if (showCaptions()) {
|
|
3976
4451
|
<ngxsp-labeled-control label="Sous-titres" [pressed]="captionsActive()" (activate)="captions.emit()"><ngxsp-smart-icon class="ed-icon" [name]="captionsActive() ? 'captions' : 'captions-off'" /></ngxsp-labeled-control>
|
|
4452
|
+
}
|
|
4453
|
+
@if (showTracks()) {
|
|
3977
4454
|
<ngxsp-labeled-control label="Pistes" (activate)="openMenu.emit('tracks')"><ngxsp-smart-icon class="ed-icon" name="tracks" /></ngxsp-labeled-control>
|
|
4455
|
+
}
|
|
3978
4456
|
<ngxsp-labeled-control [label]="speedLabel()" (activate)="openMenu.emit('speed')"><ngxsp-smart-icon class="ed-icon" name="speed" /></ngxsp-labeled-control>
|
|
3979
4457
|
@if (showAirPlay()) {
|
|
3980
4458
|
<ngxsp-labeled-control [label]="airPlayLabel()" [active]="airPlayActive()" (activate)="airPlay.emit()"><ngxsp-smart-icon class="ed-icon" [name]="airPlayActive() ? 'airplay-active' : 'airplay'" /></ngxsp-labeled-control>
|
|
@@ -4068,6 +4546,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4068
4546
|
required: false
|
|
4069
4547
|
}]
|
|
4070
4548
|
}],
|
|
4549
|
+
showTracks: [{
|
|
4550
|
+
type: i0.Input,
|
|
4551
|
+
args: [{
|
|
4552
|
+
isSignal: true,
|
|
4553
|
+
alias: "showTracks",
|
|
4554
|
+
required: false
|
|
4555
|
+
}]
|
|
4556
|
+
}],
|
|
4557
|
+
showCaptions: [{
|
|
4558
|
+
type: i0.Input,
|
|
4559
|
+
args: [{
|
|
4560
|
+
isSignal: true,
|
|
4561
|
+
alias: "showCaptions",
|
|
4562
|
+
required: false
|
|
4563
|
+
}]
|
|
4564
|
+
}],
|
|
4071
4565
|
speedLabel: [{
|
|
4072
4566
|
type: i0.Input,
|
|
4073
4567
|
args: [{
|
|
@@ -4240,6 +4734,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4240
4734
|
ports;
|
|
4241
4735
|
engines;
|
|
4242
4736
|
debug = false;
|
|
4737
|
+
handlingFailure = false;
|
|
4243
4738
|
startTimeSec = null;
|
|
4244
4739
|
autoplayOnInit = true;
|
|
4245
4740
|
playRequest = 0;
|
|
@@ -4254,11 +4749,15 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4254
4749
|
repeatMode = "off";
|
|
4255
4750
|
repeatLabel = "Repeat: off";
|
|
4256
4751
|
hasPlaylistControls = false;
|
|
4752
|
+
showCastControl = true;
|
|
4753
|
+
showPictureInPicture = true;
|
|
4754
|
+
showPlaylistModes = true;
|
|
4257
4755
|
mediaMode = "video";
|
|
4258
4756
|
castEnabled = false;
|
|
4259
4757
|
castConnected = false;
|
|
4260
4758
|
airPlayAvailable = false;
|
|
4261
4759
|
airPlayActive = false;
|
|
4760
|
+
overlayLabels = {};
|
|
4262
4761
|
documentShortcuts = true;
|
|
4263
4762
|
nowPlayingLabel = "Now playing";
|
|
4264
4763
|
nowListeningLabel = "Now listening";
|
|
@@ -4279,14 +4778,17 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4279
4778
|
timelineMarkers = [];
|
|
4280
4779
|
ended = new EventEmitter();
|
|
4281
4780
|
videoSize = new EventEmitter();
|
|
4781
|
+
showAudioVisual = true;
|
|
4282
4782
|
progress = new EventEmitter();
|
|
4283
4783
|
prev = new EventEmitter();
|
|
4284
4784
|
next = new EventEmitter();
|
|
4285
4785
|
toggleShuffle = new EventEmitter();
|
|
4286
4786
|
cycleRepeat = new EventEmitter();
|
|
4787
|
+
showTrackControls = true;
|
|
4287
4788
|
subtitles = new EventEmitter();
|
|
4288
4789
|
subtitlesLoaded = new EventEmitter();
|
|
4289
4790
|
menuLabels = {};
|
|
4791
|
+
castLabels = {};
|
|
4290
4792
|
cast = new EventEmitter();
|
|
4291
4793
|
stateChange = new EventEmitter();
|
|
4292
4794
|
playbackToggle = new EventEmitter();
|
|
@@ -4337,9 +4839,13 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4337
4839
|
get editionMeta() {
|
|
4338
4840
|
return this.isAudioMode ? "Audio" : "Vidéo";
|
|
4339
4841
|
}
|
|
4842
|
+
holdControls = false;
|
|
4843
|
+
preferredTextLanguage = null;
|
|
4844
|
+
captionScale = 1;
|
|
4845
|
+
loadSidecarSubtitles = false;
|
|
4340
4846
|
get uiVisible() {
|
|
4341
4847
|
const kind = this.state?.kind;
|
|
4342
|
-
return this.controlsVisible || this.openMenu !== null || kind === "paused" || kind === "loading" || kind === "buffering" || kind === "error";
|
|
4848
|
+
return this.controlsVisible || this.holdControls || this.openMenu !== null || kind === "paused" || kind === "loading" || kind === "buffering" || kind === "error";
|
|
4343
4849
|
}
|
|
4344
4850
|
get displayTitle() {
|
|
4345
4851
|
const ui = this.config?.ui;
|
|
@@ -4400,7 +4906,10 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4400
4906
|
}
|
|
4401
4907
|
if (playRequested) {
|
|
4402
4908
|
if (this.loading) this.pendingPlay = true;
|
|
4403
|
-
else this.
|
|
4909
|
+
else if (this.state?.kind === "error") {
|
|
4910
|
+
if (this.pendingSeekSec === null && this.currentTime > .5) this.pendingSeekSec = this.currentTime;
|
|
4911
|
+
this.loadConfig(true);
|
|
4912
|
+
} else this.facade.play().catch(() => {});
|
|
4404
4913
|
}
|
|
4405
4914
|
}
|
|
4406
4915
|
ngOnInit() {
|
|
@@ -4420,7 +4929,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4420
4929
|
this.sub.add(this.facade.time$.subscribe((t) => {
|
|
4421
4930
|
if (this.loading) return;
|
|
4422
4931
|
this.currentTime = t.currentTime;
|
|
4423
|
-
this.duration = t.duration;
|
|
4932
|
+
this.duration = this.usableDuration(t.duration);
|
|
4424
4933
|
this.progress.emit({
|
|
4425
4934
|
currentTime: this.currentTime,
|
|
4426
4935
|
duration: this.duration,
|
|
@@ -4434,7 +4943,9 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4434
4943
|
this.cdr.markForCheck();
|
|
4435
4944
|
}));
|
|
4436
4945
|
this.sub.add(this.facade.tracks$.subscribe((tracks) => {
|
|
4946
|
+
const arrived = this.tracks !== tracks;
|
|
4437
4947
|
this.tracks = tracks;
|
|
4948
|
+
if (arrived) this.applyPreferredTextTrack();
|
|
4438
4949
|
this.cdr.markForCheck();
|
|
4439
4950
|
}));
|
|
4440
4951
|
this.sub.add(this.facade.captionCues$.subscribe((cues) => this.drawCaptions(cues)));
|
|
@@ -4468,6 +4979,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4468
4979
|
}
|
|
4469
4980
|
}
|
|
4470
4981
|
get currentError() {
|
|
4982
|
+
if (this.handlingFailure) return null;
|
|
4471
4983
|
return this.state?.kind === "error" ? this.state.error : null;
|
|
4472
4984
|
}
|
|
4473
4985
|
async copyDebug() {
|
|
@@ -4627,6 +5139,40 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4627
5139
|
this.controlsObserver.observe(bar);
|
|
4628
5140
|
lift();
|
|
4629
5141
|
}
|
|
5142
|
+
async loadSidecars() {
|
|
5143
|
+
const files = this.loadSidecarSubtitles ? this.config?.source?.sidecar?.subtitles ?? [] : [];
|
|
5144
|
+
if (!files.length) return;
|
|
5145
|
+
const chosen = this.selectedTextTrackId;
|
|
5146
|
+
for (const file of files) {
|
|
5147
|
+
if (!file?.url) continue;
|
|
5148
|
+
try {
|
|
5149
|
+
const bytes = new Uint8Array(await (await fetch(file.url)).arrayBuffer());
|
|
5150
|
+
const vtt = subtitleTextToVtt(decodeSubtitleBytes(bytes));
|
|
5151
|
+
if (!/-->/.test(vtt)) continue;
|
|
5152
|
+
const { label, language } = describeSubtitleFile(file.url.split("/").pop() ?? "");
|
|
5153
|
+
await this.facade.addExternalTextTrack({
|
|
5154
|
+
label: label || file.lang,
|
|
5155
|
+
...file.lang || language ? { language: file.lang || language } : {},
|
|
5156
|
+
vtt
|
|
5157
|
+
});
|
|
5158
|
+
} catch {}
|
|
5159
|
+
}
|
|
5160
|
+
await this.facade.setTextTrack(chosen);
|
|
5161
|
+
}
|
|
5162
|
+
async applyPreferredTextTrack() {
|
|
5163
|
+
const wanted = this.preferredTextLanguage;
|
|
5164
|
+
if (wanted === null || !this.textTracks.length) return;
|
|
5165
|
+
const key = this.config?.source?.url ?? this.config?.source?.contentId ?? "";
|
|
5166
|
+
if (this.preferenceAppliedTo === key) return;
|
|
5167
|
+
this.preferenceAppliedTo = key;
|
|
5168
|
+
if (wanted === "") {
|
|
5169
|
+
if (this.selectedTextTrackId) await this.facade.setTextTrack(null);
|
|
5170
|
+
return;
|
|
5171
|
+
}
|
|
5172
|
+
const spoken = this.textTracks.find((track) => (track.language ?? "").toLowerCase().startsWith(wanted.toLowerCase()));
|
|
5173
|
+
if (spoken && spoken.id !== this.selectedTextTrackId) await this.facade.setTextTrack(spoken.id);
|
|
5174
|
+
}
|
|
5175
|
+
preferenceAppliedTo = null;
|
|
4630
5176
|
drawCaptions(cues) {
|
|
4631
5177
|
const layer = this.captionsLayer?.nativeElement;
|
|
4632
5178
|
if (!layer) return;
|
|
@@ -4722,17 +5268,25 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4722
5268
|
this.airPlayActive = target.webkitCurrentPlaybackTargetIsWireless === true;
|
|
4723
5269
|
});
|
|
4724
5270
|
}
|
|
5271
|
+
get castChipLabels() {
|
|
5272
|
+
return {
|
|
5273
|
+
...DEFAULT_CAST_LABELS,
|
|
5274
|
+
...this.castLabels
|
|
5275
|
+
};
|
|
5276
|
+
}
|
|
4725
5277
|
castLabel() {
|
|
4726
|
-
|
|
4727
|
-
if (this.
|
|
4728
|
-
if (this.castState === "
|
|
4729
|
-
|
|
5278
|
+
const labels = this.castChipLabels;
|
|
5279
|
+
if (this.castEnabled) return labels.play;
|
|
5280
|
+
if (this.castState === "connected") return labels.playing;
|
|
5281
|
+
if (this.castState === "connecting") return labels.connecting;
|
|
5282
|
+
return labels.play;
|
|
4730
5283
|
}
|
|
4731
5284
|
castHintLabel() {
|
|
4732
|
-
|
|
4733
|
-
if (this.
|
|
4734
|
-
if (this.castState === "
|
|
4735
|
-
|
|
5285
|
+
const labels = this.castChipLabels;
|
|
5286
|
+
if (this.castEnabled) return labels.playHint;
|
|
5287
|
+
if (this.castState === "connected") return labels.playingHint;
|
|
5288
|
+
if (this.castState === "connecting") return labels.connectingHint;
|
|
5289
|
+
return labels.unavailableHint;
|
|
4736
5290
|
}
|
|
4737
5291
|
onCastClick() {
|
|
4738
5292
|
if (this.castEnabled) {
|
|
@@ -4780,13 +5334,11 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4780
5334
|
if (!this.duration || !Number.isFinite(this.duration) || this.duration <= 0) return 0;
|
|
4781
5335
|
return Math.max(0, Math.min(100, this.bufferAheadSec / this.duration * 100));
|
|
4782
5336
|
}
|
|
5337
|
+
usableDuration(reported) {
|
|
5338
|
+
return playableDurationSec(reported, this.config?.source?.durationSec);
|
|
5339
|
+
}
|
|
4783
5340
|
fmtTime(sec) {
|
|
4784
|
-
|
|
4785
|
-
const h = Math.floor(s / 3600);
|
|
4786
|
-
const m = Math.floor(s % 3600 / 60);
|
|
4787
|
-
const r = s % 60;
|
|
4788
|
-
if (h > 0) return `${h}:${String(m).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
|
|
4789
|
-
return `${m}:${String(r).padStart(2, "0")}`;
|
|
5341
|
+
return formatTime(sec);
|
|
4790
5342
|
}
|
|
4791
5343
|
noop() {}
|
|
4792
5344
|
mediaElementForMode() {
|
|
@@ -4805,12 +5357,13 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4805
5357
|
onInteraction(persist = false) {
|
|
4806
5358
|
this.controlsVisible = true;
|
|
4807
5359
|
this.clearHideControlsTimer();
|
|
4808
|
-
if (!persist && this.state?.kind === "playing" && this.openMenu === null) this.hideControlsTimer = setTimeout(() => {
|
|
5360
|
+
if (!persist && !this.holdControls && this.state?.kind === "playing" && this.openMenu === null) this.hideControlsTimer = setTimeout(() => {
|
|
4809
5361
|
this.controlsVisible = false;
|
|
4810
5362
|
this.cdr.markForCheck();
|
|
4811
5363
|
}, 2200);
|
|
4812
5364
|
}
|
|
4813
5365
|
onPointerLeave() {
|
|
5366
|
+
if (this.holdControls) return;
|
|
4814
5367
|
if (this.state?.kind === "playing" && this.openMenu === null) {
|
|
4815
5368
|
this.clearHideControlsTimer();
|
|
4816
5369
|
this.controlsVisible = false;
|
|
@@ -4878,13 +5431,14 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4878
5431
|
this.loading = true;
|
|
4879
5432
|
this.loadingAutoplay = autoplay;
|
|
4880
5433
|
this.loadedSourceSignature = this.sourceSignature(this.config);
|
|
4881
|
-
this.duration = 0;
|
|
5434
|
+
this.duration = this.usableDuration(0);
|
|
4882
5435
|
this.currentTime = 0;
|
|
4883
5436
|
this.bufferAheadSec = 0;
|
|
4884
5437
|
this.tracks = [];
|
|
4885
5438
|
this.cdr.markForCheck();
|
|
4886
5439
|
try {
|
|
4887
5440
|
await this.facade.load(this.config);
|
|
5441
|
+
await this.loadSidecars();
|
|
4888
5442
|
if (this.pendingSeekSec !== null) {
|
|
4889
5443
|
const target = this.pendingSeekSec;
|
|
4890
5444
|
if (await this.applySeek(target) && this.pendingSeekSec === target) this.pendingSeekSec = null;
|
|
@@ -4971,6 +5525,19 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
4971
5525
|
setOutputVolume(value) {
|
|
4972
5526
|
this.setVolume(value, false);
|
|
4973
5527
|
}
|
|
5528
|
+
async setAudioOutput(sinkId) {
|
|
5529
|
+
const video = this.videoEl?.nativeElement;
|
|
5530
|
+
if (!video?.setSinkId) return false;
|
|
5531
|
+
try {
|
|
5532
|
+
await video.setSinkId(sinkId);
|
|
5533
|
+
return true;
|
|
5534
|
+
} catch {
|
|
5535
|
+
return false;
|
|
5536
|
+
}
|
|
5537
|
+
}
|
|
5538
|
+
get audioOutputSelectable() {
|
|
5539
|
+
return typeof (this.videoEl?.nativeElement)?.setSinkId === "function";
|
|
5540
|
+
}
|
|
4974
5541
|
setVolume(value, emitChange) {
|
|
4975
5542
|
const nextVolume = this.normalizeVolume(value, this.volume);
|
|
4976
5543
|
if (Math.abs(nextVolume - this.volume) < .001) return;
|
|
@@ -5035,7 +5602,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5035
5602
|
}
|
|
5036
5603
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5037
5604
|
minVersion: "12.0.0",
|
|
5038
|
-
version: "22.
|
|
5605
|
+
version: "22.3.0",
|
|
5039
5606
|
ngImport: i0,
|
|
5040
5607
|
type: SmartPlayerComponent,
|
|
5041
5608
|
deps: [],
|
|
@@ -5043,7 +5610,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5043
5610
|
});
|
|
5044
5611
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5045
5612
|
minVersion: "17.0.0",
|
|
5046
|
-
version: "22.
|
|
5613
|
+
version: "22.3.0",
|
|
5047
5614
|
type: SmartPlayerComponent,
|
|
5048
5615
|
isStandalone: true,
|
|
5049
5616
|
selector: "ngx-smart-player",
|
|
@@ -5053,6 +5620,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5053
5620
|
ports: "ports",
|
|
5054
5621
|
engines: "engines",
|
|
5055
5622
|
debug: "debug",
|
|
5623
|
+
handlingFailure: "handlingFailure",
|
|
5056
5624
|
startTimeSec: "startTimeSec",
|
|
5057
5625
|
autoplayOnInit: "autoplayOnInit",
|
|
5058
5626
|
playRequest: "playRequest",
|
|
@@ -5067,9 +5635,13 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5067
5635
|
repeatMode: "repeatMode",
|
|
5068
5636
|
repeatLabel: "repeatLabel",
|
|
5069
5637
|
hasPlaylistControls: "hasPlaylistControls",
|
|
5638
|
+
showCastControl: "showCastControl",
|
|
5639
|
+
showPictureInPicture: "showPictureInPicture",
|
|
5640
|
+
showPlaylistModes: "showPlaylistModes",
|
|
5070
5641
|
mediaMode: "mediaMode",
|
|
5071
5642
|
castEnabled: "castEnabled",
|
|
5072
5643
|
castConnected: "castConnected",
|
|
5644
|
+
overlayLabels: "overlayLabels",
|
|
5073
5645
|
documentShortcuts: "documentShortcuts",
|
|
5074
5646
|
nowPlayingLabel: "nowPlayingLabel",
|
|
5075
5647
|
nowListeningLabel: "nowListeningLabel",
|
|
@@ -5088,7 +5660,14 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5088
5660
|
outputUnmuteLabel: "outputUnmuteLabel",
|
|
5089
5661
|
timelineDurationSec: "timelineDurationSec",
|
|
5090
5662
|
timelineMarkers: "timelineMarkers",
|
|
5091
|
-
|
|
5663
|
+
showAudioVisual: "showAudioVisual",
|
|
5664
|
+
showTrackControls: "showTrackControls",
|
|
5665
|
+
menuLabels: "menuLabels",
|
|
5666
|
+
castLabels: "castLabels",
|
|
5667
|
+
holdControls: "holdControls",
|
|
5668
|
+
preferredTextLanguage: "preferredTextLanguage",
|
|
5669
|
+
captionScale: "captionScale",
|
|
5670
|
+
loadSidecarSubtitles: "loadSidecarSubtitles"
|
|
5092
5671
|
},
|
|
5093
5672
|
outputs: {
|
|
5094
5673
|
ended: "ended",
|
|
@@ -5142,11 +5721,11 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5142
5721
|
<div class="ngxsp-video" (dblclick)="onPrimarySurfaceDoubleClick()" (mousemove)="onInteraction()" (mouseenter)="onInteraction()" (mouseleave)="onPointerLeave()" (focusin)="onInteraction()" (touchstart)="onInteraction(true)" (click)="onRootClick($event)">
|
|
5143
5722
|
<video #video playsinline x-webkit-airplay="allow" (timeupdate)="noop()" (loadedmetadata)="onLoadedMetadata()" (ended)="onEnded()"></video>
|
|
5144
5723
|
<!-- Subtitles loaded from a file, drawn here at the bottom of the picture, above the controls when they show. -->
|
|
5145
|
-
<div #captionsLayer class="ngxsp-captions" aria-hidden="true"></div>
|
|
5724
|
+
<div #captionsLayer class="ngxsp-captions" [style.--ngxsp-caption-scale]="captionScale" aria-hidden="true"></div>
|
|
5146
5725
|
@if (!isAudioMode) {
|
|
5147
5726
|
<input #subtitleFileInput class="ngxsp-subtitleInput" type="file" accept=".srt,.vtt,text/vtt,application/x-subrip" hidden (change)="onSubtitleFileChosen($event)" />
|
|
5148
5727
|
}
|
|
5149
|
-
@if (isAudioMode) {
|
|
5728
|
+
@if (isAudioMode && showAudioVisual) {
|
|
5150
5729
|
<div class="ngxsp-audio-stage" aria-hidden="true">
|
|
5151
5730
|
<div class="ngxsp-audio-disc"></div>
|
|
5152
5731
|
<div class="ngxsp-audio-copy">
|
|
@@ -5161,6 +5740,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5161
5740
|
}
|
|
5162
5741
|
<ngxsp-player-overlays
|
|
5163
5742
|
[error]="currentError"
|
|
5743
|
+
[labels]="overlayLabels"
|
|
5164
5744
|
[debug]="debug"
|
|
5165
5745
|
[debugJson]="debugJson"
|
|
5166
5746
|
(retry)="reload()"
|
|
@@ -5180,6 +5760,10 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5180
5760
|
|
|
5181
5761
|
@if (uiSkin==='vod') {
|
|
5182
5762
|
<ngxsp-player-controls-vod
|
|
5763
|
+
[speedActionLabel]="playerMenuLabels.speed"
|
|
5764
|
+
[showTracks]="showTrackControls"
|
|
5765
|
+
[showCaptions]="showTrackControls"
|
|
5766
|
+
[showPlaylistModes]="showPlaylistModes"
|
|
5183
5767
|
[playing]="state?.kind==='playing'"
|
|
5184
5768
|
[isAudioMode]="isAudioMode"
|
|
5185
5769
|
[displayTitle]="displayTitle"
|
|
@@ -5210,11 +5794,11 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5210
5794
|
[airPlayActive]="isAirPlayActive()"
|
|
5211
5795
|
[airPlayLabel]="airPlayLabel()"
|
|
5212
5796
|
(airPlay)="openAirPlayPicker()"
|
|
5213
|
-
[showCast]="showCastButton()"
|
|
5797
|
+
[showCast]="showCastButton() && showCastControl"
|
|
5214
5798
|
[castActive]="isCastActive()"
|
|
5215
5799
|
[castLabel]="castLabel()"
|
|
5216
5800
|
[castHint]="castHintLabel()"
|
|
5217
|
-
[pipSupported]="isPiPSupported()"
|
|
5801
|
+
[pipSupported]="isPiPSupported() && showPictureInPicture"
|
|
5218
5802
|
[pipActive]="isPiPActive()"
|
|
5219
5803
|
[pipLabel]="pipLabel()"
|
|
5220
5804
|
[fullscreenLabel]="fullscreenLabel"
|
|
@@ -5244,6 +5828,9 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5244
5828
|
<div ngxsp-player-inline-controls class="ngxsp-inline-projection">
|
|
5245
5829
|
<ng-content select="[ngxsp-player-inline-controls]" />
|
|
5246
5830
|
</div>
|
|
5831
|
+
<div ngxsp-player-inline-trailing class="ngxsp-inline-projection">
|
|
5832
|
+
<ng-content select="[ngxsp-player-inline-trailing]" />
|
|
5833
|
+
</div>
|
|
5247
5834
|
<ngxsp-player-menu
|
|
5248
5835
|
[openMenu]="openMenu"
|
|
5249
5836
|
[isAudioMode]="isAudioMode"
|
|
@@ -5265,6 +5852,8 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5265
5852
|
</ngxsp-player-controls-vod>
|
|
5266
5853
|
} @else if (uiSkin==='edition') {
|
|
5267
5854
|
<ngxsp-player-controls-edition
|
|
5855
|
+
[showTracks]="showTrackControls"
|
|
5856
|
+
[showCaptions]="showTrackControls"
|
|
5268
5857
|
[profile]="sourceProfile"
|
|
5269
5858
|
[playing]="state?.kind==='playing'"
|
|
5270
5859
|
[displayTitle]="displayTitle"
|
|
@@ -5276,9 +5865,9 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5276
5865
|
[airPlayActive]="isAirPlayActive()"
|
|
5277
5866
|
[airPlayLabel]="airPlayLabel()"
|
|
5278
5867
|
(airPlay)="openAirPlayPicker()"
|
|
5279
|
-
[showCast]="showCastButton()"
|
|
5868
|
+
[showCast]="showCastButton() && showCastControl"
|
|
5280
5869
|
[castActive]="isCastActive()"
|
|
5281
|
-
[pipSupported]="isPiPSupported()"
|
|
5870
|
+
[pipSupported]="isPiPSupported() && showPictureInPicture"
|
|
5282
5871
|
[pipActive]="isPiPActive()"
|
|
5283
5872
|
[volume]="volume"
|
|
5284
5873
|
[volumeLabel]="outputVolumeLabel || volumeLabel()"
|
|
@@ -5333,11 +5922,11 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5333
5922
|
[captionsLabel]="captionsLabel()"
|
|
5334
5923
|
[speedLabel]="playbackRateLabel()"
|
|
5335
5924
|
[volumeLabel]="volumeLabel()"
|
|
5336
|
-
[showCast]="showCastButton()"
|
|
5925
|
+
[showCast]="showCastButton() && showCastControl"
|
|
5337
5926
|
[castActive]="isCastActive()"
|
|
5338
5927
|
[castLabel]="castLabel()"
|
|
5339
5928
|
[castHint]="castHintLabel()"
|
|
5340
|
-
[pipSupported]="isPiPSupported()"
|
|
5929
|
+
[pipSupported]="isPiPSupported() && showPictureInPicture"
|
|
5341
5930
|
[pipActive]="isPiPActive()"
|
|
5342
5931
|
[pipLabel]="pipLabel()"
|
|
5343
5932
|
[volume]="volume"
|
|
@@ -5367,7 +5956,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5367
5956
|
</div>
|
|
5368
5957
|
`,
|
|
5369
5958
|
isInline: true,
|
|
5370
|
-
styles: [".ngxsp-root{--ngxsp-bg:#000;--ngxsp-bg-elev:var(--nsp-surface-1, #17181d);--ngxsp-bg-soft:var(--nsp-surface-2, #1e1f25);--ngxsp-border:var(--nsp-line, rgb(255 255 255 / .07));--ngxsp-border-strong:var(--nsp-line-strong, rgb(255 255 255 / .13));--ngxsp-text:var(--nsp-text, #ededf0);--ngxsp-text-dim:var(--nsp-text-2, #a3a5ae);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-accent-soft:rgb(139 144 255 / .14);--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);position:relative;width:100%;height:100%;background:#000;color:var(--ngxsp-text);font-family:var(--nsp-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Ubuntu, sans-serif)}.ngxsp-video{position:relative;width:100%;height:100%;isolation:isolate;container-type:inline-size}.ngxsp-captions{position:absolute;left:6%;right:6%;bottom:5%;z-index:3;display:flex;flex-direction:column;align-items:center;gap:.15em;pointer-events:none;text-align:center;font-size:clamp(13px,2.6cqw,34px);line-height:1.3;transition:bottom .2s ease}.ngxsp-captions:empty{display:none}.ngxsp-ui-visible .ngxsp-captions{bottom:calc(2% + var(--ngxsp-captions-lift, 96px))}.ngxsp-captions ::ng-deep .ngxsp-cue{max-width:100%;padding:.08em .45em;border-radius:.2em;background:#000000bd;color:#fff;white-space:pre-line;text-shadow:0 1px 2px rgb(0 0 0 / .5)}.ngxsp-mode-audio .ngxsp-captions{display:none}.ngxsp-video video{width:100%;height:100%;display:block;background:#000;object-fit:contain}.ngxsp-mode-audio .ngxsp-video video{opacity:.02;filter:blur(10px) saturate(120%);transform:scale(1.08)}.ngxsp-audio-stage{position:absolute;inset:0;z-index:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:40px 24px 140px;background:radial-gradient(circle at 50% 24%,rgba(96,165,250,.22),transparent 30%),radial-gradient(circle at 22% 78%,rgba(45,212,191,.12),transparent 28%),linear-gradient(180deg,#040c18eb,#050a12d1);pointer-events:none;text-align:center}.ngxsp-audio-disc{width:min(32vw,220px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at center,#f8fafce6 0 10%,#0f172aeb 11% 20%,#64748bd9 21% 22%,#0f172afa 23% 100%);box-shadow:0 24px 80px #0f172a80,inset 0 0 0 10px #ffffff0d;animation:ngxspSpin 18s linear infinite}.ngxsp-audio-copy{display:flex;flex-direction:column;gap:6px;max-width:min(76ch,100%)}.ngxsp-audio-eyebrow{font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:#bfdbfecc;font-weight:700}.ngxsp-audio-title{font-size:36px;font-weight:800;letter-spacing:0;color:#f8fbff;text-shadow:0 18px 60px rgba(15,23,42,.6)}.ngxsp-audio-subtitle{font-size:16px;color:#e2e8f0c7}.ngxsp-audio-bars{display:flex;align-items:flex-end;gap:8px;height:40px}.ngxsp-audio-bars span{width:6px;height:16px;border-radius:999px;background:linear-gradient(180deg,#93c5fdf2,#22d3ee8c);animation:ngxspBars 1.15s ease-in-out infinite;box-shadow:0 0 18px #38bdf838}.ngxsp-audio-bars span:nth-child(2){animation-delay:.12s}.ngxsp-audio-bars span:nth-child(3){animation-delay:.24s}.ngxsp-audio-bars span:nth-child(4){animation-delay:.36s}.ngxsp-audio-bars span:nth-child(5){animation-delay:.48s}.ngxsp-skin-vod .ngxsp-video{position:relative}.ngxsp-skin-vod .ngxsp-video:before{content:none}.ngxsp-skin-vod .ngxsp-video:after{content:none}.ngxsp-mode-audio.ngxsp-skin-vod .ngxsp-video:before{background:linear-gradient(180deg,#03081259,#0308121f);opacity:1}.ngxsp-inline-projection{display:inline-flex;flex:0 0 auto;align-items:center;gap:8px;width:max-content}.ngxsp-inline-projection:empty{display:none}.ngxsp-gesturePulse{position:absolute;inset:0;z-index:5;display:grid;place-items:center;pointer-events:none;color:#f8fbff;animation:ngxspGesturePulse .52s ease both}.ngxsp-gesturePulse ngxsp-smart-icon{width:64px;height:64px;padding:18px;box-sizing:border-box;display:grid;place-items:center;border-radius:50%;background:#00000080;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}@media(max-width:640px){.ngxsp-audio-stage{padding:28px 16px 128px;gap:14px}.ngxsp-audio-disc{width:min(48vw,168px)}.ngxsp-audio-title{font-size:28px}.ngxsp-audio-subtitle{font-size:14px}.ngxsp-
|
|
5959
|
+
styles: [".ngxsp-root{--ngxsp-bg:#000;--ngxsp-bg-elev:var(--nsp-surface-1, #17181d);--ngxsp-bg-soft:var(--nsp-surface-2, #1e1f25);--ngxsp-border:var(--nsp-line, rgb(255 255 255 / .07));--ngxsp-border-strong:var(--nsp-line-strong, rgb(255 255 255 / .13));--ngxsp-text:var(--nsp-text, #ededf0);--ngxsp-text-dim:var(--nsp-text-2, #a3a5ae);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-accent-soft:rgb(139 144 255 / .14);--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);position:relative;width:100%;height:100%;background:#000;color:var(--ngxsp-text);font-family:var(--nsp-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Ubuntu, sans-serif)}.ngxsp-video{position:relative;width:100%;height:100%;isolation:isolate;container-type:inline-size}.ngxsp-captions{position:absolute;left:6%;right:6%;bottom:5%;z-index:3;display:flex;flex-direction:column;align-items:center;gap:.15em;pointer-events:none;text-align:center;font-size:calc(clamp(13px,2.6cqw,34px) * var(--ngxsp-caption-scale, 1));line-height:1.3;transition:bottom .2s ease}.ngxsp-captions:empty{display:none}.ngxsp-ui-visible .ngxsp-captions{bottom:calc(2% + var(--ngxsp-captions-lift, 96px))}.ngxsp-captions ::ng-deep .ngxsp-cue{max-width:100%;padding:.08em .45em;border-radius:.2em;background:#000000bd;color:#fff;white-space:pre-line;text-shadow:0 1px 2px rgb(0 0 0 / .5)}.ngxsp-mode-audio .ngxsp-captions{display:none}.ngxsp-video video{width:100%;height:100%;display:block;background:#000;object-fit:contain}.ngxsp-mode-audio .ngxsp-video video{opacity:.02;filter:blur(10px) saturate(120%);transform:scale(1.08)}.ngxsp-audio-stage{position:absolute;inset:0;z-index:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:40px 24px 140px;background:radial-gradient(circle at 50% 24%,rgba(96,165,250,.22),transparent 30%),radial-gradient(circle at 22% 78%,rgba(45,212,191,.12),transparent 28%),linear-gradient(180deg,#040c18eb,#050a12d1);pointer-events:none;text-align:center}.ngxsp-audio-disc{width:min(32vw,220px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at center,#f8fafce6 0 10%,#0f172aeb 11% 20%,#64748bd9 21% 22%,#0f172afa 23% 100%);box-shadow:0 24px 80px #0f172a80,inset 0 0 0 10px #ffffff0d;animation:ngxspSpin 18s linear infinite}.ngxsp-audio-copy{display:flex;flex-direction:column;gap:6px;max-width:min(76ch,100%)}.ngxsp-audio-eyebrow{font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:#bfdbfecc;font-weight:700}.ngxsp-audio-title{font-size:36px;font-weight:800;letter-spacing:0;color:#f8fbff;text-shadow:0 18px 60px rgba(15,23,42,.6)}.ngxsp-audio-subtitle{font-size:16px;color:#e2e8f0c7}.ngxsp-audio-bars{display:flex;align-items:flex-end;gap:8px;height:40px}.ngxsp-audio-bars span{width:6px;height:16px;border-radius:999px;background:linear-gradient(180deg,#93c5fdf2,#22d3ee8c);animation:ngxspBars 1.15s ease-in-out infinite;box-shadow:0 0 18px #38bdf838}.ngxsp-audio-bars span:nth-child(2){animation-delay:.12s}.ngxsp-audio-bars span:nth-child(3){animation-delay:.24s}.ngxsp-audio-bars span:nth-child(4){animation-delay:.36s}.ngxsp-audio-bars span:nth-child(5){animation-delay:.48s}.ngxsp-skin-vod .ngxsp-video{position:relative}.ngxsp-skin-vod .ngxsp-video:before{content:none}.ngxsp-skin-vod .ngxsp-video:after{content:none}.ngxsp-mode-audio.ngxsp-skin-vod .ngxsp-video:before{background:linear-gradient(180deg,#03081259,#0308121f);opacity:1}.ngxsp-inline-projection{display:inline-flex;flex:0 0 auto;align-items:center;gap:8px;width:max-content}.ngxsp-inline-projection:empty{display:none}.ngxsp-gesturePulse{position:absolute;inset:0;z-index:5;display:grid;place-items:center;pointer-events:none;color:#f8fbff;animation:ngxspGesturePulse .52s ease both}.ngxsp-gesturePulse ngxsp-smart-icon{width:64px;height:64px;padding:18px;box-sizing:border-box;display:grid;place-items:center;border-radius:50%;background:#00000080;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}@media(max-width:640px){.ngxsp-audio-stage{padding:28px 16px 128px;gap:14px}.ngxsp-audio-disc{width:min(48vw,168px)}.ngxsp-audio-title{font-size:28px}.ngxsp-audio-subtitle{font-size:14px}.ngxsp-gesturePulse ngxsp-smart-icon{width:64px;height:64px}}@keyframes ngxspSpin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes ngxspBars{0%,to{height:14px;opacity:.45}50%{height:40px;opacity:1}}@keyframes ngxspGesturePulse{0%{opacity:0;transform:scale(.82)}24%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.16)}}\n"],
|
|
5371
5960
|
dependencies: [
|
|
5372
5961
|
{
|
|
5373
5962
|
kind: "ngmodule",
|
|
@@ -5405,7 +5994,8 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5405
5994
|
inputs: [
|
|
5406
5995
|
"error",
|
|
5407
5996
|
"debug",
|
|
5408
|
-
"debugJson"
|
|
5997
|
+
"debugJson",
|
|
5998
|
+
"labels"
|
|
5409
5999
|
],
|
|
5410
6000
|
outputs: [
|
|
5411
6001
|
"retry",
|
|
@@ -5482,6 +6072,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5482
6072
|
"statusLabel",
|
|
5483
6073
|
"keyboardHint",
|
|
5484
6074
|
"hasPlaylistControls",
|
|
6075
|
+
"showPlaylistModes",
|
|
5485
6076
|
"canPrev",
|
|
5486
6077
|
"canNext",
|
|
5487
6078
|
"previousLabel",
|
|
@@ -5496,9 +6087,12 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5496
6087
|
"tracksLabel",
|
|
5497
6088
|
"captionsLabel",
|
|
5498
6089
|
"speedLabel",
|
|
6090
|
+
"speedActionLabel",
|
|
5499
6091
|
"volumeLabel",
|
|
5500
6092
|
"muteLabel",
|
|
5501
6093
|
"unmuteLabel",
|
|
6094
|
+
"showTracks",
|
|
6095
|
+
"showCaptions",
|
|
5502
6096
|
"showAirPlay",
|
|
5503
6097
|
"airPlayActive",
|
|
5504
6098
|
"airPlayLabel",
|
|
@@ -5550,6 +6144,8 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5550
6144
|
"behindSec",
|
|
5551
6145
|
"liveLabel",
|
|
5552
6146
|
"captionsActive",
|
|
6147
|
+
"showTracks",
|
|
6148
|
+
"showCaptions",
|
|
5553
6149
|
"speedLabel",
|
|
5554
6150
|
"showAirPlay",
|
|
5555
6151
|
"airPlayActive",
|
|
@@ -5592,7 +6188,7 @@ var SmartPlayerComponent = class SmartPlayerComponent {
|
|
|
5592
6188
|
};
|
|
5593
6189
|
i0.ɵɵngDeclareClassMetadata({
|
|
5594
6190
|
minVersion: "12.0.0",
|
|
5595
|
-
version: "22.
|
|
6191
|
+
version: "22.3.0",
|
|
5596
6192
|
ngImport: i0,
|
|
5597
6193
|
type: SmartPlayerComponent,
|
|
5598
6194
|
decorators: [{
|
|
@@ -5618,11 +6214,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5618
6214
|
<div class="ngxsp-video" (dblclick)="onPrimarySurfaceDoubleClick()" (mousemove)="onInteraction()" (mouseenter)="onInteraction()" (mouseleave)="onPointerLeave()" (focusin)="onInteraction()" (touchstart)="onInteraction(true)" (click)="onRootClick($event)">
|
|
5619
6215
|
<video #video playsinline x-webkit-airplay="allow" (timeupdate)="noop()" (loadedmetadata)="onLoadedMetadata()" (ended)="onEnded()"></video>
|
|
5620
6216
|
<!-- Subtitles loaded from a file, drawn here at the bottom of the picture, above the controls when they show. -->
|
|
5621
|
-
<div #captionsLayer class="ngxsp-captions" aria-hidden="true"></div>
|
|
6217
|
+
<div #captionsLayer class="ngxsp-captions" [style.--ngxsp-caption-scale]="captionScale" aria-hidden="true"></div>
|
|
5622
6218
|
@if (!isAudioMode) {
|
|
5623
6219
|
<input #subtitleFileInput class="ngxsp-subtitleInput" type="file" accept=".srt,.vtt,text/vtt,application/x-subrip" hidden (change)="onSubtitleFileChosen($event)" />
|
|
5624
6220
|
}
|
|
5625
|
-
@if (isAudioMode) {
|
|
6221
|
+
@if (isAudioMode && showAudioVisual) {
|
|
5626
6222
|
<div class="ngxsp-audio-stage" aria-hidden="true">
|
|
5627
6223
|
<div class="ngxsp-audio-disc"></div>
|
|
5628
6224
|
<div class="ngxsp-audio-copy">
|
|
@@ -5637,6 +6233,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5637
6233
|
}
|
|
5638
6234
|
<ngxsp-player-overlays
|
|
5639
6235
|
[error]="currentError"
|
|
6236
|
+
[labels]="overlayLabels"
|
|
5640
6237
|
[debug]="debug"
|
|
5641
6238
|
[debugJson]="debugJson"
|
|
5642
6239
|
(retry)="reload()"
|
|
@@ -5656,6 +6253,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5656
6253
|
|
|
5657
6254
|
@if (uiSkin==='vod') {
|
|
5658
6255
|
<ngxsp-player-controls-vod
|
|
6256
|
+
[speedActionLabel]="playerMenuLabels.speed"
|
|
6257
|
+
[showTracks]="showTrackControls"
|
|
6258
|
+
[showCaptions]="showTrackControls"
|
|
6259
|
+
[showPlaylistModes]="showPlaylistModes"
|
|
5659
6260
|
[playing]="state?.kind==='playing'"
|
|
5660
6261
|
[isAudioMode]="isAudioMode"
|
|
5661
6262
|
[displayTitle]="displayTitle"
|
|
@@ -5686,11 +6287,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5686
6287
|
[airPlayActive]="isAirPlayActive()"
|
|
5687
6288
|
[airPlayLabel]="airPlayLabel()"
|
|
5688
6289
|
(airPlay)="openAirPlayPicker()"
|
|
5689
|
-
[showCast]="showCastButton()"
|
|
6290
|
+
[showCast]="showCastButton() && showCastControl"
|
|
5690
6291
|
[castActive]="isCastActive()"
|
|
5691
6292
|
[castLabel]="castLabel()"
|
|
5692
6293
|
[castHint]="castHintLabel()"
|
|
5693
|
-
[pipSupported]="isPiPSupported()"
|
|
6294
|
+
[pipSupported]="isPiPSupported() && showPictureInPicture"
|
|
5694
6295
|
[pipActive]="isPiPActive()"
|
|
5695
6296
|
[pipLabel]="pipLabel()"
|
|
5696
6297
|
[fullscreenLabel]="fullscreenLabel"
|
|
@@ -5720,6 +6321,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5720
6321
|
<div ngxsp-player-inline-controls class="ngxsp-inline-projection">
|
|
5721
6322
|
<ng-content select="[ngxsp-player-inline-controls]" />
|
|
5722
6323
|
</div>
|
|
6324
|
+
<div ngxsp-player-inline-trailing class="ngxsp-inline-projection">
|
|
6325
|
+
<ng-content select="[ngxsp-player-inline-trailing]" />
|
|
6326
|
+
</div>
|
|
5723
6327
|
<ngxsp-player-menu
|
|
5724
6328
|
[openMenu]="openMenu"
|
|
5725
6329
|
[isAudioMode]="isAudioMode"
|
|
@@ -5741,6 +6345,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5741
6345
|
</ngxsp-player-controls-vod>
|
|
5742
6346
|
} @else if (uiSkin==='edition') {
|
|
5743
6347
|
<ngxsp-player-controls-edition
|
|
6348
|
+
[showTracks]="showTrackControls"
|
|
6349
|
+
[showCaptions]="showTrackControls"
|
|
5744
6350
|
[profile]="sourceProfile"
|
|
5745
6351
|
[playing]="state?.kind==='playing'"
|
|
5746
6352
|
[displayTitle]="displayTitle"
|
|
@@ -5752,9 +6358,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5752
6358
|
[airPlayActive]="isAirPlayActive()"
|
|
5753
6359
|
[airPlayLabel]="airPlayLabel()"
|
|
5754
6360
|
(airPlay)="openAirPlayPicker()"
|
|
5755
|
-
[showCast]="showCastButton()"
|
|
6361
|
+
[showCast]="showCastButton() && showCastControl"
|
|
5756
6362
|
[castActive]="isCastActive()"
|
|
5757
|
-
[pipSupported]="isPiPSupported()"
|
|
6363
|
+
[pipSupported]="isPiPSupported() && showPictureInPicture"
|
|
5758
6364
|
[pipActive]="isPiPActive()"
|
|
5759
6365
|
[volume]="volume"
|
|
5760
6366
|
[volumeLabel]="outputVolumeLabel || volumeLabel()"
|
|
@@ -5809,11 +6415,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5809
6415
|
[captionsLabel]="captionsLabel()"
|
|
5810
6416
|
[speedLabel]="playbackRateLabel()"
|
|
5811
6417
|
[volumeLabel]="volumeLabel()"
|
|
5812
|
-
[showCast]="showCastButton()"
|
|
6418
|
+
[showCast]="showCastButton() && showCastControl"
|
|
5813
6419
|
[castActive]="isCastActive()"
|
|
5814
6420
|
[castLabel]="castLabel()"
|
|
5815
6421
|
[castHint]="castHintLabel()"
|
|
5816
|
-
[pipSupported]="isPiPSupported()"
|
|
6422
|
+
[pipSupported]="isPiPSupported() && showPictureInPicture"
|
|
5817
6423
|
[pipActive]="isPiPActive()"
|
|
5818
6424
|
[pipLabel]="pipLabel()"
|
|
5819
6425
|
[volume]="volume"
|
|
@@ -5843,7 +6449,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5843
6449
|
</div>
|
|
5844
6450
|
`,
|
|
5845
6451
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5846
|
-
styles: [".ngxsp-root{--ngxsp-bg:#000;--ngxsp-bg-elev:var(--nsp-surface-1, #17181d);--ngxsp-bg-soft:var(--nsp-surface-2, #1e1f25);--ngxsp-border:var(--nsp-line, rgb(255 255 255 / .07));--ngxsp-border-strong:var(--nsp-line-strong, rgb(255 255 255 / .13));--ngxsp-text:var(--nsp-text, #ededf0);--ngxsp-text-dim:var(--nsp-text-2, #a3a5ae);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-accent-soft:rgb(139 144 255 / .14);--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);position:relative;width:100%;height:100%;background:#000;color:var(--ngxsp-text);font-family:var(--nsp-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Ubuntu, sans-serif)}.ngxsp-video{position:relative;width:100%;height:100%;isolation:isolate;container-type:inline-size}.ngxsp-captions{position:absolute;left:6%;right:6%;bottom:5%;z-index:3;display:flex;flex-direction:column;align-items:center;gap:.15em;pointer-events:none;text-align:center;font-size:clamp(13px,2.6cqw,34px);line-height:1.3;transition:bottom .2s ease}.ngxsp-captions:empty{display:none}.ngxsp-ui-visible .ngxsp-captions{bottom:calc(2% + var(--ngxsp-captions-lift, 96px))}.ngxsp-captions ::ng-deep .ngxsp-cue{max-width:100%;padding:.08em .45em;border-radius:.2em;background:#000000bd;color:#fff;white-space:pre-line;text-shadow:0 1px 2px rgb(0 0 0 / .5)}.ngxsp-mode-audio .ngxsp-captions{display:none}.ngxsp-video video{width:100%;height:100%;display:block;background:#000;object-fit:contain}.ngxsp-mode-audio .ngxsp-video video{opacity:.02;filter:blur(10px) saturate(120%);transform:scale(1.08)}.ngxsp-audio-stage{position:absolute;inset:0;z-index:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:40px 24px 140px;background:radial-gradient(circle at 50% 24%,rgba(96,165,250,.22),transparent 30%),radial-gradient(circle at 22% 78%,rgba(45,212,191,.12),transparent 28%),linear-gradient(180deg,#040c18eb,#050a12d1);pointer-events:none;text-align:center}.ngxsp-audio-disc{width:min(32vw,220px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at center,#f8fafce6 0 10%,#0f172aeb 11% 20%,#64748bd9 21% 22%,#0f172afa 23% 100%);box-shadow:0 24px 80px #0f172a80,inset 0 0 0 10px #ffffff0d;animation:ngxspSpin 18s linear infinite}.ngxsp-audio-copy{display:flex;flex-direction:column;gap:6px;max-width:min(76ch,100%)}.ngxsp-audio-eyebrow{font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:#bfdbfecc;font-weight:700}.ngxsp-audio-title{font-size:36px;font-weight:800;letter-spacing:0;color:#f8fbff;text-shadow:0 18px 60px rgba(15,23,42,.6)}.ngxsp-audio-subtitle{font-size:16px;color:#e2e8f0c7}.ngxsp-audio-bars{display:flex;align-items:flex-end;gap:8px;height:40px}.ngxsp-audio-bars span{width:6px;height:16px;border-radius:999px;background:linear-gradient(180deg,#93c5fdf2,#22d3ee8c);animation:ngxspBars 1.15s ease-in-out infinite;box-shadow:0 0 18px #38bdf838}.ngxsp-audio-bars span:nth-child(2){animation-delay:.12s}.ngxsp-audio-bars span:nth-child(3){animation-delay:.24s}.ngxsp-audio-bars span:nth-child(4){animation-delay:.36s}.ngxsp-audio-bars span:nth-child(5){animation-delay:.48s}.ngxsp-skin-vod .ngxsp-video{position:relative}.ngxsp-skin-vod .ngxsp-video:before{content:none}.ngxsp-skin-vod .ngxsp-video:after{content:none}.ngxsp-mode-audio.ngxsp-skin-vod .ngxsp-video:before{background:linear-gradient(180deg,#03081259,#0308121f);opacity:1}.ngxsp-inline-projection{display:inline-flex;flex:0 0 auto;align-items:center;gap:8px;width:max-content}.ngxsp-inline-projection:empty{display:none}.ngxsp-gesturePulse{position:absolute;inset:0;z-index:5;display:grid;place-items:center;pointer-events:none;color:#f8fbff;animation:ngxspGesturePulse .52s ease both}.ngxsp-gesturePulse ngxsp-smart-icon{width:64px;height:64px;padding:18px;box-sizing:border-box;display:grid;place-items:center;border-radius:50%;background:#00000080;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}@media(max-width:640px){.ngxsp-audio-stage{padding:28px 16px 128px;gap:14px}.ngxsp-audio-disc{width:min(48vw,168px)}.ngxsp-audio-title{font-size:28px}.ngxsp-audio-subtitle{font-size:14px}.ngxsp-
|
|
6452
|
+
styles: [".ngxsp-root{--ngxsp-bg:#000;--ngxsp-bg-elev:var(--nsp-surface-1, #17181d);--ngxsp-bg-soft:var(--nsp-surface-2, #1e1f25);--ngxsp-border:var(--nsp-line, rgb(255 255 255 / .07));--ngxsp-border-strong:var(--nsp-line-strong, rgb(255 255 255 / .13));--ngxsp-text:var(--nsp-text, #ededf0);--ngxsp-text-dim:var(--nsp-text-2, #a3a5ae);--ngxsp-accent:var(--nsp-media-accent, #8b90ff);--ngxsp-accent-soft:rgb(139 144 255 / .14);--ngxsp-focus-ring:0 0 0 2px var(--nsp-media-accent, #8b90ff);position:relative;width:100%;height:100%;background:#000;color:var(--ngxsp-text);font-family:var(--nsp-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Ubuntu, sans-serif)}.ngxsp-video{position:relative;width:100%;height:100%;isolation:isolate;container-type:inline-size}.ngxsp-captions{position:absolute;left:6%;right:6%;bottom:5%;z-index:3;display:flex;flex-direction:column;align-items:center;gap:.15em;pointer-events:none;text-align:center;font-size:calc(clamp(13px,2.6cqw,34px) * var(--ngxsp-caption-scale, 1));line-height:1.3;transition:bottom .2s ease}.ngxsp-captions:empty{display:none}.ngxsp-ui-visible .ngxsp-captions{bottom:calc(2% + var(--ngxsp-captions-lift, 96px))}.ngxsp-captions ::ng-deep .ngxsp-cue{max-width:100%;padding:.08em .45em;border-radius:.2em;background:#000000bd;color:#fff;white-space:pre-line;text-shadow:0 1px 2px rgb(0 0 0 / .5)}.ngxsp-mode-audio .ngxsp-captions{display:none}.ngxsp-video video{width:100%;height:100%;display:block;background:#000;object-fit:contain}.ngxsp-mode-audio .ngxsp-video video{opacity:.02;filter:blur(10px) saturate(120%);transform:scale(1.08)}.ngxsp-audio-stage{position:absolute;inset:0;z-index:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:40px 24px 140px;background:radial-gradient(circle at 50% 24%,rgba(96,165,250,.22),transparent 30%),radial-gradient(circle at 22% 78%,rgba(45,212,191,.12),transparent 28%),linear-gradient(180deg,#040c18eb,#050a12d1);pointer-events:none;text-align:center}.ngxsp-audio-disc{width:min(32vw,220px);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at center,#f8fafce6 0 10%,#0f172aeb 11% 20%,#64748bd9 21% 22%,#0f172afa 23% 100%);box-shadow:0 24px 80px #0f172a80,inset 0 0 0 10px #ffffff0d;animation:ngxspSpin 18s linear infinite}.ngxsp-audio-copy{display:flex;flex-direction:column;gap:6px;max-width:min(76ch,100%)}.ngxsp-audio-eyebrow{font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:#bfdbfecc;font-weight:700}.ngxsp-audio-title{font-size:36px;font-weight:800;letter-spacing:0;color:#f8fbff;text-shadow:0 18px 60px rgba(15,23,42,.6)}.ngxsp-audio-subtitle{font-size:16px;color:#e2e8f0c7}.ngxsp-audio-bars{display:flex;align-items:flex-end;gap:8px;height:40px}.ngxsp-audio-bars span{width:6px;height:16px;border-radius:999px;background:linear-gradient(180deg,#93c5fdf2,#22d3ee8c);animation:ngxspBars 1.15s ease-in-out infinite;box-shadow:0 0 18px #38bdf838}.ngxsp-audio-bars span:nth-child(2){animation-delay:.12s}.ngxsp-audio-bars span:nth-child(3){animation-delay:.24s}.ngxsp-audio-bars span:nth-child(4){animation-delay:.36s}.ngxsp-audio-bars span:nth-child(5){animation-delay:.48s}.ngxsp-skin-vod .ngxsp-video{position:relative}.ngxsp-skin-vod .ngxsp-video:before{content:none}.ngxsp-skin-vod .ngxsp-video:after{content:none}.ngxsp-mode-audio.ngxsp-skin-vod .ngxsp-video:before{background:linear-gradient(180deg,#03081259,#0308121f);opacity:1}.ngxsp-inline-projection{display:inline-flex;flex:0 0 auto;align-items:center;gap:8px;width:max-content}.ngxsp-inline-projection:empty{display:none}.ngxsp-gesturePulse{position:absolute;inset:0;z-index:5;display:grid;place-items:center;pointer-events:none;color:#f8fbff;animation:ngxspGesturePulse .52s ease both}.ngxsp-gesturePulse ngxsp-smart-icon{width:64px;height:64px;padding:18px;box-sizing:border-box;display:grid;place-items:center;border-radius:50%;background:#00000080;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}@media(max-width:640px){.ngxsp-audio-stage{padding:28px 16px 128px;gap:14px}.ngxsp-audio-disc{width:min(48vw,168px)}.ngxsp-audio-title{font-size:28px}.ngxsp-audio-subtitle{font-size:14px}.ngxsp-gesturePulse ngxsp-smart-icon{width:64px;height:64px}}@keyframes ngxspSpin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes ngxspBars{0%,to{height:14px;opacity:.45}50%{height:40px;opacity:1}}@keyframes ngxspGesturePulse{0%{opacity:0;transform:scale(.82)}24%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.16)}}\n"]
|
|
5847
6453
|
}]
|
|
5848
6454
|
}],
|
|
5849
6455
|
propDecorators: {
|
|
@@ -5855,6 +6461,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5855
6461
|
ports: [{ type: Input }],
|
|
5856
6462
|
engines: [{ type: Input }],
|
|
5857
6463
|
debug: [{ type: Input }],
|
|
6464
|
+
handlingFailure: [{ type: Input }],
|
|
5858
6465
|
startTimeSec: [{ type: Input }],
|
|
5859
6466
|
autoplayOnInit: [{ type: Input }],
|
|
5860
6467
|
playRequest: [{ type: Input }],
|
|
@@ -5869,9 +6476,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5869
6476
|
repeatMode: [{ type: Input }],
|
|
5870
6477
|
repeatLabel: [{ type: Input }],
|
|
5871
6478
|
hasPlaylistControls: [{ type: Input }],
|
|
6479
|
+
showCastControl: [{ type: Input }],
|
|
6480
|
+
showPictureInPicture: [{ type: Input }],
|
|
6481
|
+
showPlaylistModes: [{ type: Input }],
|
|
5872
6482
|
mediaMode: [{ type: Input }],
|
|
5873
6483
|
castEnabled: [{ type: Input }],
|
|
5874
6484
|
castConnected: [{ type: Input }],
|
|
6485
|
+
overlayLabels: [{ type: Input }],
|
|
5875
6486
|
documentShortcuts: [{ type: Input }],
|
|
5876
6487
|
nowPlayingLabel: [{ type: Input }],
|
|
5877
6488
|
nowListeningLabel: [{ type: Input }],
|
|
@@ -5892,14 +6503,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5892
6503
|
timelineMarkers: [{ type: Input }],
|
|
5893
6504
|
ended: [{ type: Output }],
|
|
5894
6505
|
videoSize: [{ type: Output }],
|
|
6506
|
+
showAudioVisual: [{ type: Input }],
|
|
5895
6507
|
progress: [{ type: Output }],
|
|
5896
6508
|
prev: [{ type: Output }],
|
|
5897
6509
|
next: [{ type: Output }],
|
|
5898
6510
|
toggleShuffle: [{ type: Output }],
|
|
5899
6511
|
cycleRepeat: [{ type: Output }],
|
|
6512
|
+
showTrackControls: [{ type: Input }],
|
|
5900
6513
|
subtitles: [{ type: Output }],
|
|
5901
6514
|
subtitlesLoaded: [{ type: Output }],
|
|
5902
6515
|
menuLabels: [{ type: Input }],
|
|
6516
|
+
castLabels: [{ type: Input }],
|
|
5903
6517
|
cast: [{ type: Output }],
|
|
5904
6518
|
stateChange: [{ type: Output }],
|
|
5905
6519
|
playbackToggle: [{ type: Output }],
|
|
@@ -5916,6 +6530,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5916
6530
|
type: ViewChild,
|
|
5917
6531
|
args: ["subtitleFileInput"]
|
|
5918
6532
|
}],
|
|
6533
|
+
holdControls: [{ type: Input }],
|
|
6534
|
+
preferredTextLanguage: [{ type: Input }],
|
|
6535
|
+
captionScale: [{ type: Input }],
|
|
6536
|
+
loadSidecarSubtitles: [{ type: Input }],
|
|
5919
6537
|
onEscape: [{
|
|
5920
6538
|
type: HostListener,
|
|
5921
6539
|
args: ["document:keydown.escape"]
|
|
@@ -5926,6 +6544,54 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5926
6544
|
}]
|
|
5927
6545
|
}
|
|
5928
6546
|
});
|
|
6547
|
+
var SmartAudioOutputsService = class SmartAudioOutputsService {
|
|
6548
|
+
outputs = signal([], ...ngDevMode ? [{ debugName: "outputs" }] : /* istanbul ignore next */ []);
|
|
6549
|
+
available = typeof navigator !== "undefined" && !!navigator.mediaDevices?.enumerateDevices;
|
|
6550
|
+
constructor() {
|
|
6551
|
+
if (!this.available) return;
|
|
6552
|
+
this.refresh();
|
|
6553
|
+
navigator.mediaDevices.addEventListener("devicechange", () => void this.refresh());
|
|
6554
|
+
}
|
|
6555
|
+
async refresh() {
|
|
6556
|
+
if (!this.available) return;
|
|
6557
|
+
try {
|
|
6558
|
+
const outputs = (await navigator.mediaDevices.enumerateDevices()).filter((device) => device.kind === "audiooutput");
|
|
6559
|
+
this.outputs.set(outputs.map((device, index) => ({
|
|
6560
|
+
id: device.deviceId,
|
|
6561
|
+
label: device.label.trim(),
|
|
6562
|
+
isDefault: device.deviceId === "default" || index === 0 && !outputs.some((entry) => entry.deviceId === "default")
|
|
6563
|
+
})));
|
|
6564
|
+
} catch {
|
|
6565
|
+
this.outputs.set([]);
|
|
6566
|
+
}
|
|
6567
|
+
}
|
|
6568
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
6569
|
+
minVersion: "12.0.0",
|
|
6570
|
+
version: "22.3.0",
|
|
6571
|
+
ngImport: i0,
|
|
6572
|
+
type: SmartAudioOutputsService,
|
|
6573
|
+
deps: [],
|
|
6574
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
6575
|
+
});
|
|
6576
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
6577
|
+
minVersion: "12.0.0",
|
|
6578
|
+
version: "22.3.0",
|
|
6579
|
+
ngImport: i0,
|
|
6580
|
+
type: SmartAudioOutputsService,
|
|
6581
|
+
providedIn: "root"
|
|
6582
|
+
});
|
|
6583
|
+
};
|
|
6584
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
6585
|
+
minVersion: "12.0.0",
|
|
6586
|
+
version: "22.3.0",
|
|
6587
|
+
ngImport: i0,
|
|
6588
|
+
type: SmartAudioOutputsService,
|
|
6589
|
+
decorators: [{
|
|
6590
|
+
type: Injectable,
|
|
6591
|
+
args: [{ providedIn: "root" }]
|
|
6592
|
+
}],
|
|
6593
|
+
ctorParameters: () => []
|
|
6594
|
+
});
|
|
5929
6595
|
const SMART_PLAYER_SUBTITLE_PROVIDERS = new InjectionToken("SMART_PLAYER_SUBTITLE_PROVIDERS", { factory: () => [] });
|
|
5930
6596
|
const SMART_PLAYER_METADATA_PROVIDERS = new InjectionToken("SMART_PLAYER_METADATA_PROVIDERS", { factory: () => [] });
|
|
5931
6597
|
function provideSmartPlayer(cfg) {
|
|
@@ -5937,6 +6603,6 @@ function provideSmartPlayer(cfg) {
|
|
|
5937
6603
|
useValue: cfg.metadataProviders ?? []
|
|
5938
6604
|
}]);
|
|
5939
6605
|
}
|
|
5940
|
-
export { DEFAULT_PLAYER_MENU_LABELS, PlayerControlsComponent, PlayerControlsEditionComponent, PlayerControlsVodComponent, SMART_PLAYER_METADATA_PROVIDERS, SMART_PLAYER_SUBTITLE_PROVIDERS, SmartConfirmDialogComponent, SmartPlayerComponent, SmartPlayerIconComponent, SmartSettingsComponent, provideSmartPlayer };
|
|
6606
|
+
export { DEFAULT_CAST_LABELS, DEFAULT_PLAYER_MENU_LABELS, DEFAULT_PLAYER_OVERLAY_LABELS, PlayerControlsComponent, PlayerControlsEditionComponent, PlayerControlsVodComponent, SMART_PLAYER_METADATA_PROVIDERS, SMART_PLAYER_SUBTITLE_PROVIDERS, SmartAudioOutputsService, SmartConfirmDialogComponent, SmartEmptyPageComponent, SmartNotificationsComponent, SmartPlayerComponent, SmartPlayerIconComponent, SmartSettingsComponent, provideSmartPlayer };
|
|
5941
6607
|
|
|
5942
6608
|
//# sourceMappingURL=ngxsplayer-ngx-smart-player.mjs.map
|