@livepeer-frameworks/player-wc 0.1.9 → 0.2.2
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.
- package/dist/esm/components/controls/fw-fullscreen-button.js +76 -0
- package/dist/esm/components/controls/fw-fullscreen-button.js.map +1 -0
- package/dist/esm/components/controls/fw-live-badge.js +109 -0
- package/dist/esm/components/controls/fw-live-badge.js.map +1 -0
- package/dist/esm/components/controls/fw-play-button.js +76 -0
- package/dist/esm/components/controls/fw-play-button.js.map +1 -0
- package/dist/esm/components/controls/fw-skip-button.js +62 -0
- package/dist/esm/components/controls/fw-skip-button.js.map +1 -0
- package/dist/esm/components/controls/fw-time-display.js +77 -0
- package/dist/esm/components/controls/fw-time-display.js.map +1 -0
- package/dist/esm/components/controls/fw-volume-control.js +76 -0
- package/dist/esm/components/controls/fw-volume-control.js.map +1 -0
- package/dist/esm/components/fw-dev-mode-panel.js +11 -15
- package/dist/esm/components/fw-dev-mode-panel.js.map +1 -1
- package/dist/esm/components/fw-error-overlay.js +13 -5
- package/dist/esm/components/fw-error-overlay.js.map +1 -1
- package/dist/esm/components/fw-idle-screen.js +10 -2
- package/dist/esm/components/fw-idle-screen.js.map +1 -1
- package/dist/esm/components/fw-loading-screen.js +89 -42
- package/dist/esm/components/fw-loading-screen.js.map +1 -1
- package/dist/esm/components/fw-loading-spinner.js +20 -9
- package/dist/esm/components/fw-loading-spinner.js.map +1 -1
- package/dist/esm/components/fw-player-controls.js +18 -13
- package/dist/esm/components/fw-player-controls.js.map +1 -1
- package/dist/esm/components/fw-player.js +165 -59
- package/dist/esm/components/fw-player.js.map +1 -1
- package/dist/esm/components/fw-settings-menu.js +44 -9
- package/dist/esm/components/fw-settings-menu.js.map +1 -1
- package/dist/esm/components/fw-stream-state-overlay.js +13 -5
- package/dist/esm/components/fw-stream-state-overlay.js.map +1 -1
- package/dist/esm/components/fw-toast.js +11 -1
- package/dist/esm/components/fw-toast.js.map +1 -1
- package/dist/esm/components/fw-volume-control.js +13 -3
- package/dist/esm/components/fw-volume-control.js.map +1 -1
- package/dist/esm/controllers/player-controller-host.js +14 -1
- package/dist/esm/controllers/player-controller-host.js.map +1 -1
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/styles/shared-styles.js +401 -304
- package/dist/esm/styles/shared-styles.js.map +1 -1
- package/dist/fw-player.iife.js +707 -488
- package/dist/types/components/controls/fw-fullscreen-button.d.ts +18 -0
- package/dist/types/components/controls/fw-live-badge.d.ts +19 -0
- package/dist/types/components/controls/fw-play-button.d.ts +18 -0
- package/dist/types/components/controls/fw-skip-button.d.ts +17 -0
- package/dist/types/components/controls/fw-time-display.d.ts +17 -0
- package/dist/types/components/controls/fw-volume-control.d.ts +18 -0
- package/dist/types/components/controls/index.d.ts +6 -0
- package/dist/types/components/fw-dev-mode-panel.d.ts +1 -1
- package/dist/types/components/fw-error-overlay.d.ts +4 -0
- package/dist/types/components/fw-idle-screen.d.ts +4 -0
- package/dist/types/components/fw-loading-screen.d.ts +5 -1
- package/dist/types/components/fw-loading-spinner.d.ts +4 -0
- package/dist/types/components/fw-player-controls.d.ts +2 -1
- package/dist/types/components/fw-player.d.ts +10 -1
- package/dist/types/components/fw-settings-menu.d.ts +3 -1
- package/dist/types/components/fw-stream-state-overlay.d.ts +4 -0
- package/dist/types/components/fw-toast.d.ts +4 -0
- package/dist/types/controllers/player-controller-host.d.ts +7 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +22 -25
- package/src/components/controls/fw-fullscreen-button.ts +75 -0
- package/src/components/controls/fw-live-badge.ts +109 -0
- package/src/components/controls/fw-play-button.ts +75 -0
- package/src/components/controls/fw-skip-button.ts +59 -0
- package/src/components/controls/fw-time-display.ts +74 -0
- package/src/components/controls/fw-volume-control.ts +75 -0
- package/src/components/controls/index.ts +6 -0
- package/src/components/fw-dev-mode-panel.ts +10 -17
- package/src/components/fw-error-overlay.ts +13 -5
- package/src/components/fw-idle-screen.ts +10 -2
- package/src/components/fw-loading-screen.ts +90 -46
- package/src/components/fw-loading-spinner.ts +18 -9
- package/src/components/fw-player-controls.ts +17 -13
- package/src/components/fw-player.ts +166 -64
- package/src/components/fw-settings-menu.ts +49 -9
- package/src/components/fw-stream-state-overlay.ts +13 -5
- package/src/components/fw-toast.ts +11 -1
- package/src/components/fw-volume-control.ts +14 -3
- package/src/controllers/player-controller-host.ts +18 -0
- package/src/index.ts +10 -0
- package/src/styles/shared-styles.ts +401 -304
- package/LICENSE.md +0 -24
- package/dist/cjs/components/fw-context-menu.js +0 -17
- package/dist/cjs/components/fw-context-menu.js.map +0 -1
- package/dist/cjs/components/fw-dev-mode-panel.js +0 -907
- package/dist/cjs/components/fw-dev-mode-panel.js.map +0 -1
- package/dist/cjs/components/fw-dvd-logo.js +0 -211
- package/dist/cjs/components/fw-dvd-logo.js.map +0 -1
- package/dist/cjs/components/fw-error-overlay.js +0 -101
- package/dist/cjs/components/fw-error-overlay.js.map +0 -1
- package/dist/cjs/components/fw-idle-screen.js +0 -726
- package/dist/cjs/components/fw-idle-screen.js.map +0 -1
- package/dist/cjs/components/fw-loading-screen.js +0 -513
- package/dist/cjs/components/fw-loading-screen.js.map +0 -1
- package/dist/cjs/components/fw-loading-spinner.js +0 -62
- package/dist/cjs/components/fw-loading-spinner.js.map +0 -1
- package/dist/cjs/components/fw-player-controls.js +0 -451
- package/dist/cjs/components/fw-player-controls.js.map +0 -1
- package/dist/cjs/components/fw-player.js +0 -832
- package/dist/cjs/components/fw-player.js.map +0 -1
- package/dist/cjs/components/fw-seek-bar.js +0 -383
- package/dist/cjs/components/fw-seek-bar.js.map +0 -1
- package/dist/cjs/components/fw-settings-menu.js +0 -253
- package/dist/cjs/components/fw-settings-menu.js.map +0 -1
- package/dist/cjs/components/fw-skip-indicator.js +0 -143
- package/dist/cjs/components/fw-skip-indicator.js.map +0 -1
- package/dist/cjs/components/fw-speed-indicator.js +0 -61
- package/dist/cjs/components/fw-speed-indicator.js.map +0 -1
- package/dist/cjs/components/fw-stats-panel.js +0 -205
- package/dist/cjs/components/fw-stats-panel.js.map +0 -1
- package/dist/cjs/components/fw-stream-state-overlay.js +0 -338
- package/dist/cjs/components/fw-stream-state-overlay.js.map +0 -1
- package/dist/cjs/components/fw-subtitle-renderer.js +0 -217
- package/dist/cjs/components/fw-subtitle-renderer.js.map +0 -1
- package/dist/cjs/components/fw-thumbnail-overlay.js +0 -161
- package/dist/cjs/components/fw-thumbnail-overlay.js.map +0 -1
- package/dist/cjs/components/fw-title-overlay.js +0 -72
- package/dist/cjs/components/fw-title-overlay.js.map +0 -1
- package/dist/cjs/components/fw-toast.js +0 -74
- package/dist/cjs/components/fw-toast.js.map +0 -1
- package/dist/cjs/components/fw-volume-control.js +0 -276
- package/dist/cjs/components/fw-volume-control.js.map +0 -1
- package/dist/cjs/components/shared/hitmarker-audio.js +0 -76
- package/dist/cjs/components/shared/hitmarker-audio.js.map +0 -1
- package/dist/cjs/constants/media-assets.js +0 -11
- package/dist/cjs/constants/media-assets.js.map +0 -1
- package/dist/cjs/controllers/player-controller-host.js +0 -364
- package/dist/cjs/controllers/player-controller-host.js.map +0 -1
- package/dist/cjs/define.js +0 -53
- package/dist/cjs/define.js.map +0 -1
- package/dist/cjs/icons/index.js +0 -180
- package/dist/cjs/icons/index.js.map +0 -1
- package/dist/cjs/index.js +0 -108
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/node_modules/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.57.1_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js +0 -33
- package/dist/cjs/node_modules/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.57.1_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js.map +0 -1
- package/dist/cjs/styles/shared-styles.js +0 -1985
- package/dist/cjs/styles/shared-styles.js.map +0 -1
- package/dist/cjs/styles/utility-styles.js +0 -725
- package/dist/cjs/styles/utility-styles.js.map +0 -1
|
@@ -1,726 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var tslib_es6 = require('../node_modules/.pnpm/@rollup_plugin-typescript@12.3.0_rollup@4.57.1_tslib@2.8.1_typescript@5.9.3/node_modules/tslib/tslib.es6.js');
|
|
4
|
-
var lit = require('lit');
|
|
5
|
-
var decorators_js = require('lit/decorators.js');
|
|
6
|
-
var sharedStyles = require('../styles/shared-styles.js');
|
|
7
|
-
var utilityStyles = require('../styles/utility-styles.js');
|
|
8
|
-
var mediaAssets = require('../constants/media-assets.js');
|
|
9
|
-
var hitmarkerAudio = require('./shared/hitmarker-audio.js');
|
|
10
|
-
require('./fw-dvd-logo.js');
|
|
11
|
-
|
|
12
|
-
const BUBBLE_COLORS = [
|
|
13
|
-
"rgba(122, 162, 247, 0.2)",
|
|
14
|
-
"rgba(187, 154, 247, 0.2)",
|
|
15
|
-
"rgba(158, 206, 106, 0.2)",
|
|
16
|
-
"rgba(115, 218, 202, 0.2)",
|
|
17
|
-
"rgba(125, 207, 255, 0.2)",
|
|
18
|
-
"rgba(247, 118, 142, 0.2)",
|
|
19
|
-
"rgba(224, 175, 104, 0.2)",
|
|
20
|
-
"rgba(42, 195, 222, 0.2)",
|
|
21
|
-
];
|
|
22
|
-
const PARTICLE_COLORS = [
|
|
23
|
-
"#7aa2f7",
|
|
24
|
-
"#bb9af7",
|
|
25
|
-
"#9ece6a",
|
|
26
|
-
"#73daca",
|
|
27
|
-
"#7dcfff",
|
|
28
|
-
"#f7768e",
|
|
29
|
-
"#e0af68",
|
|
30
|
-
"#2ac3de",
|
|
31
|
-
];
|
|
32
|
-
exports.FwIdleScreen = class FwIdleScreen extends lit.LitElement {
|
|
33
|
-
constructor() {
|
|
34
|
-
super(...arguments);
|
|
35
|
-
this.retryEnabled = false;
|
|
36
|
-
this._logoSize = 100;
|
|
37
|
-
this._logoOffset = { x: 0, y: 0 };
|
|
38
|
-
this._isLogoHovered = false;
|
|
39
|
-
this._bubbles = this._createBubbles();
|
|
40
|
-
this._hitmarkers = [];
|
|
41
|
-
this._particles = this._createParticles();
|
|
42
|
-
this._bubbleTimers = new Set();
|
|
43
|
-
this._handleMouseMove = (event) => {
|
|
44
|
-
const rect = this._containerEl?.getBoundingClientRect() ?? this.getBoundingClientRect();
|
|
45
|
-
if (rect.width === 0 || rect.height === 0) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const centerX = rect.left + rect.width / 2;
|
|
49
|
-
const centerY = rect.top + rect.height / 2;
|
|
50
|
-
const deltaX = event.clientX - centerX;
|
|
51
|
-
const deltaY = event.clientY - centerY;
|
|
52
|
-
const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
53
|
-
const maxDistance = this._logoSize * 1.5;
|
|
54
|
-
if (distance < maxDistance && distance > 0) {
|
|
55
|
-
const pushStrength = (maxDistance - distance) / maxDistance;
|
|
56
|
-
const pushDistance = 50 * pushStrength;
|
|
57
|
-
this._logoOffset = {
|
|
58
|
-
x: -(deltaX / distance) * pushDistance,
|
|
59
|
-
y: -(deltaY / distance) * pushDistance,
|
|
60
|
-
};
|
|
61
|
-
this._isLogoHovered = true;
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
this._logoOffset = { x: 0, y: 0 };
|
|
65
|
-
this._isLogoHovered = false;
|
|
66
|
-
};
|
|
67
|
-
this._handleMouseLeave = () => {
|
|
68
|
-
this._logoOffset = { x: 0, y: 0 };
|
|
69
|
-
this._isLogoHovered = false;
|
|
70
|
-
};
|
|
71
|
-
this._handleLogoClick = (event) => {
|
|
72
|
-
event.stopPropagation();
|
|
73
|
-
const rect = this._containerEl?.getBoundingClientRect() ?? this.getBoundingClientRect();
|
|
74
|
-
const hitmarker = {
|
|
75
|
-
id: Date.now() + Math.random(),
|
|
76
|
-
x: event.clientX - rect.left,
|
|
77
|
-
y: event.clientY - rect.top,
|
|
78
|
-
};
|
|
79
|
-
this._hitmarkers = [...this._hitmarkers, hitmarker];
|
|
80
|
-
hitmarkerAudio.playHitmarkerSound();
|
|
81
|
-
this._setManagedTimer(() => {
|
|
82
|
-
this._hitmarkers = this._hitmarkers.filter((h) => h.id !== hitmarker.id);
|
|
83
|
-
}, 600);
|
|
84
|
-
};
|
|
85
|
-
this._handleRetry = () => {
|
|
86
|
-
if (this.onRetry) {
|
|
87
|
-
this.onRetry();
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
this.dispatchEvent(new CustomEvent("fw-retry", {
|
|
91
|
-
bubbles: true,
|
|
92
|
-
composed: true,
|
|
93
|
-
}));
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
connectedCallback() {
|
|
97
|
-
super.connectedCallback();
|
|
98
|
-
this._clearBubbleTimers();
|
|
99
|
-
this._startBubbleAnimations();
|
|
100
|
-
}
|
|
101
|
-
disconnectedCallback() {
|
|
102
|
-
super.disconnectedCallback();
|
|
103
|
-
this._clearBubbleTimers();
|
|
104
|
-
this._resizeObserver?.disconnect();
|
|
105
|
-
this._resizeObserver = undefined;
|
|
106
|
-
}
|
|
107
|
-
firstUpdated() {
|
|
108
|
-
this._updateLogoSize();
|
|
109
|
-
if (typeof ResizeObserver !== "undefined") {
|
|
110
|
-
this._resizeObserver = new ResizeObserver(() => {
|
|
111
|
-
this._updateLogoSize();
|
|
112
|
-
});
|
|
113
|
-
if (this._containerEl) {
|
|
114
|
-
this._resizeObserver.observe(this._containerEl);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
_createParticles() {
|
|
119
|
-
return Array.from({ length: 12 }, (_, i) => ({
|
|
120
|
-
left: Math.random() * 100,
|
|
121
|
-
size: Math.random() * 4 + 2,
|
|
122
|
-
color: PARTICLE_COLORS[i % PARTICLE_COLORS.length],
|
|
123
|
-
duration: 8 + Math.random() * 4,
|
|
124
|
-
delay: Math.random() * 8,
|
|
125
|
-
}));
|
|
126
|
-
}
|
|
127
|
-
_createBubbles() {
|
|
128
|
-
return Array.from({ length: 8 }, (_, i) => ({
|
|
129
|
-
top: Math.random() * 80 + 10,
|
|
130
|
-
left: Math.random() * 80 + 10,
|
|
131
|
-
size: Math.random() * 60 + 30,
|
|
132
|
-
opacity: 0,
|
|
133
|
-
color: BUBBLE_COLORS[i % BUBBLE_COLORS.length],
|
|
134
|
-
}));
|
|
135
|
-
}
|
|
136
|
-
_setManagedTimer(callback, delayMs) {
|
|
137
|
-
const timer = setTimeout(() => {
|
|
138
|
-
this._bubbleTimers.delete(timer);
|
|
139
|
-
callback();
|
|
140
|
-
}, delayMs);
|
|
141
|
-
this._bubbleTimers.add(timer);
|
|
142
|
-
}
|
|
143
|
-
_clearBubbleTimers() {
|
|
144
|
-
this._bubbleTimers.forEach((timer) => clearTimeout(timer));
|
|
145
|
-
this._bubbleTimers.clear();
|
|
146
|
-
}
|
|
147
|
-
_updateBubble(index, nextState) {
|
|
148
|
-
if (index < 0 || index >= this._bubbles.length) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const next = [...this._bubbles];
|
|
152
|
-
next[index] = { ...next[index], ...nextState };
|
|
153
|
-
this._bubbles = next;
|
|
154
|
-
}
|
|
155
|
-
_animateBubble(index) {
|
|
156
|
-
this._updateBubble(index, { opacity: 0.15 });
|
|
157
|
-
const visibleDuration = 4000 + Math.random() * 3000;
|
|
158
|
-
this._setManagedTimer(() => {
|
|
159
|
-
this._updateBubble(index, { opacity: 0 });
|
|
160
|
-
this._setManagedTimer(() => {
|
|
161
|
-
this._updateBubble(index, {
|
|
162
|
-
top: Math.random() * 80 + 10,
|
|
163
|
-
left: Math.random() * 80 + 10,
|
|
164
|
-
size: Math.random() * 60 + 30,
|
|
165
|
-
});
|
|
166
|
-
this._setManagedTimer(() => this._animateBubble(index), 200);
|
|
167
|
-
}, 1500);
|
|
168
|
-
}, visibleDuration);
|
|
169
|
-
}
|
|
170
|
-
_startBubbleAnimations() {
|
|
171
|
-
this._bubbles.forEach((_, index) => {
|
|
172
|
-
this._setManagedTimer(() => this._animateBubble(index), index * 500);
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
_updateLogoSize() {
|
|
176
|
-
const rect = this._containerEl?.getBoundingClientRect() ?? this.getBoundingClientRect();
|
|
177
|
-
const minDimension = Math.min(rect.width, rect.height);
|
|
178
|
-
if (!Number.isFinite(minDimension) || minDimension <= 0) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
this._logoSize = minDimension * 0.2;
|
|
182
|
-
}
|
|
183
|
-
get _isLoading() {
|
|
184
|
-
return (this.status === "INITIALIZING" ||
|
|
185
|
-
this.status === "BOOTING" ||
|
|
186
|
-
this.status === "WAITING_FOR_DATA" ||
|
|
187
|
-
!this.status);
|
|
188
|
-
}
|
|
189
|
-
get _isOffline() {
|
|
190
|
-
return this.status === "OFFLINE";
|
|
191
|
-
}
|
|
192
|
-
get _isError() {
|
|
193
|
-
return this.status === "ERROR" || this.status === "INVALID";
|
|
194
|
-
}
|
|
195
|
-
get _showProgress() {
|
|
196
|
-
return this.status === "INITIALIZING" && this.percentage != null;
|
|
197
|
-
}
|
|
198
|
-
get _showRetry() {
|
|
199
|
-
return this._isError && (this.retryEnabled || typeof this.onRetry === "function");
|
|
200
|
-
}
|
|
201
|
-
get _displayMessage() {
|
|
202
|
-
return this.error || this.message || "Waiting for stream...";
|
|
203
|
-
}
|
|
204
|
-
_renderStatusIcon() {
|
|
205
|
-
if (this._isLoading) {
|
|
206
|
-
return lit.html `
|
|
207
|
-
<svg
|
|
208
|
-
class="status-icon spinning"
|
|
209
|
-
fill="none"
|
|
210
|
-
viewBox="0 0 24 24"
|
|
211
|
-
style="color: hsl(var(--tn-yellow, 40 95% 64%));"
|
|
212
|
-
>
|
|
213
|
-
<circle
|
|
214
|
-
style="opacity: 0.25;"
|
|
215
|
-
cx="12"
|
|
216
|
-
cy="12"
|
|
217
|
-
r="10"
|
|
218
|
-
stroke="currentColor"
|
|
219
|
-
stroke-width="4"
|
|
220
|
-
/>
|
|
221
|
-
<path
|
|
222
|
-
style="opacity: 0.75;"
|
|
223
|
-
fill="currentColor"
|
|
224
|
-
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
225
|
-
></path>
|
|
226
|
-
</svg>
|
|
227
|
-
`;
|
|
228
|
-
}
|
|
229
|
-
if (this._isOffline) {
|
|
230
|
-
return lit.html `
|
|
231
|
-
<svg
|
|
232
|
-
class="status-icon"
|
|
233
|
-
fill="none"
|
|
234
|
-
viewBox="0 0 24 24"
|
|
235
|
-
stroke="currentColor"
|
|
236
|
-
style="color: hsl(var(--tn-red, 348 100% 72%));"
|
|
237
|
-
>
|
|
238
|
-
<path
|
|
239
|
-
stroke-linecap="round"
|
|
240
|
-
stroke-linejoin="round"
|
|
241
|
-
stroke-width="2"
|
|
242
|
-
d="M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"
|
|
243
|
-
></path>
|
|
244
|
-
</svg>
|
|
245
|
-
`;
|
|
246
|
-
}
|
|
247
|
-
if (this._isError) {
|
|
248
|
-
return lit.html `
|
|
249
|
-
<svg
|
|
250
|
-
class="status-icon"
|
|
251
|
-
fill="none"
|
|
252
|
-
viewBox="0 0 24 24"
|
|
253
|
-
stroke="currentColor"
|
|
254
|
-
style="color: hsl(var(--tn-red, 348 100% 72%));"
|
|
255
|
-
>
|
|
256
|
-
<path
|
|
257
|
-
stroke-linecap="round"
|
|
258
|
-
stroke-linejoin="round"
|
|
259
|
-
stroke-width="2"
|
|
260
|
-
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
261
|
-
></path>
|
|
262
|
-
</svg>
|
|
263
|
-
`;
|
|
264
|
-
}
|
|
265
|
-
return lit.html `
|
|
266
|
-
<svg
|
|
267
|
-
class="status-icon spinning"
|
|
268
|
-
fill="none"
|
|
269
|
-
viewBox="0 0 24 24"
|
|
270
|
-
style="color: hsl(var(--tn-cyan, 193 100% 75%));"
|
|
271
|
-
>
|
|
272
|
-
<circle
|
|
273
|
-
style="opacity: 0.25;"
|
|
274
|
-
cx="12"
|
|
275
|
-
cy="12"
|
|
276
|
-
r="10"
|
|
277
|
-
stroke="currentColor"
|
|
278
|
-
stroke-width="4"
|
|
279
|
-
/>
|
|
280
|
-
<path
|
|
281
|
-
style="opacity: 0.75;"
|
|
282
|
-
fill="currentColor"
|
|
283
|
-
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
284
|
-
></path>
|
|
285
|
-
</svg>
|
|
286
|
-
`;
|
|
287
|
-
}
|
|
288
|
-
render() {
|
|
289
|
-
const progress = Math.min(100, Math.max(0, this.percentage ?? 0));
|
|
290
|
-
const logoSrc = this.logoSrc || mediaAssets.LOGOMARK_DATA_URL;
|
|
291
|
-
return lit.html `
|
|
292
|
-
<div
|
|
293
|
-
class="idle-container fw-player-root"
|
|
294
|
-
role="status"
|
|
295
|
-
aria-label="Stream status"
|
|
296
|
-
@mousemove=${this._handleMouseMove}
|
|
297
|
-
@mouseleave=${this._handleMouseLeave}
|
|
298
|
-
>
|
|
299
|
-
${this._hitmarkers.map((hitmarker) => lit.html `
|
|
300
|
-
<div class="hitmarker" style="left: ${hitmarker.x}px; top: ${hitmarker.y}px;">
|
|
301
|
-
<div class="hitmarker-line tl"></div>
|
|
302
|
-
<div class="hitmarker-line tr"></div>
|
|
303
|
-
<div class="hitmarker-line bl"></div>
|
|
304
|
-
<div class="hitmarker-line br"></div>
|
|
305
|
-
</div>
|
|
306
|
-
`)}
|
|
307
|
-
|
|
308
|
-
<div class="particles">
|
|
309
|
-
${this._particles.map((particle) => lit.html `
|
|
310
|
-
<div
|
|
311
|
-
class="particle"
|
|
312
|
-
style="
|
|
313
|
-
left: ${particle.left}%;
|
|
314
|
-
width: ${particle.size}px;
|
|
315
|
-
height: ${particle.size}px;
|
|
316
|
-
background: ${particle.color};
|
|
317
|
-
animation-duration: ${particle.duration}s;
|
|
318
|
-
animation-delay: ${particle.delay}s;
|
|
319
|
-
"
|
|
320
|
-
></div>
|
|
321
|
-
`)}
|
|
322
|
-
</div>
|
|
323
|
-
|
|
324
|
-
<div class="bubbles">
|
|
325
|
-
${this._bubbles.map((bubble) => lit.html `
|
|
326
|
-
<div
|
|
327
|
-
class="bubble"
|
|
328
|
-
style="
|
|
329
|
-
top: ${bubble.top}%;
|
|
330
|
-
left: ${bubble.left}%;
|
|
331
|
-
width: ${bubble.size}px;
|
|
332
|
-
height: ${bubble.size}px;
|
|
333
|
-
background: ${bubble.color};
|
|
334
|
-
opacity: ${bubble.opacity};
|
|
335
|
-
"
|
|
336
|
-
></div>
|
|
337
|
-
`)}
|
|
338
|
-
</div>
|
|
339
|
-
|
|
340
|
-
<div
|
|
341
|
-
class="center-logo"
|
|
342
|
-
style="transform: translate(-50%, -50%) translate(${this._logoOffset.x}px, ${this
|
|
343
|
-
._logoOffset.y}px);"
|
|
344
|
-
>
|
|
345
|
-
<div
|
|
346
|
-
class="logo-pulse ${this._isLogoHovered ? "hovered" : ""}"
|
|
347
|
-
style="width: ${this._logoSize * 1.4}px; height: ${this._logoSize * 1.4}px;"
|
|
348
|
-
></div>
|
|
349
|
-
<button
|
|
350
|
-
type="button"
|
|
351
|
-
class="logo-button"
|
|
352
|
-
@click=${this._handleLogoClick}
|
|
353
|
-
aria-label="FrameWorks logo"
|
|
354
|
-
>
|
|
355
|
-
<img
|
|
356
|
-
src=${logoSrc}
|
|
357
|
-
alt=""
|
|
358
|
-
class="logo-image ${this._isLogoHovered ? "hovered" : ""}"
|
|
359
|
-
style="width: ${this._logoSize}px; height: ${this._logoSize}px;"
|
|
360
|
-
draggable="false"
|
|
361
|
-
/>
|
|
362
|
-
</button>
|
|
363
|
-
</div>
|
|
364
|
-
|
|
365
|
-
<fw-dvd-logo .parentRef=${this._containerEl ?? null} .scale=${0.08}></fw-dvd-logo>
|
|
366
|
-
|
|
367
|
-
<div class="status-overlay">
|
|
368
|
-
<div class="status-indicator">
|
|
369
|
-
${this._renderStatusIcon()}
|
|
370
|
-
<span>${this._displayMessage}</span>
|
|
371
|
-
</div>
|
|
372
|
-
|
|
373
|
-
${this._showProgress
|
|
374
|
-
? lit.html `
|
|
375
|
-
<div class="progress-bar">
|
|
376
|
-
<div class="progress-fill" style="width: ${progress}%;"></div>
|
|
377
|
-
</div>
|
|
378
|
-
`
|
|
379
|
-
: lit.nothing}
|
|
380
|
-
${this._showRetry
|
|
381
|
-
? lit.html `<button type="button" class="retry-btn" @click=${this._handleRetry}>
|
|
382
|
-
Retry
|
|
383
|
-
</button>`
|
|
384
|
-
: lit.nothing}
|
|
385
|
-
</div>
|
|
386
|
-
|
|
387
|
-
<div class="overlay-texture"></div>
|
|
388
|
-
</div>
|
|
389
|
-
`;
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
exports.FwIdleScreen.styles = [
|
|
393
|
-
sharedStyles.sharedStyles,
|
|
394
|
-
utilityStyles.utilityStyles,
|
|
395
|
-
lit.css `
|
|
396
|
-
:host {
|
|
397
|
-
display: contents;
|
|
398
|
-
}
|
|
399
|
-
.idle-container {
|
|
400
|
-
position: absolute;
|
|
401
|
-
inset: 0;
|
|
402
|
-
z-index: 5;
|
|
403
|
-
background: linear-gradient(
|
|
404
|
-
135deg,
|
|
405
|
-
hsl(var(--tn-bg-dark, 235 21% 11%)) 0%,
|
|
406
|
-
hsl(var(--tn-bg, 233 23% 17%)) 25%,
|
|
407
|
-
hsl(var(--tn-bg-dark, 235 21% 11%)) 50%,
|
|
408
|
-
hsl(var(--tn-bg, 233 23% 17%)) 75%,
|
|
409
|
-
hsl(var(--tn-bg-dark, 235 21% 11%)) 100%
|
|
410
|
-
);
|
|
411
|
-
background-size: 400% 400%;
|
|
412
|
-
animation: _fw-gradient-shift 16s ease-in-out infinite;
|
|
413
|
-
display: flex;
|
|
414
|
-
flex-direction: column;
|
|
415
|
-
align-items: center;
|
|
416
|
-
justify-content: center;
|
|
417
|
-
overflow: hidden;
|
|
418
|
-
user-select: none;
|
|
419
|
-
-webkit-user-select: none;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.particles,
|
|
423
|
-
.bubbles {
|
|
424
|
-
position: absolute;
|
|
425
|
-
inset: 0;
|
|
426
|
-
pointer-events: none;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.particle {
|
|
430
|
-
position: absolute;
|
|
431
|
-
border-radius: 50%;
|
|
432
|
-
opacity: 0;
|
|
433
|
-
animation: _fw-float-up linear infinite;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
.bubble {
|
|
437
|
-
position: absolute;
|
|
438
|
-
border-radius: 50%;
|
|
439
|
-
transition: opacity 1s ease-in-out;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
.center-logo {
|
|
443
|
-
position: absolute;
|
|
444
|
-
top: 50%;
|
|
445
|
-
left: 50%;
|
|
446
|
-
display: flex;
|
|
447
|
-
align-items: center;
|
|
448
|
-
justify-content: center;
|
|
449
|
-
z-index: 10;
|
|
450
|
-
transition: transform 0.3s ease-out;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.logo-pulse {
|
|
454
|
-
position: absolute;
|
|
455
|
-
border-radius: 50%;
|
|
456
|
-
background: rgba(122, 162, 247, 0.15);
|
|
457
|
-
animation: _fw-logo-pulse 3s ease-in-out infinite;
|
|
458
|
-
pointer-events: none;
|
|
459
|
-
transition: transform 0.3s ease-out;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.logo-pulse.hovered {
|
|
463
|
-
animation: _fw-logo-pulse 1s ease-in-out infinite;
|
|
464
|
-
transform: scale(1.2);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.logo-button {
|
|
468
|
-
all: unset;
|
|
469
|
-
cursor: pointer;
|
|
470
|
-
display: block;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.logo-image {
|
|
474
|
-
position: relative;
|
|
475
|
-
z-index: 1;
|
|
476
|
-
display: block;
|
|
477
|
-
filter: drop-shadow(0 4px 8px rgb(36 40 59 / 0.3));
|
|
478
|
-
transition: all 0.3s ease-out;
|
|
479
|
-
cursor: default;
|
|
480
|
-
user-select: none;
|
|
481
|
-
-webkit-user-drag: none;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.logo-image.hovered {
|
|
485
|
-
transform: scale(1.1);
|
|
486
|
-
filter: drop-shadow(0 6px 12px rgb(36 40 59 / 0.4)) brightness(1.1);
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
.status-overlay {
|
|
490
|
-
position: absolute;
|
|
491
|
-
bottom: 16px;
|
|
492
|
-
left: 50%;
|
|
493
|
-
transform: translateX(-50%);
|
|
494
|
-
z-index: 20;
|
|
495
|
-
display: flex;
|
|
496
|
-
flex-direction: column;
|
|
497
|
-
align-items: center;
|
|
498
|
-
gap: 8px;
|
|
499
|
-
max-width: 280px;
|
|
500
|
-
text-align: center;
|
|
501
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.status-indicator {
|
|
505
|
-
display: flex;
|
|
506
|
-
align-items: center;
|
|
507
|
-
gap: 8px;
|
|
508
|
-
color: #787c99;
|
|
509
|
-
font-size: 13px;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
.status-icon {
|
|
513
|
-
width: 20px;
|
|
514
|
-
height: 20px;
|
|
515
|
-
flex: 0 0 auto;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.status-icon.spinning {
|
|
519
|
-
animation: _fw-spin 1s linear infinite;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.progress-bar {
|
|
523
|
-
width: 160px;
|
|
524
|
-
height: 4px;
|
|
525
|
-
background: rgb(65 72 104 / 0.4);
|
|
526
|
-
border-radius: 2px;
|
|
527
|
-
overflow: hidden;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
.progress-fill {
|
|
531
|
-
height: 100%;
|
|
532
|
-
background: hsl(var(--tn-cyan, 193 100% 75%));
|
|
533
|
-
transition: width 0.3s ease-out;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.retry-btn {
|
|
537
|
-
padding: 6px 16px;
|
|
538
|
-
background: transparent;
|
|
539
|
-
border: 1px solid rgb(122 162 247 / 0.4);
|
|
540
|
-
border-radius: 4px;
|
|
541
|
-
color: #7aa2f7;
|
|
542
|
-
font-size: 11px;
|
|
543
|
-
font-weight: 500;
|
|
544
|
-
cursor: pointer;
|
|
545
|
-
transition: all 0.2s ease;
|
|
546
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
.retry-btn:hover {
|
|
550
|
-
background: rgb(122 162 247 / 0.1);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
.overlay-texture {
|
|
554
|
-
position: absolute;
|
|
555
|
-
inset: 0;
|
|
556
|
-
background:
|
|
557
|
-
radial-gradient(circle at 20% 80%, rgb(122 162 247 / 0.03) 0%, transparent 50%),
|
|
558
|
-
radial-gradient(circle at 80% 20%, rgb(187 154 247 / 0.03) 0%, transparent 50%),
|
|
559
|
-
radial-gradient(circle at 40% 40%, rgb(158 206 106 / 0.02) 0%, transparent 50%);
|
|
560
|
-
pointer-events: none;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
.hitmarker {
|
|
564
|
-
position: absolute;
|
|
565
|
-
transform: translate(-50%, -50%);
|
|
566
|
-
pointer-events: none;
|
|
567
|
-
z-index: 100;
|
|
568
|
-
width: 40px;
|
|
569
|
-
height: 40px;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.hitmarker-line {
|
|
573
|
-
position: absolute;
|
|
574
|
-
width: 12px;
|
|
575
|
-
height: 3px;
|
|
576
|
-
background-color: #fff;
|
|
577
|
-
box-shadow: 0 0 8px rgb(255 255 255 / 0.8);
|
|
578
|
-
border-radius: 1px;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.hitmarker-line.tl {
|
|
582
|
-
top: 25%;
|
|
583
|
-
left: 25%;
|
|
584
|
-
animation: _fw-hitmarker-fade-45 0.6s ease-out forwards;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.hitmarker-line.tr {
|
|
588
|
-
top: 25%;
|
|
589
|
-
left: 75%;
|
|
590
|
-
animation: _fw-hitmarker-fade-neg-45 0.6s ease-out forwards;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
.hitmarker-line.bl {
|
|
594
|
-
top: 75%;
|
|
595
|
-
left: 25%;
|
|
596
|
-
animation: _fw-hitmarker-fade-neg-45 0.6s ease-out forwards;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
.hitmarker-line.br {
|
|
600
|
-
top: 75%;
|
|
601
|
-
left: 75%;
|
|
602
|
-
animation: _fw-hitmarker-fade-45 0.6s ease-out forwards;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
@keyframes _fw-spin {
|
|
606
|
-
from {
|
|
607
|
-
transform: rotate(0deg);
|
|
608
|
-
}
|
|
609
|
-
to {
|
|
610
|
-
transform: rotate(360deg);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
@keyframes _fw-logo-pulse {
|
|
615
|
-
0%,
|
|
616
|
-
100% {
|
|
617
|
-
opacity: 0.15;
|
|
618
|
-
transform: scale(1);
|
|
619
|
-
}
|
|
620
|
-
50% {
|
|
621
|
-
opacity: 0.25;
|
|
622
|
-
transform: scale(1.05);
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
@keyframes _fw-float-up {
|
|
627
|
-
0% {
|
|
628
|
-
transform: translateY(100vh) rotate(0deg);
|
|
629
|
-
opacity: 0;
|
|
630
|
-
}
|
|
631
|
-
10% {
|
|
632
|
-
opacity: 0.6;
|
|
633
|
-
}
|
|
634
|
-
90% {
|
|
635
|
-
opacity: 0.6;
|
|
636
|
-
}
|
|
637
|
-
100% {
|
|
638
|
-
transform: translateY(-100px) rotate(360deg);
|
|
639
|
-
opacity: 0;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
@keyframes _fw-gradient-shift {
|
|
644
|
-
0%,
|
|
645
|
-
100% {
|
|
646
|
-
background-position: 0% 50%;
|
|
647
|
-
}
|
|
648
|
-
50% {
|
|
649
|
-
background-position: 100% 50%;
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
@keyframes _fw-hitmarker-fade-45 {
|
|
654
|
-
0% {
|
|
655
|
-
opacity: 1;
|
|
656
|
-
transform: translate(-50%, -50%) rotate(45deg) scale(0.5);
|
|
657
|
-
}
|
|
658
|
-
20% {
|
|
659
|
-
opacity: 1;
|
|
660
|
-
transform: translate(-50%, -50%) rotate(45deg) scale(1.2);
|
|
661
|
-
}
|
|
662
|
-
100% {
|
|
663
|
-
opacity: 0;
|
|
664
|
-
transform: translate(-50%, -50%) rotate(45deg) scale(1);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
@keyframes _fw-hitmarker-fade-neg-45 {
|
|
669
|
-
0% {
|
|
670
|
-
opacity: 1;
|
|
671
|
-
transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);
|
|
672
|
-
}
|
|
673
|
-
20% {
|
|
674
|
-
opacity: 1;
|
|
675
|
-
transform: translate(-50%, -50%) rotate(-45deg) scale(1.2);
|
|
676
|
-
}
|
|
677
|
-
100% {
|
|
678
|
-
opacity: 0;
|
|
679
|
-
transform: translate(-50%, -50%) rotate(-45deg) scale(1);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
`,
|
|
683
|
-
];
|
|
684
|
-
tslib_es6.__decorate([
|
|
685
|
-
decorators_js.property({ type: String })
|
|
686
|
-
], exports.FwIdleScreen.prototype, "status", void 0);
|
|
687
|
-
tslib_es6.__decorate([
|
|
688
|
-
decorators_js.property({ type: String })
|
|
689
|
-
], exports.FwIdleScreen.prototype, "message", void 0);
|
|
690
|
-
tslib_es6.__decorate([
|
|
691
|
-
decorators_js.property({ type: Number })
|
|
692
|
-
], exports.FwIdleScreen.prototype, "percentage", void 0);
|
|
693
|
-
tslib_es6.__decorate([
|
|
694
|
-
decorators_js.property({ type: String })
|
|
695
|
-
], exports.FwIdleScreen.prototype, "error", void 0);
|
|
696
|
-
tslib_es6.__decorate([
|
|
697
|
-
decorators_js.property({ type: String, attribute: "logo-src" })
|
|
698
|
-
], exports.FwIdleScreen.prototype, "logoSrc", void 0);
|
|
699
|
-
tslib_es6.__decorate([
|
|
700
|
-
decorators_js.property({ type: Boolean, attribute: "retry-enabled" })
|
|
701
|
-
], exports.FwIdleScreen.prototype, "retryEnabled", void 0);
|
|
702
|
-
tslib_es6.__decorate([
|
|
703
|
-
decorators_js.property({ attribute: false })
|
|
704
|
-
], exports.FwIdleScreen.prototype, "onRetry", void 0);
|
|
705
|
-
tslib_es6.__decorate([
|
|
706
|
-
decorators_js.query(".idle-container")
|
|
707
|
-
], exports.FwIdleScreen.prototype, "_containerEl", void 0);
|
|
708
|
-
tslib_es6.__decorate([
|
|
709
|
-
decorators_js.state()
|
|
710
|
-
], exports.FwIdleScreen.prototype, "_logoSize", void 0);
|
|
711
|
-
tslib_es6.__decorate([
|
|
712
|
-
decorators_js.state()
|
|
713
|
-
], exports.FwIdleScreen.prototype, "_logoOffset", void 0);
|
|
714
|
-
tslib_es6.__decorate([
|
|
715
|
-
decorators_js.state()
|
|
716
|
-
], exports.FwIdleScreen.prototype, "_isLogoHovered", void 0);
|
|
717
|
-
tslib_es6.__decorate([
|
|
718
|
-
decorators_js.state()
|
|
719
|
-
], exports.FwIdleScreen.prototype, "_bubbles", void 0);
|
|
720
|
-
tslib_es6.__decorate([
|
|
721
|
-
decorators_js.state()
|
|
722
|
-
], exports.FwIdleScreen.prototype, "_hitmarkers", void 0);
|
|
723
|
-
exports.FwIdleScreen = tslib_es6.__decorate([
|
|
724
|
-
decorators_js.customElement("fw-idle-screen")
|
|
725
|
-
], exports.FwIdleScreen);
|
|
726
|
-
//# sourceMappingURL=fw-idle-screen.js.map
|