@livepeer-frameworks/player-wc 0.1.0
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/cjs/components/fw-context-menu.js +17 -0
- package/dist/cjs/components/fw-context-menu.js.map +1 -0
- package/dist/cjs/components/fw-dev-mode-panel.js +273 -0
- package/dist/cjs/components/fw-dev-mode-panel.js.map +1 -0
- package/dist/cjs/components/fw-error-overlay.js +101 -0
- package/dist/cjs/components/fw-error-overlay.js.map +1 -0
- package/dist/cjs/components/fw-idle-screen.js +182 -0
- package/dist/cjs/components/fw-idle-screen.js.map +1 -0
- package/dist/cjs/components/fw-loading-spinner.js +62 -0
- package/dist/cjs/components/fw-loading-spinner.js.map +1 -0
- package/dist/cjs/components/fw-player-controls.js +258 -0
- package/dist/cjs/components/fw-player-controls.js.map +1 -0
- package/dist/cjs/components/fw-player.js +570 -0
- package/dist/cjs/components/fw-player.js.map +1 -0
- package/dist/cjs/components/fw-seek-bar.js +233 -0
- package/dist/cjs/components/fw-seek-bar.js.map +1 -0
- package/dist/cjs/components/fw-settings-menu.js +126 -0
- package/dist/cjs/components/fw-settings-menu.js.map +1 -0
- package/dist/cjs/components/fw-skip-indicator.js +143 -0
- package/dist/cjs/components/fw-skip-indicator.js.map +1 -0
- package/dist/cjs/components/fw-speed-indicator.js +61 -0
- package/dist/cjs/components/fw-speed-indicator.js.map +1 -0
- package/dist/cjs/components/fw-stats-panel.js +141 -0
- package/dist/cjs/components/fw-stats-panel.js.map +1 -0
- package/dist/cjs/components/fw-subtitle-renderer.js +70 -0
- package/dist/cjs/components/fw-subtitle-renderer.js.map +1 -0
- package/dist/cjs/components/fw-title-overlay.js +72 -0
- package/dist/cjs/components/fw-title-overlay.js.map +1 -0
- package/dist/cjs/components/fw-toast.js +74 -0
- package/dist/cjs/components/fw-toast.js.map +1 -0
- package/dist/cjs/components/fw-volume-control.js +140 -0
- package/dist/cjs/components/fw-volume-control.js.map +1 -0
- package/dist/cjs/controllers/player-controller-host.js +315 -0
- package/dist/cjs/controllers/player-controller-host.js.map +1 -0
- package/dist/cjs/define.js +45 -0
- package/dist/cjs/define.js.map +1 -0
- package/dist/cjs/icons/index.js +153 -0
- package/dist/cjs/icons/index.js.map +1 -0
- package/dist/cjs/index.js +88 -0
- package/dist/cjs/index.js.map +1 -0
- 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 +33 -0
- 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 +1 -0
- package/dist/cjs/styles/shared-styles.js +1967 -0
- package/dist/cjs/styles/shared-styles.js.map +1 -0
- package/dist/cjs/styles/utility-styles.js +725 -0
- package/dist/cjs/styles/utility-styles.js.map +1 -0
- package/dist/esm/components/fw-context-menu.js +17 -0
- package/dist/esm/components/fw-context-menu.js.map +1 -0
- package/dist/esm/components/fw-dev-mode-panel.js +273 -0
- package/dist/esm/components/fw-dev-mode-panel.js.map +1 -0
- package/dist/esm/components/fw-error-overlay.js +101 -0
- package/dist/esm/components/fw-error-overlay.js.map +1 -0
- package/dist/esm/components/fw-idle-screen.js +182 -0
- package/dist/esm/components/fw-idle-screen.js.map +1 -0
- package/dist/esm/components/fw-loading-spinner.js +62 -0
- package/dist/esm/components/fw-loading-spinner.js.map +1 -0
- package/dist/esm/components/fw-player-controls.js +258 -0
- package/dist/esm/components/fw-player-controls.js.map +1 -0
- package/dist/esm/components/fw-player.js +570 -0
- package/dist/esm/components/fw-player.js.map +1 -0
- package/dist/esm/components/fw-seek-bar.js +233 -0
- package/dist/esm/components/fw-seek-bar.js.map +1 -0
- package/dist/esm/components/fw-settings-menu.js +126 -0
- package/dist/esm/components/fw-settings-menu.js.map +1 -0
- package/dist/esm/components/fw-skip-indicator.js +143 -0
- package/dist/esm/components/fw-skip-indicator.js.map +1 -0
- package/dist/esm/components/fw-speed-indicator.js +61 -0
- package/dist/esm/components/fw-speed-indicator.js.map +1 -0
- package/dist/esm/components/fw-stats-panel.js +141 -0
- package/dist/esm/components/fw-stats-panel.js.map +1 -0
- package/dist/esm/components/fw-subtitle-renderer.js +70 -0
- package/dist/esm/components/fw-subtitle-renderer.js.map +1 -0
- package/dist/esm/components/fw-title-overlay.js +72 -0
- package/dist/esm/components/fw-title-overlay.js.map +1 -0
- package/dist/esm/components/fw-toast.js +74 -0
- package/dist/esm/components/fw-toast.js.map +1 -0
- package/dist/esm/components/fw-volume-control.js +140 -0
- package/dist/esm/components/fw-volume-control.js.map +1 -0
- package/dist/esm/controllers/player-controller-host.js +313 -0
- package/dist/esm/controllers/player-controller-host.js.map +1 -0
- package/dist/esm/define.js +43 -0
- package/dist/esm/define.js.map +1 -0
- package/dist/esm/icons/index.js +141 -0
- package/dist/esm/icons/index.js.map +1 -0
- package/dist/esm/index.js +18 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/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 +31 -0
- package/dist/esm/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 +1 -0
- package/dist/esm/styles/shared-styles.js +1965 -0
- package/dist/esm/styles/shared-styles.js.map +1 -0
- package/dist/esm/styles/utility-styles.js +723 -0
- package/dist/esm/styles/utility-styles.js.map +1 -0
- package/dist/fw-player.iife.js +4362 -0
- package/dist/fw-player.iife.js.map +1 -0
- package/dist/types/components/fw-context-menu.d.ts +15 -0
- package/dist/types/components/fw-dev-mode-panel.d.ts +24 -0
- package/dist/types/components/fw-error-overlay.d.ts +14 -0
- package/dist/types/components/fw-idle-screen.d.ts +13 -0
- package/dist/types/components/fw-loading-spinner.d.ts +10 -0
- package/dist/types/components/fw-player-controls.d.ts +23 -0
- package/dist/types/components/fw-player.d.ts +74 -0
- package/dist/types/components/fw-seek-bar.d.ts +33 -0
- package/dist/types/components/fw-settings-menu.d.ts +16 -0
- package/dist/types/components/fw-skip-indicator.d.ts +18 -0
- package/dist/types/components/fw-speed-indicator.d.ts +11 -0
- package/dist/types/components/fw-stats-panel.d.ts +18 -0
- package/dist/types/components/fw-subtitle-renderer.d.ts +21 -0
- package/dist/types/components/fw-title-overlay.d.ts +12 -0
- package/dist/types/components/fw-toast.d.ts +12 -0
- package/dist/types/components/fw-volume-control.d.ts +18 -0
- package/dist/types/controllers/player-controller-host.d.ts +119 -0
- package/dist/types/define.d.ts +1 -0
- package/dist/types/icons/index.d.ts +23 -0
- package/dist/types/iife-entry.d.ts +11 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/styles/shared-styles.d.ts +1 -0
- package/dist/types/styles/utility-styles.d.ts +1 -0
- package/package.json +65 -0
- package/src/components/fw-context-menu.ts +23 -0
- package/src/components/fw-dev-mode-panel.ts +285 -0
- package/src/components/fw-error-overlay.ts +96 -0
- package/src/components/fw-idle-screen.ts +182 -0
- package/src/components/fw-loading-spinner.ts +63 -0
- package/src/components/fw-player-controls.ts +256 -0
- package/src/components/fw-player.ts +557 -0
- package/src/components/fw-seek-bar.ts +219 -0
- package/src/components/fw-settings-menu.ts +128 -0
- package/src/components/fw-skip-indicator.ts +139 -0
- package/src/components/fw-speed-indicator.ts +57 -0
- package/src/components/fw-stats-panel.ts +154 -0
- package/src/components/fw-subtitle-renderer.ts +65 -0
- package/src/components/fw-title-overlay.ts +64 -0
- package/src/components/fw-toast.ts +70 -0
- package/src/components/fw-volume-control.ts +140 -0
- package/src/controllers/player-controller-host.ts +457 -0
- package/src/define.ts +43 -0
- package/src/icons/index.ts +209 -0
- package/src/iife-entry.ts +11 -0
- package/src/index.ts +31 -0
- package/src/styles/shared-styles.ts +1962 -0
- package/src/styles/utility-styles.ts +720 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { PlayerController } from '@livepeer-frameworks/player-core';
|
|
2
|
+
|
|
3
|
+
const initialState = {
|
|
4
|
+
state: "booting",
|
|
5
|
+
streamState: null,
|
|
6
|
+
endpoints: null,
|
|
7
|
+
metadata: null,
|
|
8
|
+
videoElement: null,
|
|
9
|
+
currentTime: 0,
|
|
10
|
+
duration: NaN,
|
|
11
|
+
isPlaying: false,
|
|
12
|
+
isPaused: true,
|
|
13
|
+
isBuffering: false,
|
|
14
|
+
isMuted: true,
|
|
15
|
+
volume: 1,
|
|
16
|
+
error: null,
|
|
17
|
+
errorDetails: null,
|
|
18
|
+
isPassiveError: false,
|
|
19
|
+
hasPlaybackStarted: false,
|
|
20
|
+
isHoldingSpeed: false,
|
|
21
|
+
holdSpeed: 2,
|
|
22
|
+
isHovering: false,
|
|
23
|
+
shouldShowControls: false,
|
|
24
|
+
isLoopEnabled: false,
|
|
25
|
+
isFullscreen: false,
|
|
26
|
+
isPiPActive: false,
|
|
27
|
+
isEffectivelyLive: false,
|
|
28
|
+
shouldShowIdleScreen: true,
|
|
29
|
+
currentPlayerInfo: null,
|
|
30
|
+
currentSourceInfo: null,
|
|
31
|
+
playbackQuality: null,
|
|
32
|
+
subtitlesEnabled: false,
|
|
33
|
+
qualities: [],
|
|
34
|
+
textTracks: [],
|
|
35
|
+
streamInfo: null,
|
|
36
|
+
toast: null,
|
|
37
|
+
};
|
|
38
|
+
class PlayerControllerHost {
|
|
39
|
+
constructor(host) {
|
|
40
|
+
this.controller = null;
|
|
41
|
+
this.unsubs = [];
|
|
42
|
+
this.currentConfig = null;
|
|
43
|
+
this.s = { ...initialState };
|
|
44
|
+
this.host = host;
|
|
45
|
+
host.addController(this);
|
|
46
|
+
}
|
|
47
|
+
// ---- Configuration & Lifecycle ----
|
|
48
|
+
configure(config) {
|
|
49
|
+
this.currentConfig = config;
|
|
50
|
+
}
|
|
51
|
+
async attach(container) {
|
|
52
|
+
if (!this.currentConfig)
|
|
53
|
+
return;
|
|
54
|
+
this.teardown();
|
|
55
|
+
const controller = new PlayerController({
|
|
56
|
+
contentId: this.currentConfig.contentId,
|
|
57
|
+
contentType: this.currentConfig.contentType,
|
|
58
|
+
endpoints: this.currentConfig.endpoints,
|
|
59
|
+
gatewayUrl: this.currentConfig.gatewayUrl,
|
|
60
|
+
mistUrl: this.currentConfig.mistUrl,
|
|
61
|
+
authToken: this.currentConfig.authToken,
|
|
62
|
+
autoplay: this.currentConfig.autoplay,
|
|
63
|
+
muted: this.currentConfig.muted,
|
|
64
|
+
controls: this.currentConfig.controls,
|
|
65
|
+
poster: this.currentConfig.poster,
|
|
66
|
+
debug: this.currentConfig.debug,
|
|
67
|
+
});
|
|
68
|
+
this.controller = controller;
|
|
69
|
+
this.subscribeToEvents(controller);
|
|
70
|
+
this.update({ isLoopEnabled: controller.isLoopEnabled() });
|
|
71
|
+
try {
|
|
72
|
+
await controller.attach(container);
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
console.warn("[PlayerControllerHost] Attach failed:", err);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
hostConnected() {
|
|
79
|
+
// Controller attachment happens in firstUpdated of the host element
|
|
80
|
+
}
|
|
81
|
+
hostDisconnected() {
|
|
82
|
+
this.teardown();
|
|
83
|
+
this.s = { ...initialState };
|
|
84
|
+
}
|
|
85
|
+
teardown() {
|
|
86
|
+
this.unsubs.forEach((fn) => fn());
|
|
87
|
+
this.unsubs = [];
|
|
88
|
+
this.controller?.destroy();
|
|
89
|
+
this.controller = null;
|
|
90
|
+
}
|
|
91
|
+
// ---- State Updates ----
|
|
92
|
+
update(partial) {
|
|
93
|
+
Object.assign(this.s, partial);
|
|
94
|
+
this.host.requestUpdate();
|
|
95
|
+
}
|
|
96
|
+
syncState() {
|
|
97
|
+
if (!this.controller)
|
|
98
|
+
return;
|
|
99
|
+
const c = this.controller;
|
|
100
|
+
this.update({
|
|
101
|
+
isPlaying: c.isPlaying(),
|
|
102
|
+
isPaused: c.isPaused(),
|
|
103
|
+
isBuffering: c.isBuffering(),
|
|
104
|
+
isMuted: c.isMuted(),
|
|
105
|
+
volume: c.getVolume(),
|
|
106
|
+
hasPlaybackStarted: c.hasPlaybackStarted(),
|
|
107
|
+
shouldShowControls: c.shouldShowControls(),
|
|
108
|
+
shouldShowIdleScreen: c.shouldShowIdleScreen(),
|
|
109
|
+
playbackQuality: c.getPlaybackQuality(),
|
|
110
|
+
isLoopEnabled: c.isLoopEnabled(),
|
|
111
|
+
subtitlesEnabled: c.isSubtitlesEnabled(),
|
|
112
|
+
qualities: c.getQualities(),
|
|
113
|
+
streamInfo: c.getStreamInfo(),
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
// ---- Event Subscriptions (mirrors usePlayerController exactly) ----
|
|
117
|
+
subscribeToEvents(controller) {
|
|
118
|
+
const u = this.unsubs;
|
|
119
|
+
u.push(controller.on("stateChange", ({ state }) => {
|
|
120
|
+
this.update({ state });
|
|
121
|
+
this.dispatchEvent("fw-state-change", { state });
|
|
122
|
+
}));
|
|
123
|
+
u.push(controller.on("streamStateChange", ({ state: streamState }) => {
|
|
124
|
+
this.update({
|
|
125
|
+
streamState,
|
|
126
|
+
metadata: controller.getMetadata(),
|
|
127
|
+
isEffectivelyLive: controller.isEffectivelyLive(),
|
|
128
|
+
shouldShowIdleScreen: controller.shouldShowIdleScreen(),
|
|
129
|
+
});
|
|
130
|
+
this.dispatchEvent("fw-stream-state", { state: streamState });
|
|
131
|
+
}));
|
|
132
|
+
u.push(controller.on("timeUpdate", ({ currentTime, duration }) => {
|
|
133
|
+
this.update({ currentTime, duration });
|
|
134
|
+
this.dispatchEvent("fw-time-update", { currentTime, duration });
|
|
135
|
+
}));
|
|
136
|
+
u.push(controller.on("error", ({ error }) => {
|
|
137
|
+
this.update({
|
|
138
|
+
error,
|
|
139
|
+
isPassiveError: controller.isPassiveError(),
|
|
140
|
+
});
|
|
141
|
+
this.dispatchEvent("fw-error", { error });
|
|
142
|
+
}));
|
|
143
|
+
u.push(controller.on("errorCleared", () => {
|
|
144
|
+
this.update({ error: null, isPassiveError: false });
|
|
145
|
+
}));
|
|
146
|
+
u.push(controller.on("ready", ({ videoElement }) => {
|
|
147
|
+
this.update({
|
|
148
|
+
videoElement,
|
|
149
|
+
endpoints: controller.getEndpoints(),
|
|
150
|
+
metadata: controller.getMetadata(),
|
|
151
|
+
streamInfo: controller.getStreamInfo(),
|
|
152
|
+
isEffectivelyLive: controller.isEffectivelyLive(),
|
|
153
|
+
shouldShowIdleScreen: controller.shouldShowIdleScreen(),
|
|
154
|
+
currentPlayerInfo: controller.getCurrentPlayerInfo(),
|
|
155
|
+
currentSourceInfo: controller.getCurrentSourceInfo(),
|
|
156
|
+
qualities: controller.getQualities(),
|
|
157
|
+
});
|
|
158
|
+
this.dispatchEvent("fw-ready", { videoElement });
|
|
159
|
+
const handleVideoEvent = () => {
|
|
160
|
+
if (this.controller?.shouldSuppressVideoEvents?.())
|
|
161
|
+
return;
|
|
162
|
+
this.syncState();
|
|
163
|
+
};
|
|
164
|
+
videoElement.addEventListener("play", handleVideoEvent);
|
|
165
|
+
videoElement.addEventListener("pause", handleVideoEvent);
|
|
166
|
+
videoElement.addEventListener("waiting", handleVideoEvent);
|
|
167
|
+
videoElement.addEventListener("playing", handleVideoEvent);
|
|
168
|
+
u.push(() => {
|
|
169
|
+
videoElement.removeEventListener("play", handleVideoEvent);
|
|
170
|
+
videoElement.removeEventListener("pause", handleVideoEvent);
|
|
171
|
+
videoElement.removeEventListener("waiting", handleVideoEvent);
|
|
172
|
+
videoElement.removeEventListener("playing", handleVideoEvent);
|
|
173
|
+
});
|
|
174
|
+
}));
|
|
175
|
+
u.push(controller.on("playerSelected", ({ player: _player, source }) => {
|
|
176
|
+
this.update({
|
|
177
|
+
currentPlayerInfo: controller.getCurrentPlayerInfo(),
|
|
178
|
+
currentSourceInfo: { url: source.url, type: source.type },
|
|
179
|
+
qualities: controller.getQualities(),
|
|
180
|
+
});
|
|
181
|
+
}));
|
|
182
|
+
u.push(controller.on("volumeChange", ({ volume, muted }) => {
|
|
183
|
+
this.update({ volume, isMuted: muted });
|
|
184
|
+
this.dispatchEvent("fw-volume-change", { volume, muted });
|
|
185
|
+
}));
|
|
186
|
+
u.push(controller.on("loopChange", ({ isLoopEnabled }) => {
|
|
187
|
+
this.update({ isLoopEnabled });
|
|
188
|
+
}));
|
|
189
|
+
u.push(controller.on("fullscreenChange", ({ isFullscreen }) => {
|
|
190
|
+
this.update({ isFullscreen });
|
|
191
|
+
this.dispatchEvent("fw-fullscreen-change", { isFullscreen });
|
|
192
|
+
}));
|
|
193
|
+
u.push(controller.on("pipChange", ({ isPiP }) => {
|
|
194
|
+
this.update({ isPiPActive: isPiP });
|
|
195
|
+
this.dispatchEvent("fw-pip-change", { isPiP });
|
|
196
|
+
}));
|
|
197
|
+
u.push(controller.on("holdSpeedStart", ({ speed }) => {
|
|
198
|
+
this.update({ isHoldingSpeed: true, holdSpeed: speed });
|
|
199
|
+
}));
|
|
200
|
+
u.push(controller.on("holdSpeedEnd", () => {
|
|
201
|
+
this.update({ isHoldingSpeed: false });
|
|
202
|
+
}));
|
|
203
|
+
u.push(controller.on("hoverStart", () => {
|
|
204
|
+
this.update({ isHovering: true, shouldShowControls: true });
|
|
205
|
+
}));
|
|
206
|
+
u.push(controller.on("hoverEnd", () => {
|
|
207
|
+
this.update({
|
|
208
|
+
isHovering: false,
|
|
209
|
+
shouldShowControls: controller.shouldShowControls(),
|
|
210
|
+
});
|
|
211
|
+
}));
|
|
212
|
+
u.push(controller.on("captionsChange", ({ enabled }) => {
|
|
213
|
+
this.update({ subtitlesEnabled: enabled });
|
|
214
|
+
}));
|
|
215
|
+
u.push(controller.on("protocolSwapped", (data) => {
|
|
216
|
+
const message = `Switched to ${data.toProtocol}`;
|
|
217
|
+
this.update({ toast: { message, timestamp: Date.now() } });
|
|
218
|
+
this.dispatchEvent("fw-protocol-swapped", data);
|
|
219
|
+
}));
|
|
220
|
+
u.push(controller.on("playbackFailed", (data) => {
|
|
221
|
+
this.update({
|
|
222
|
+
error: data.message,
|
|
223
|
+
errorDetails: data.details ?? null,
|
|
224
|
+
isPassiveError: false,
|
|
225
|
+
});
|
|
226
|
+
this.dispatchEvent("fw-playback-failed", {
|
|
227
|
+
code: data.code,
|
|
228
|
+
message: data.message,
|
|
229
|
+
});
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
232
|
+
// ---- Event Dispatching ----
|
|
233
|
+
dispatchEvent(name, detail) {
|
|
234
|
+
this.host.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));
|
|
235
|
+
}
|
|
236
|
+
// ---- Action Methods ----
|
|
237
|
+
async play() {
|
|
238
|
+
await this.controller?.play();
|
|
239
|
+
}
|
|
240
|
+
pause() {
|
|
241
|
+
this.controller?.pause();
|
|
242
|
+
}
|
|
243
|
+
togglePlay() {
|
|
244
|
+
this.controller?.togglePlay();
|
|
245
|
+
}
|
|
246
|
+
seek(time) {
|
|
247
|
+
this.controller?.seek(time);
|
|
248
|
+
}
|
|
249
|
+
seekBy(delta) {
|
|
250
|
+
this.controller?.seekBy(delta);
|
|
251
|
+
}
|
|
252
|
+
jumpToLive() {
|
|
253
|
+
this.controller?.jumpToLive();
|
|
254
|
+
}
|
|
255
|
+
setVolume(volume) {
|
|
256
|
+
this.controller?.setVolume(volume);
|
|
257
|
+
}
|
|
258
|
+
toggleMute() {
|
|
259
|
+
this.controller?.toggleMute();
|
|
260
|
+
}
|
|
261
|
+
toggleLoop() {
|
|
262
|
+
this.controller?.toggleLoop();
|
|
263
|
+
}
|
|
264
|
+
async toggleFullscreen() {
|
|
265
|
+
await this.controller?.toggleFullscreen();
|
|
266
|
+
}
|
|
267
|
+
async togglePiP() {
|
|
268
|
+
await this.controller?.togglePictureInPicture();
|
|
269
|
+
}
|
|
270
|
+
toggleSubtitles() {
|
|
271
|
+
this.controller?.toggleSubtitles();
|
|
272
|
+
}
|
|
273
|
+
clearError() {
|
|
274
|
+
this.controller?.clearError();
|
|
275
|
+
this.update({ error: null, errorDetails: null, isPassiveError: false });
|
|
276
|
+
}
|
|
277
|
+
dismissToast() {
|
|
278
|
+
this.update({ toast: null });
|
|
279
|
+
}
|
|
280
|
+
async retry() {
|
|
281
|
+
await this.controller?.retry();
|
|
282
|
+
}
|
|
283
|
+
async reload() {
|
|
284
|
+
await this.controller?.reload();
|
|
285
|
+
}
|
|
286
|
+
getQualities() {
|
|
287
|
+
return this.controller?.getQualities() ?? [];
|
|
288
|
+
}
|
|
289
|
+
selectQuality(id) {
|
|
290
|
+
this.controller?.selectQuality(id);
|
|
291
|
+
}
|
|
292
|
+
handleMouseEnter() {
|
|
293
|
+
this.controller?.handleMouseEnter();
|
|
294
|
+
}
|
|
295
|
+
handleMouseLeave() {
|
|
296
|
+
this.controller?.handleMouseLeave();
|
|
297
|
+
}
|
|
298
|
+
handleMouseMove() {
|
|
299
|
+
this.controller?.handleMouseMove();
|
|
300
|
+
}
|
|
301
|
+
handleTouchStart() {
|
|
302
|
+
this.controller?.handleTouchStart();
|
|
303
|
+
}
|
|
304
|
+
async setDevModeOptions(options) {
|
|
305
|
+
await this.controller?.setDevModeOptions(options);
|
|
306
|
+
}
|
|
307
|
+
getController() {
|
|
308
|
+
return this.controller;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export { PlayerControllerHost };
|
|
313
|
+
//# sourceMappingURL=player-controller-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player-controller-host.js","sources":["../../../../src/controllers/player-controller-host.ts"],"sourcesContent":["/**\n * PlayerControllerHost — Lit ReactiveController wrapping the headless PlayerController.\n * Direct port of usePlayerController.ts from player-react.\n */\nimport type { ReactiveController, ReactiveControllerHost } from \"lit\";\nimport {\n PlayerController,\n type PlayerControllerConfig,\n type PlayerState,\n type StreamState,\n type StreamInfo,\n type PlaybackQuality,\n type ContentEndpoints,\n type ContentMetadata,\n type ClassifiedError,\n} from \"@livepeer-frameworks/player-core\";\n\nexport interface PlayerControllerHostState {\n state: PlayerState;\n streamState: StreamState | null;\n endpoints: ContentEndpoints | null;\n metadata: ContentMetadata | null;\n videoElement: HTMLVideoElement | null;\n currentTime: number;\n duration: number;\n isPlaying: boolean;\n isPaused: boolean;\n isBuffering: boolean;\n isMuted: boolean;\n volume: number;\n error: string | null;\n errorDetails: ClassifiedError[\"details\"] | null;\n isPassiveError: boolean;\n hasPlaybackStarted: boolean;\n isHoldingSpeed: boolean;\n holdSpeed: number;\n isHovering: boolean;\n shouldShowControls: boolean;\n isLoopEnabled: boolean;\n isFullscreen: boolean;\n isPiPActive: boolean;\n isEffectivelyLive: boolean;\n shouldShowIdleScreen: boolean;\n currentPlayerInfo: { name: string; shortname: string } | null;\n currentSourceInfo: { url: string; type: string } | null;\n playbackQuality: PlaybackQuality | null;\n subtitlesEnabled: boolean;\n qualities: Array<{\n id: string;\n label: string;\n bitrate?: number;\n width?: number;\n height?: number;\n isAuto?: boolean;\n active?: boolean;\n }>;\n textTracks: Array<{ id: string; label: string; language?: string; active: boolean }>;\n streamInfo: StreamInfo | null;\n toast: { message: string; timestamp: number } | null;\n}\n\nconst initialState: PlayerControllerHostState = {\n state: \"booting\",\n streamState: null,\n endpoints: null,\n metadata: null,\n videoElement: null,\n currentTime: 0,\n duration: NaN,\n isPlaying: false,\n isPaused: true,\n isBuffering: false,\n isMuted: true,\n volume: 1,\n error: null,\n errorDetails: null,\n isPassiveError: false,\n hasPlaybackStarted: false,\n isHoldingSpeed: false,\n holdSpeed: 2,\n isHovering: false,\n shouldShowControls: false,\n isLoopEnabled: false,\n isFullscreen: false,\n isPiPActive: false,\n isEffectivelyLive: false,\n shouldShowIdleScreen: true,\n currentPlayerInfo: null,\n currentSourceInfo: null,\n playbackQuality: null,\n subtitlesEnabled: false,\n qualities: [],\n textTracks: [],\n streamInfo: null,\n toast: null,\n};\n\ntype HostElement = ReactiveControllerHost & HTMLElement;\n\nexport class PlayerControllerHost implements ReactiveController {\n host: HostElement;\n private controller: PlayerController | null = null;\n private unsubs: Array<() => void> = [];\n private currentConfig: PlayerControllerConfig | null = null;\n\n s: PlayerControllerHostState = { ...initialState };\n\n constructor(host: HostElement) {\n this.host = host;\n host.addController(this);\n }\n\n // ---- Configuration & Lifecycle ----\n\n configure(config: PlayerControllerConfig) {\n this.currentConfig = config;\n }\n\n async attach(container: HTMLDivElement) {\n if (!this.currentConfig) return;\n this.teardown();\n\n const controller = new PlayerController({\n contentId: this.currentConfig.contentId,\n contentType: this.currentConfig.contentType,\n endpoints: this.currentConfig.endpoints,\n gatewayUrl: this.currentConfig.gatewayUrl,\n mistUrl: this.currentConfig.mistUrl,\n authToken: this.currentConfig.authToken,\n autoplay: this.currentConfig.autoplay,\n muted: this.currentConfig.muted,\n controls: this.currentConfig.controls,\n poster: this.currentConfig.poster,\n debug: this.currentConfig.debug,\n });\n\n this.controller = controller;\n this.subscribeToEvents(controller);\n\n this.update({ isLoopEnabled: controller.isLoopEnabled() });\n\n try {\n await controller.attach(container);\n } catch (err) {\n console.warn(\"[PlayerControllerHost] Attach failed:\", err);\n }\n }\n\n hostConnected() {\n // Controller attachment happens in firstUpdated of the host element\n }\n\n hostDisconnected() {\n this.teardown();\n this.s = { ...initialState };\n }\n\n private teardown() {\n this.unsubs.forEach((fn) => fn());\n this.unsubs = [];\n this.controller?.destroy();\n this.controller = null;\n }\n\n // ---- State Updates ----\n\n private update(partial: Partial<PlayerControllerHostState>) {\n Object.assign(this.s, partial);\n this.host.requestUpdate();\n }\n\n private syncState() {\n if (!this.controller) return;\n const c = this.controller;\n this.update({\n isPlaying: c.isPlaying(),\n isPaused: c.isPaused(),\n isBuffering: c.isBuffering(),\n isMuted: c.isMuted(),\n volume: c.getVolume(),\n hasPlaybackStarted: c.hasPlaybackStarted(),\n shouldShowControls: c.shouldShowControls(),\n shouldShowIdleScreen: c.shouldShowIdleScreen(),\n playbackQuality: c.getPlaybackQuality(),\n isLoopEnabled: c.isLoopEnabled(),\n subtitlesEnabled: c.isSubtitlesEnabled(),\n qualities: c.getQualities(),\n streamInfo: c.getStreamInfo(),\n });\n }\n\n // ---- Event Subscriptions (mirrors usePlayerController exactly) ----\n\n private subscribeToEvents(controller: PlayerController) {\n const u = this.unsubs;\n\n u.push(\n controller.on(\"stateChange\", ({ state }) => {\n this.update({ state });\n this.dispatchEvent(\"fw-state-change\", { state });\n })\n );\n\n u.push(\n controller.on(\"streamStateChange\", ({ state: streamState }) => {\n this.update({\n streamState,\n metadata: controller.getMetadata(),\n isEffectivelyLive: controller.isEffectivelyLive(),\n shouldShowIdleScreen: controller.shouldShowIdleScreen(),\n });\n this.dispatchEvent(\"fw-stream-state\", { state: streamState });\n })\n );\n\n u.push(\n controller.on(\"timeUpdate\", ({ currentTime, duration }) => {\n this.update({ currentTime, duration });\n this.dispatchEvent(\"fw-time-update\", { currentTime, duration });\n })\n );\n\n u.push(\n controller.on(\"error\", ({ error }) => {\n this.update({\n error,\n isPassiveError: controller.isPassiveError(),\n });\n this.dispatchEvent(\"fw-error\", { error });\n })\n );\n\n u.push(\n controller.on(\"errorCleared\", () => {\n this.update({ error: null, isPassiveError: false });\n })\n );\n\n u.push(\n controller.on(\"ready\", ({ videoElement }) => {\n this.update({\n videoElement,\n endpoints: controller.getEndpoints(),\n metadata: controller.getMetadata(),\n streamInfo: controller.getStreamInfo(),\n isEffectivelyLive: controller.isEffectivelyLive(),\n shouldShowIdleScreen: controller.shouldShowIdleScreen(),\n currentPlayerInfo: controller.getCurrentPlayerInfo(),\n currentSourceInfo: controller.getCurrentSourceInfo(),\n qualities: controller.getQualities(),\n });\n this.dispatchEvent(\"fw-ready\", { videoElement });\n\n const handleVideoEvent = () => {\n if (this.controller?.shouldSuppressVideoEvents?.()) return;\n this.syncState();\n };\n videoElement.addEventListener(\"play\", handleVideoEvent);\n videoElement.addEventListener(\"pause\", handleVideoEvent);\n videoElement.addEventListener(\"waiting\", handleVideoEvent);\n videoElement.addEventListener(\"playing\", handleVideoEvent);\n u.push(() => {\n videoElement.removeEventListener(\"play\", handleVideoEvent);\n videoElement.removeEventListener(\"pause\", handleVideoEvent);\n videoElement.removeEventListener(\"waiting\", handleVideoEvent);\n videoElement.removeEventListener(\"playing\", handleVideoEvent);\n });\n })\n );\n\n u.push(\n controller.on(\"playerSelected\", ({ player: _player, source }) => {\n this.update({\n currentPlayerInfo: controller.getCurrentPlayerInfo(),\n currentSourceInfo: { url: source.url, type: source.type },\n qualities: controller.getQualities(),\n });\n })\n );\n\n u.push(\n controller.on(\"volumeChange\", ({ volume, muted }) => {\n this.update({ volume, isMuted: muted });\n this.dispatchEvent(\"fw-volume-change\", { volume, muted });\n })\n );\n\n u.push(\n controller.on(\"loopChange\", ({ isLoopEnabled }) => {\n this.update({ isLoopEnabled });\n })\n );\n\n u.push(\n controller.on(\"fullscreenChange\", ({ isFullscreen }) => {\n this.update({ isFullscreen });\n this.dispatchEvent(\"fw-fullscreen-change\", { isFullscreen });\n })\n );\n\n u.push(\n controller.on(\"pipChange\", ({ isPiP }) => {\n this.update({ isPiPActive: isPiP });\n this.dispatchEvent(\"fw-pip-change\", { isPiP });\n })\n );\n\n u.push(\n controller.on(\"holdSpeedStart\", ({ speed }) => {\n this.update({ isHoldingSpeed: true, holdSpeed: speed });\n })\n );\n\n u.push(\n controller.on(\"holdSpeedEnd\", () => {\n this.update({ isHoldingSpeed: false });\n })\n );\n\n u.push(\n controller.on(\"hoverStart\", () => {\n this.update({ isHovering: true, shouldShowControls: true });\n })\n );\n\n u.push(\n controller.on(\"hoverEnd\", () => {\n this.update({\n isHovering: false,\n shouldShowControls: controller.shouldShowControls(),\n });\n })\n );\n\n u.push(\n controller.on(\"captionsChange\", ({ enabled }) => {\n this.update({ subtitlesEnabled: enabled });\n })\n );\n\n u.push(\n controller.on(\"protocolSwapped\", (data) => {\n const message = `Switched to ${data.toProtocol}`;\n this.update({ toast: { message, timestamp: Date.now() } });\n this.dispatchEvent(\"fw-protocol-swapped\", data);\n })\n );\n\n u.push(\n controller.on(\"playbackFailed\", (data) => {\n this.update({\n error: data.message,\n errorDetails: data.details ?? null,\n isPassiveError: false,\n });\n this.dispatchEvent(\"fw-playback-failed\", {\n code: data.code,\n message: data.message,\n });\n })\n );\n }\n\n // ---- Event Dispatching ----\n\n private dispatchEvent(name: string, detail: unknown) {\n this.host.dispatchEvent(new CustomEvent(name, { detail, bubbles: true, composed: true }));\n }\n\n // ---- Action Methods ----\n\n async play() {\n await this.controller?.play();\n }\n pause() {\n this.controller?.pause();\n }\n togglePlay() {\n this.controller?.togglePlay();\n }\n seek(time: number) {\n this.controller?.seek(time);\n }\n seekBy(delta: number) {\n this.controller?.seekBy(delta);\n }\n jumpToLive() {\n this.controller?.jumpToLive();\n }\n setVolume(volume: number) {\n this.controller?.setVolume(volume);\n }\n toggleMute() {\n this.controller?.toggleMute();\n }\n toggleLoop() {\n this.controller?.toggleLoop();\n }\n async toggleFullscreen() {\n await this.controller?.toggleFullscreen();\n }\n async togglePiP() {\n await this.controller?.togglePictureInPicture();\n }\n toggleSubtitles() {\n this.controller?.toggleSubtitles();\n }\n\n clearError() {\n this.controller?.clearError();\n this.update({ error: null, errorDetails: null, isPassiveError: false });\n }\n\n dismissToast() {\n this.update({ toast: null });\n }\n\n async retry() {\n await this.controller?.retry();\n }\n async reload() {\n await this.controller?.reload();\n }\n\n getQualities() {\n return this.controller?.getQualities() ?? [];\n }\n selectQuality(id: string) {\n this.controller?.selectQuality(id);\n }\n\n handleMouseEnter() {\n this.controller?.handleMouseEnter();\n }\n handleMouseLeave() {\n this.controller?.handleMouseLeave();\n }\n handleMouseMove() {\n this.controller?.handleMouseMove();\n }\n handleTouchStart() {\n this.controller?.handleTouchStart();\n }\n\n async setDevModeOptions(options: {\n forcePlayer?: string;\n forceType?: string;\n forceSource?: number;\n playbackMode?: \"auto\" | \"low-latency\" | \"quality\" | \"vod\";\n }) {\n await this.controller?.setDevModeOptions(options);\n }\n\n getController(): PlayerController | null {\n return this.controller;\n }\n}\n"],"names":[],"mappings":";;AA6DA,MAAM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AA;QACC,MAAM,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC;IACnD;IAEA,aAAa,GAAA;QACX,OAAO,IAAI,CAAC,UAAU;IACxB;AACD;;;;"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FwPlayer } from './components/fw-player.js';
|
|
2
|
+
import { FwPlayerControls } from './components/fw-player-controls.js';
|
|
3
|
+
import { FwSeekBar } from './components/fw-seek-bar.js';
|
|
4
|
+
import { FwVolumeControl } from './components/fw-volume-control.js';
|
|
5
|
+
import { FwSettingsMenu } from './components/fw-settings-menu.js';
|
|
6
|
+
import { FwIdleScreen } from './components/fw-idle-screen.js';
|
|
7
|
+
import { FwLoadingSpinner } from './components/fw-loading-spinner.js';
|
|
8
|
+
import { FwTitleOverlay } from './components/fw-title-overlay.js';
|
|
9
|
+
import { FwErrorOverlay } from './components/fw-error-overlay.js';
|
|
10
|
+
import { FwToast } from './components/fw-toast.js';
|
|
11
|
+
import { FwStatsPanel } from './components/fw-stats-panel.js';
|
|
12
|
+
import { FwDevModePanel } from './components/fw-dev-mode-panel.js';
|
|
13
|
+
import { FwSubtitleRenderer } from './components/fw-subtitle-renderer.js';
|
|
14
|
+
import { FwSkipIndicator } from './components/fw-skip-indicator.js';
|
|
15
|
+
import { FwSpeedIndicator } from './components/fw-speed-indicator.js';
|
|
16
|
+
import { FwContextMenu } from './components/fw-context-menu.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Side-effect import that registers all custom elements.
|
|
20
|
+
* Usage: import '@livepeer-frameworks/player-wc/define';
|
|
21
|
+
*/
|
|
22
|
+
function safeDefine(name, ctor) {
|
|
23
|
+
if (!customElements.get(name)) {
|
|
24
|
+
customElements.define(name, ctor);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
safeDefine("fw-player", FwPlayer);
|
|
28
|
+
safeDefine("fw-player-controls", FwPlayerControls);
|
|
29
|
+
safeDefine("fw-seek-bar", FwSeekBar);
|
|
30
|
+
safeDefine("fw-volume-control", FwVolumeControl);
|
|
31
|
+
safeDefine("fw-settings-menu", FwSettingsMenu);
|
|
32
|
+
safeDefine("fw-idle-screen", FwIdleScreen);
|
|
33
|
+
safeDefine("fw-loading-spinner", FwLoadingSpinner);
|
|
34
|
+
safeDefine("fw-title-overlay", FwTitleOverlay);
|
|
35
|
+
safeDefine("fw-error-overlay", FwErrorOverlay);
|
|
36
|
+
safeDefine("fw-toast", FwToast);
|
|
37
|
+
safeDefine("fw-stats-panel", FwStatsPanel);
|
|
38
|
+
safeDefine("fw-dev-mode-panel", FwDevModePanel);
|
|
39
|
+
safeDefine("fw-subtitle-renderer", FwSubtitleRenderer);
|
|
40
|
+
safeDefine("fw-skip-indicator", FwSkipIndicator);
|
|
41
|
+
safeDefine("fw-speed-indicator", FwSpeedIndicator);
|
|
42
|
+
safeDefine("fw-context-menu", FwContextMenu);
|
|
43
|
+
//# sourceMappingURL=define.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sources":["../../../src/define.ts"],"sourcesContent":["/**\n * Side-effect import that registers all custom elements.\n * Usage: import '@livepeer-frameworks/player-wc/define';\n */\nimport { FwPlayer } from \"./components/fw-player.js\";\nimport { FwPlayerControls } from \"./components/fw-player-controls.js\";\nimport { FwSeekBar } from \"./components/fw-seek-bar.js\";\nimport { FwVolumeControl } from \"./components/fw-volume-control.js\";\nimport { FwSettingsMenu } from \"./components/fw-settings-menu.js\";\nimport { FwIdleScreen } from \"./components/fw-idle-screen.js\";\nimport { FwLoadingSpinner } from \"./components/fw-loading-spinner.js\";\nimport { FwTitleOverlay } from \"./components/fw-title-overlay.js\";\nimport { FwErrorOverlay } from \"./components/fw-error-overlay.js\";\nimport { FwToast } from \"./components/fw-toast.js\";\nimport { FwStatsPanel } from \"./components/fw-stats-panel.js\";\nimport { FwDevModePanel } from \"./components/fw-dev-mode-panel.js\";\nimport { FwSubtitleRenderer } from \"./components/fw-subtitle-renderer.js\";\nimport { FwSkipIndicator } from \"./components/fw-skip-indicator.js\";\nimport { FwSpeedIndicator } from \"./components/fw-speed-indicator.js\";\nimport { FwContextMenu } from \"./components/fw-context-menu.js\";\n\nfunction safeDefine(name: string, ctor: CustomElementConstructor) {\n if (!customElements.get(name)) {\n customElements.define(name, ctor);\n }\n}\n\nsafeDefine(\"fw-player\", FwPlayer);\nsafeDefine(\"fw-player-controls\", FwPlayerControls);\nsafeDefine(\"fw-seek-bar\", FwSeekBar);\nsafeDefine(\"fw-volume-control\", FwVolumeControl);\nsafeDefine(\"fw-settings-menu\", FwSettingsMenu);\nsafeDefine(\"fw-idle-screen\", FwIdleScreen);\nsafeDefine(\"fw-loading-spinner\", FwLoadingSpinner);\nsafeDefine(\"fw-title-overlay\", FwTitleOverlay);\nsafeDefine(\"fw-error-overlay\", FwErrorOverlay);\nsafeDefine(\"fw-toast\", FwToast);\nsafeDefine(\"fw-stats-panel\", FwStatsPanel);\nsafeDefine(\"fw-dev-mode-panel\", FwDevModePanel);\nsafeDefine(\"fw-subtitle-renderer\", FwSubtitleRenderer);\nsafeDefine(\"fw-skip-indicator\", FwSkipIndicator);\nsafeDefine(\"fw-speed-indicator\", FwSpeedIndicator);\nsafeDefine(\"fw-context-menu\", FwContextMenu);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;AAGG;AAkBH,SAAS,UAAU,CAAC,IAAY,EAAE,IAA8B,EAAA;IAC9D,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;AAC7B,QAAA,cAAc,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;IACnC;AACF;AAEA,UAAU,CAAC,WAAW,EAAE,QAAQ,CAAC;AACjC,UAAU,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;AAClD,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;AACpC,UAAU,CAAC,mBAAmB,EAAE,eAAe,CAAC;AAChD,UAAU,CAAC,kBAAkB,EAAE,cAAc,CAAC;AAC9C,UAAU,CAAC,gBAAgB,EAAE,YAAY,CAAC;AAC1C,UAAU,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;AAClD,UAAU,CAAC,kBAAkB,EAAE,cAAc,CAAC;AAC9C,UAAU,CAAC,kBAAkB,EAAE,cAAc,CAAC;AAC9C,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC;AAC/B,UAAU,CAAC,gBAAgB,EAAE,YAAY,CAAC;AAC1C,UAAU,CAAC,mBAAmB,EAAE,cAAc,CAAC;AAC/C,UAAU,CAAC,sBAAsB,EAAE,kBAAkB,CAAC;AACtD,UAAU,CAAC,mBAAmB,EAAE,eAAe,CAAC;AAChD,UAAU,CAAC,oBAAoB,EAAE,gBAAgB,CAAC;AAClD,UAAU,CAAC,iBAAiB,EAAE,aAAa,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* SVG icons as Lit html template functions.
|
|
5
|
+
* Port of Icons.tsx from player-react.
|
|
6
|
+
*/
|
|
7
|
+
const playIcon = (size = 16, color = "currentColor") => html `
|
|
8
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
9
|
+
<path d="M8 5v14l11-7z" fill="${color}" />
|
|
10
|
+
</svg>
|
|
11
|
+
`;
|
|
12
|
+
const pauseIcon = (size = 16, color = "currentColor") => html `
|
|
13
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
14
|
+
<rect x="6" y="4" width="4" height="16" fill="${color}" />
|
|
15
|
+
<rect x="14" y="4" width="4" height="16" fill="${color}" />
|
|
16
|
+
</svg>
|
|
17
|
+
`;
|
|
18
|
+
const volumeUpIcon = (size = 16, color = "currentColor") => html `
|
|
19
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
20
|
+
<polygon points="11,5 6,9 2,9 2,15 6,15 11,19" fill="${color}" />
|
|
21
|
+
<path
|
|
22
|
+
d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"
|
|
23
|
+
stroke="${color}"
|
|
24
|
+
stroke-width="2"
|
|
25
|
+
stroke-linecap="round"
|
|
26
|
+
stroke-linejoin="round"
|
|
27
|
+
/>
|
|
28
|
+
</svg>
|
|
29
|
+
`;
|
|
30
|
+
const volumeOffIcon = (size = 16, color = "currentColor") => html `
|
|
31
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
32
|
+
<polygon points="11,5 6,9 2,9 2,15 6,15 11,19" fill="${color}" />
|
|
33
|
+
<line
|
|
34
|
+
x1="23"
|
|
35
|
+
y1="9"
|
|
36
|
+
x2="17"
|
|
37
|
+
y2="15"
|
|
38
|
+
stroke="${color}"
|
|
39
|
+
stroke-width="2"
|
|
40
|
+
stroke-linecap="round"
|
|
41
|
+
/>
|
|
42
|
+
<line
|
|
43
|
+
x1="17"
|
|
44
|
+
y1="9"
|
|
45
|
+
x2="23"
|
|
46
|
+
y2="15"
|
|
47
|
+
stroke="${color}"
|
|
48
|
+
stroke-width="2"
|
|
49
|
+
stroke-linecap="round"
|
|
50
|
+
/>
|
|
51
|
+
</svg>
|
|
52
|
+
`;
|
|
53
|
+
const fullscreenIcon = (size = 16, color = "currentColor") => html `
|
|
54
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
55
|
+
<path
|
|
56
|
+
d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3"
|
|
57
|
+
stroke="${color}"
|
|
58
|
+
stroke-width="2"
|
|
59
|
+
stroke-linecap="round"
|
|
60
|
+
stroke-linejoin="round"
|
|
61
|
+
/>
|
|
62
|
+
</svg>
|
|
63
|
+
`;
|
|
64
|
+
const fullscreenExitIcon = (size = 16, color = "currentColor") => html `
|
|
65
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
66
|
+
<path
|
|
67
|
+
d="M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M16 21v-3a2 2 0 0 1 2-2h3"
|
|
68
|
+
stroke="${color}"
|
|
69
|
+
stroke-width="2"
|
|
70
|
+
stroke-linecap="round"
|
|
71
|
+
stroke-linejoin="round"
|
|
72
|
+
/>
|
|
73
|
+
</svg>
|
|
74
|
+
`;
|
|
75
|
+
const pictureInPictureIcon = (size = 16, color = "currentColor") => html `
|
|
76
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
77
|
+
<rect
|
|
78
|
+
x="2"
|
|
79
|
+
y="3"
|
|
80
|
+
width="20"
|
|
81
|
+
height="14"
|
|
82
|
+
rx="2"
|
|
83
|
+
ry="2"
|
|
84
|
+
stroke="${color}"
|
|
85
|
+
stroke-width="2"
|
|
86
|
+
fill="none"
|
|
87
|
+
/>
|
|
88
|
+
<rect x="8" y="10" width="10" height="6" rx="1" ry="1" fill="${color}" />
|
|
89
|
+
</svg>
|
|
90
|
+
`;
|
|
91
|
+
const settingsIcon = (size = 16, color = "currentColor") => html `
|
|
92
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
93
|
+
<path
|
|
94
|
+
d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
|
|
95
|
+
stroke="${color}"
|
|
96
|
+
stroke-width="2"
|
|
97
|
+
stroke-linecap="round"
|
|
98
|
+
stroke-linejoin="round"
|
|
99
|
+
/>
|
|
100
|
+
<path
|
|
101
|
+
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z"
|
|
102
|
+
stroke="${color}"
|
|
103
|
+
stroke-width="2"
|
|
104
|
+
stroke-linecap="round"
|
|
105
|
+
stroke-linejoin="round"
|
|
106
|
+
/>
|
|
107
|
+
</svg>
|
|
108
|
+
`;
|
|
109
|
+
const statsIcon = (size = 16, color = "currentColor") => html `
|
|
110
|
+
<svg width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
|
111
|
+
<rect x="4" y="13" width="4" height="7" fill="${color}" />
|
|
112
|
+
<rect x="10" y="9" width="4" height="11" fill="${color}" />
|
|
113
|
+
<rect x="16" y="4" width="4" height="16" fill="${color}" />
|
|
114
|
+
</svg>
|
|
115
|
+
`;
|
|
116
|
+
const closeIcon = (size = 12, color = "currentColor") => html `
|
|
117
|
+
<svg width="${size}" height="${size}" viewBox="0 0 12 12" fill="none" aria-hidden="true">
|
|
118
|
+
<path d="M9 3L3 9M3 3L9 9" stroke="${color}" stroke-width="1.5" stroke-linecap="round" />
|
|
119
|
+
</svg>
|
|
120
|
+
`;
|
|
121
|
+
const loopIcon = (size = 14, color = "currentColor") => html `
|
|
122
|
+
<svg
|
|
123
|
+
width="${size}"
|
|
124
|
+
height="${size}"
|
|
125
|
+
viewBox="0 0 24 24"
|
|
126
|
+
fill="none"
|
|
127
|
+
stroke="${color}"
|
|
128
|
+
stroke-width="2"
|
|
129
|
+
stroke-linecap="round"
|
|
130
|
+
stroke-linejoin="round"
|
|
131
|
+
aria-hidden="true"
|
|
132
|
+
>
|
|
133
|
+
<polyline points="17 1 21 5 17 9"></polyline>
|
|
134
|
+
<path d="M3 11V9a4 4 0 0 1 4-4h14"></path>
|
|
135
|
+
<polyline points="7 23 3 19 7 15"></polyline>
|
|
136
|
+
<path d="M21 13v2a4 4 0 0 1-4 4H3"></path>
|
|
137
|
+
</svg>
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
export { closeIcon, fullscreenExitIcon, fullscreenIcon, loopIcon, pauseIcon, pictureInPictureIcon, playIcon, settingsIcon, statsIcon, volumeOffIcon, volumeUpIcon };
|
|
141
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/icons/index.ts"],"sourcesContent":["/**\n * SVG icons as Lit html template functions.\n * Port of Icons.tsx from player-react.\n */\nimport { html, svg, type TemplateResult } from \"lit\";\n\ntype IconTemplate = (size?: number, color?: string) => TemplateResult;\n\nexport const playIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M8 5v14l11-7z\" fill=\"${color}\" />\n </svg>\n`;\n\nexport const pauseIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"6\" y=\"4\" width=\"4\" height=\"16\" fill=\"${color}\" />\n <rect x=\"14\" y=\"4\" width=\"4\" height=\"16\" fill=\"${color}\" />\n </svg>\n`;\n\nexport const skipBackIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z\"\n fill=\"${color}\"\n />\n ${svg`<text x=\"12\" y=\"15\" font-size=\"7\" font-weight=\"bold\" fill=\"${color}\" text-anchor=\"middle\">10</text>`}\n </svg>\n`;\n\nexport const skipForwardIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M12 5V1l5 5-5 5V7c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6h2c0 4.42-3.58 8-8 8s-8-3.58-8-8 3.58-8 8-8z\"\n fill=\"${color}\"\n />\n ${svg`<text x=\"12\" y=\"15\" font-size=\"7\" font-weight=\"bold\" fill=\"${color}\" text-anchor=\"middle\">10</text>`}\n </svg>\n`;\n\nexport const volumeUpIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <polygon points=\"11,5 6,9 2,9 2,15 6,15 11,19\" fill=\"${color}\" />\n <path\n d=\"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n`;\n\nexport const volumeOffIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <polygon points=\"11,5 6,9 2,9 2,15 6,15 11,19\" fill=\"${color}\" />\n <line\n x1=\"23\"\n y1=\"9\"\n x2=\"17\"\n y2=\"15\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <line\n x1=\"17\"\n y1=\"9\"\n x2=\"23\"\n y2=\"15\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n`;\n\nexport const fullscreenIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n`;\n\nexport const fullscreenExitIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M8 3v3a2 2 0 0 1-2 2H3M21 8h-3a2 2 0 0 1-2-2V3M3 16h3a2 2 0 0 1 2 2v3M16 21v-3a2 2 0 0 1 2-2h3\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n`;\n\nexport const pictureInPictureIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <rect\n x=\"2\"\n y=\"3\"\n width=\"20\"\n height=\"14\"\n rx=\"2\"\n ry=\"2\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n fill=\"none\"\n />\n <rect x=\"8\" y=\"10\" width=\"10\" height=\"6\" rx=\"1\" ry=\"1\" fill=\"${color}\" />\n </svg>\n`;\n\nexport const closedCaptionsIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <rect\n x=\"2\"\n y=\"4\"\n width=\"20\"\n height=\"16\"\n rx=\"2\"\n ry=\"2\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n fill=\"none\"\n />\n <path\n d=\"M8 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1H9c-.6 0-1-.4-1-1v-4zM14 10c0-.6.4-1 1-1h1c.6 0 1 .4 1 1v4c0 .6-.4 1-1 1h-1c-.6 0-1-.4-1-1v-4z\"\n fill=\"${color}\"\n />\n </svg>\n`;\n\nexport const liveIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"${color}\" />\n <path\n d=\"M12 1v6M12 17v6M4.22 4.22l4.24 4.24M15.54 15.54l4.24 4.24M1 12h6M17 12h6M4.22 19.78l4.24-4.24M15.54 8.46l4.24-4.24\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n`;\n\nexport const settingsIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path\n d=\"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n`;\n\nexport const statsIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <rect x=\"4\" y=\"13\" width=\"4\" height=\"7\" fill=\"${color}\" />\n <rect x=\"10\" y=\"9\" width=\"4\" height=\"11\" fill=\"${color}\" />\n <rect x=\"16\" y=\"4\" width=\"4\" height=\"16\" fill=\"${color}\" />\n </svg>\n`;\n\nexport const seekToLiveIcon: IconTemplate = (size = 16, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M5 5v14l11-7z\" fill=\"${color}\" />\n <rect x=\"17\" y=\"5\" width=\"3\" height=\"14\" fill=\"${color}\" />\n </svg>\n`;\n\nexport const closeIcon: IconTemplate = (size = 12, color = \"currentColor\") => html`\n <svg width=\"${size}\" height=\"${size}\" viewBox=\"0 0 12 12\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M9 3L3 9M3 3L9 9\" stroke=\"${color}\" stroke-width=\"1.5\" stroke-linecap=\"round\" />\n </svg>\n`;\n\nexport const loopIcon: IconTemplate = (size = 14, color = \"currentColor\") => html`\n <svg\n width=\"${size}\"\n height=\"${size}\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"${color}\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"17 1 21 5 17 9\"></polyline>\n <path d=\"M3 11V9a4 4 0 0 1 4-4h14\"></path>\n <polyline points=\"7 23 3 19 7 15\"></polyline>\n <path d=\"M21 13v2a4 4 0 0 1-4 4H3\"></path>\n </svg>\n`;\n"],"names":[],"mappings":";;AAAA;;;AAGG;AAKI,MAAM,QAAQ,GAAiB,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI,CAAA;AACjE,cAAA,EAAA,IAAI,aAAa,IAAI,CAAA;oCACD,KAAK,CAAA;;;AAIlC,MAAM,SAAS,GAAiB,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI,CAAA;AAClE,cAAA,EAAA,IAAI,aAAa,IAAI,CAAA;oDACe,KAAK,CAAA;qDACJ,KAAK,CAAA;;;AAwBnD,MAAM,YAAY,GAAiB,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI,CAAA;AACrE,cAAA,EAAA,IAAI,aAAa,IAAI,CAAA;2DACsB,KAAK,CAAA;;;gBAGhD,KAAK,CAAA;;;;;;;AAQd,MAAM,aAAa,GAAiB,CAAC,IAAI,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AA;;;AAIvC,MAAM,QAAQ,GAAiB,CAAC,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI,CAAA;;aAEpE,IAAI,CAAA;cACH,IAAI,CAAA;;;cAGJ,KAAK,CAAA;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { FwPlayer } from './components/fw-player.js';
|
|
2
|
+
export { FwPlayerControls } from './components/fw-player-controls.js';
|
|
3
|
+
export { FwSeekBar } from './components/fw-seek-bar.js';
|
|
4
|
+
export { FwVolumeControl } from './components/fw-volume-control.js';
|
|
5
|
+
export { FwSettingsMenu } from './components/fw-settings-menu.js';
|
|
6
|
+
export { FwIdleScreen } from './components/fw-idle-screen.js';
|
|
7
|
+
export { FwLoadingSpinner } from './components/fw-loading-spinner.js';
|
|
8
|
+
export { FwTitleOverlay } from './components/fw-title-overlay.js';
|
|
9
|
+
export { FwErrorOverlay } from './components/fw-error-overlay.js';
|
|
10
|
+
export { FwToast } from './components/fw-toast.js';
|
|
11
|
+
export { FwStatsPanel } from './components/fw-stats-panel.js';
|
|
12
|
+
export { FwDevModePanel } from './components/fw-dev-mode-panel.js';
|
|
13
|
+
export { FwSubtitleRenderer } from './components/fw-subtitle-renderer.js';
|
|
14
|
+
export { FwSkipIndicator } from './components/fw-skip-indicator.js';
|
|
15
|
+
export { FwSpeedIndicator } from './components/fw-speed-indicator.js';
|
|
16
|
+
export { FwContextMenu } from './components/fw-context-menu.js';
|
|
17
|
+
export { PlayerControllerHost } from './controllers/player-controller-host.js';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
function __decorate(decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
26
|
+
var e = new Error(message);
|
|
27
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { __decorate };
|
|
31
|
+
//# sourceMappingURL=tslib.es6.js.map
|