@mux/mux-player 1.11.4 → 1.12.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/index.cjs.js +433 -374
- package/dist/index.mjs +250 -239
- package/dist/mux-player.js +489 -430
- package/dist/mux-player.mjs +489 -430
- package/dist/themes/2023/index.cjs.js +1819 -0
- package/dist/themes/2023/index.js +1821 -0
- package/dist/themes/2023/index.mjs +1797 -0
- package/dist/themes/classic/index.cjs.js +1740 -0
- package/dist/themes/classic/index.js +1742 -0
- package/dist/themes/classic/index.mjs +1718 -0
- package/dist/themes/microvideo/index.cjs.js +1370 -0
- package/dist/themes/microvideo/index.js +1372 -0
- package/dist/themes/microvideo/index.mjs +1351 -0
- package/dist/themes/minimal/index.cjs.js +1273 -0
- package/dist/themes/minimal/index.js +1275 -0
- package/dist/themes/minimal/index.mjs +1254 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/themes/2023/index.d.ts +5 -0
- package/dist/types/themes/classic/index.d.ts +5 -0
- package/dist/types/video-api.d.ts +4 -0
- package/dist/types-ts3.4/index.d.ts +3 -2
- package/dist/types-ts3.4/themes/2023/index.d.ts +5 -0
- package/dist/types-ts3.4/themes/classic/index.d.ts +5 -0
- package/dist/types-ts3.4/themes/microvideo/index.d.ts +1 -0
- package/dist/types-ts3.4/themes/minimal/index.d.ts +1 -0
- package/dist/types-ts3.4/video-api.d.ts +4 -0
- package/package.json +52 -17
- /package/{themes/microvideo.js → dist/types/themes/microvideo/index.d.ts} +0 -0
- /package/{themes/minimal.js → dist/types/themes/minimal/index.d.ts} +0 -0
|
@@ -0,0 +1,1718 @@
|
|
|
1
|
+
var __accessCheck = (obj, member, msg) => {
|
|
2
|
+
if (!member.has(obj))
|
|
3
|
+
throw TypeError("Cannot " + msg);
|
|
4
|
+
};
|
|
5
|
+
var __privateGet = (obj, member, getter) => {
|
|
6
|
+
__accessCheck(obj, member, "read from private field");
|
|
7
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
8
|
+
};
|
|
9
|
+
var __privateAdd = (obj, member, value) => {
|
|
10
|
+
if (member.has(obj))
|
|
11
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
13
|
+
};
|
|
14
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
15
|
+
__accessCheck(obj, member, "write to private field");
|
|
16
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
17
|
+
return value;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/themes/classic/classic.html
|
|
21
|
+
var classic_default = `<!-- prettier-ignore -->
|
|
22
|
+
<template id="media-theme-classic">
|
|
23
|
+
<style>
|
|
24
|
+
:host {
|
|
25
|
+
--_primary-color: var(--media-primary-color, white);
|
|
26
|
+
--_secondary-color: var(--media-secondary-color, rgb(0 0 0 / .75));
|
|
27
|
+
|
|
28
|
+
--media-icon-color: var(--_primary-color);
|
|
29
|
+
--media-range-thumb-background: var(--_primary-color);
|
|
30
|
+
--media-range-bar-color: var(--_primary-color);
|
|
31
|
+
--media-control-background: var(--_secondary-color);
|
|
32
|
+
--media-control-hover-background: var(--_secondary-color);
|
|
33
|
+
--media-time-range-buffered-color: rgba(255, 255, 255, 0.4);
|
|
34
|
+
--media-range-track-background:
|
|
35
|
+
linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
|
|
36
|
+
linear-gradient(rgba(20, 20, 30, 0.7), rgba(20, 20, 30, 0.7));
|
|
37
|
+
--media-preview-thumbnail-border: 0;
|
|
38
|
+
--media-preview-thumbnail-border-radius: 2px 2px 0 0;
|
|
39
|
+
--media-preview-time-border-radius: 0 0 2px 2px;
|
|
40
|
+
--media-preview-time-margin: 0 0 8px;
|
|
41
|
+
--media-preview-time-text-shadow: none;
|
|
42
|
+
--media-listbox-border-radius: 2px;
|
|
43
|
+
--media-listbox-transform-in: translateY(-8px) scale(1);
|
|
44
|
+
--media-listbox-transform-out: translateY(-6px) scale(.99);
|
|
45
|
+
--media-option-hover-background: rgba(255, 255, 255, 0.28);
|
|
46
|
+
|
|
47
|
+
color: var(--_primary-color);
|
|
48
|
+
display: inline-block;
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host([audio]) {
|
|
54
|
+
--media-preview-time-border-radius: 3px;
|
|
55
|
+
--media-preview-time-margin: 0 0 5px;
|
|
56
|
+
--media-preview-time-text-shadow: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host([audio]) ::slotted([slot='media']) {
|
|
60
|
+
height: 0px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([audio]) media-loading-indicator,
|
|
64
|
+
:host([audio]) ::slotted([slot=poster]) {
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([audio]) media-controller {
|
|
69
|
+
background: transparent;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:host([audio]) media-controller::part(vertical-layer) {
|
|
73
|
+
background: transparent;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host([audio]) media-control-bar {
|
|
77
|
+
width: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[disabled]:not(media-live-button),
|
|
81
|
+
[aria-disabled='true']:not(media-live-button) {
|
|
82
|
+
opacity: 60%;
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
media-controller:not([mediasubtitleslist]) media-captions-selectmenu {
|
|
87
|
+
--captions-selectmenu: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* 0.433s is the transition duration for VTT Regions.
|
|
91
|
+
* Borrowed here, so the captions don't move too fast. */
|
|
92
|
+
media-controller ::slotted([slot='media']) {
|
|
93
|
+
--media-webkit-text-track-transition: transform 0.433s ease-out 0.3s;
|
|
94
|
+
}
|
|
95
|
+
media-controller:is([mediapaused],:not([userinactive])) ::slotted([slot='media']) {
|
|
96
|
+
/* 42px is the height of the control bar and progress bar
|
|
97
|
+
* with an additional 5px as a buffer, to get 47px */
|
|
98
|
+
--media-webkit-text-track-transform: translateY(-47px);
|
|
99
|
+
--media-webkit-text-track-transition: transform 0.15s ease;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
media-volume-range[mediavolumeunavailable] {
|
|
103
|
+
--volume-range: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
media-airplay-button[mediaairplayunavailable] {
|
|
107
|
+
--airplay-button: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
media-fullscreen-button[mediafullscreenunavailable] {
|
|
111
|
+
--fullscreen-button: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
media-cast-button[mediacastunavailable] {
|
|
115
|
+
--cast-button: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
media-pip-button[mediapipunavailable] {
|
|
119
|
+
--pip-button: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:host media-time-range {
|
|
123
|
+
color: var(--_primary-color);
|
|
124
|
+
--media-range-thumb-opacity: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:host(:not([audio])) media-time-range {
|
|
128
|
+
--media-range-padding: 0;
|
|
129
|
+
background: transparent;
|
|
130
|
+
z-index: 10;
|
|
131
|
+
height: 10px;
|
|
132
|
+
bottom: -3px;
|
|
133
|
+
width: 100%;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
media-control-bar {
|
|
137
|
+
--media-control-padding: 4px 3px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[breakpointsm] media-control-bar {
|
|
141
|
+
--media-control-padding: 9px 5px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
[breakpointmd] media-control-bar {
|
|
145
|
+
--media-control-padding: 9px 7px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
media-control-bar :is([role='button'], [role='switch'], button) {
|
|
149
|
+
line-height: 0;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
media-control-bar :is(media-text-display, media-time-display):first-child {
|
|
153
|
+
--media-control-padding: 9px 5px 9px 10px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.spacer {
|
|
157
|
+
flex-grow: 1;
|
|
158
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Add a small space on the right to have the play button and
|
|
162
|
+
* fullscreen button aligned in relation to the progress bar. */
|
|
163
|
+
media-control-bar:not([slot])::after {
|
|
164
|
+
content: '';
|
|
165
|
+
width: 2px;
|
|
166
|
+
height: 100%;
|
|
167
|
+
background-color: var(--media-control-background, rgba(20, 20, 30, 0.7));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
media-control-bar[slot='top-chrome'] {
|
|
171
|
+
min-height: 42px;
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([title]) media-control-bar[slot='top-chrome']::before {
|
|
176
|
+
content: '';
|
|
177
|
+
position: absolute;
|
|
178
|
+
width: 100%;
|
|
179
|
+
padding-bottom: min(160px, 25%);
|
|
180
|
+
background: linear-gradient(rgb(0 0 0 / 0.4), transparent);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
media-control-bar[slot='top-chrome'] > * {
|
|
184
|
+
--media-control-background: transparent;
|
|
185
|
+
--media-control-hover-background: transparent;
|
|
186
|
+
position: relative;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
media-controller::part(vertical-layer) {
|
|
190
|
+
transition: background-color 1s;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
media-controller:is([mediapaused], :not([userinactive]))::part(vertical-layer) {
|
|
194
|
+
background-color: var(--controls-backdrop-color, var(--controls, transparent));
|
|
195
|
+
transition: background-color 0.25s;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.center-controls {
|
|
199
|
+
--media-button-icon-width: 100%;
|
|
200
|
+
--media-button-icon-height: auto;
|
|
201
|
+
pointer-events: none;
|
|
202
|
+
width: 100%;
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-flow: row;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.25)) drop-shadow(0 0 6px rgb(0 0 0 / 0.25));
|
|
208
|
+
paint-order: stroke;
|
|
209
|
+
stroke: rgba(102, 102, 102, 1);
|
|
210
|
+
stroke-width: 0.3px;
|
|
211
|
+
text-shadow: 0 0 2px rgb(0 0 0 / 0.25), 0 0 6px rgb(0 0 0 / 0.25);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.center-controls media-play-button {
|
|
215
|
+
--media-control-background: transparent;
|
|
216
|
+
--media-control-hover-background: transparent;
|
|
217
|
+
padding: 0;
|
|
218
|
+
width: max(43px, min(10%, 55px));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.center-controls media-seek-backward-button,
|
|
222
|
+
.center-controls media-seek-forward-button {
|
|
223
|
+
--media-control-background: transparent;
|
|
224
|
+
--media-control-hover-background: transparent;
|
|
225
|
+
padding: 0;
|
|
226
|
+
margin: 0 2%;
|
|
227
|
+
width: max(33px, min(8%, 40px));
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
media-control-bar:not([slot]) media-seek-backward-button {
|
|
231
|
+
padding-right: 5px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
media-control-bar:not([slot]) media-seek-forward-button {
|
|
235
|
+
padding-left: 5px;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
media-loading-indicator {
|
|
239
|
+
--media-loading-icon-width: 100%;
|
|
240
|
+
--media-button-icon-height: auto;
|
|
241
|
+
display: var(--media-control-display, var(--media-loading-indicator-display, flex));
|
|
242
|
+
pointer-events: none;
|
|
243
|
+
position: absolute;
|
|
244
|
+
width: min(15%, 150px);
|
|
245
|
+
flex-flow: row;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Intentionally don't target the div for transition but the children
|
|
251
|
+
of the div. Prevents messing with media-chrome's autohide feature. */
|
|
252
|
+
media-loading-indicator + div * {
|
|
253
|
+
transition: opacity 0.15s;
|
|
254
|
+
opacity: 1;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
media-loading-indicator[medialoading]:not([mediapaused]) ~ div > * {
|
|
258
|
+
opacity: 0;
|
|
259
|
+
transition-delay: 400ms;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
media-volume-range {
|
|
263
|
+
width: min(100%, 100px);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
media-time-display {
|
|
267
|
+
white-space: nowrap;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
:is(media-time-display, media-text-display, media-playback-rate-button[role='button']) {
|
|
271
|
+
color: inherit;
|
|
272
|
+
line-height: 24px;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
:is(.title-display, media-live-button) {
|
|
276
|
+
color: inherit;
|
|
277
|
+
font-size: 16px;
|
|
278
|
+
text-shadow: 0 0 2px rgb(0 0 0 / 0.6);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
:host([audio]) .title-display {
|
|
282
|
+
flex-grow: 1;
|
|
283
|
+
font-size: 21px;
|
|
284
|
+
}
|
|
285
|
+
</style>
|
|
286
|
+
|
|
287
|
+
<template partial="TitleDisplay">
|
|
288
|
+
<template if="title">
|
|
289
|
+
<media-text-display part="top title display" class="title-display">
|
|
290
|
+
{{title}}
|
|
291
|
+
</media-text-display>
|
|
292
|
+
</template>
|
|
293
|
+
</template>
|
|
294
|
+
|
|
295
|
+
<template partial="PlayButton">
|
|
296
|
+
<media-play-button
|
|
297
|
+
part="{{section ?? 'bottom'}} play button"
|
|
298
|
+
disabled="{{disabled}}"
|
|
299
|
+
aria-disabled="{{disabled}}"
|
|
300
|
+
>
|
|
301
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="play">
|
|
302
|
+
<path d="m6.73 20.93 14.05-8.54a.46.46 0 0 0 0-.78L6.73 3.07a.48.48 0 0 0-.73.39v17.07a.48.48 0 0 0 .73.4Z" />
|
|
303
|
+
</svg>
|
|
304
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="pause">
|
|
305
|
+
<path
|
|
306
|
+
d="M6 19.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v15ZM14.5 4a.5.5 0 0 0-.5.5v15a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5h-3Z"
|
|
307
|
+
/>
|
|
308
|
+
</svg>
|
|
309
|
+
</media-play-button>
|
|
310
|
+
</template>
|
|
311
|
+
|
|
312
|
+
<template partial="SeekBackwardButton">
|
|
313
|
+
<media-seek-backward-button
|
|
314
|
+
seekoffset="{{backwardseekoffset}}"
|
|
315
|
+
part="{{section ?? 'bottom'}} seek-backward button"
|
|
316
|
+
disabled="{{disabled}}"
|
|
317
|
+
aria-disabled="{{disabled}}"
|
|
318
|
+
>
|
|
319
|
+
<svg aria-hidden="true" viewBox="0 0 22 24" slot="backward">
|
|
320
|
+
<path d="M11 6V3L5.37 7 11 10.94V8a5.54 5.54 0 0 1 1.9 10.48v2.12A7.5 7.5 0 0 0 11 6Z" />
|
|
321
|
+
<text class="value" transform="translate(2.5 21)" style="font-size: 8px; font-family: 'ArialMT', 'Arial'">
|
|
322
|
+
{{backwardseekoffset}}
|
|
323
|
+
</text>
|
|
324
|
+
</svg>
|
|
325
|
+
</media-seek-backward-button>
|
|
326
|
+
</template>
|
|
327
|
+
|
|
328
|
+
<template partial="SeekForwardButton">
|
|
329
|
+
<media-seek-forward-button
|
|
330
|
+
seekoffset="{{forwardseekoffset}}"
|
|
331
|
+
part="{{section ?? 'bottom'}} seek-forward button"
|
|
332
|
+
disabled="{{disabled}}"
|
|
333
|
+
aria-disabled="{{disabled}}"
|
|
334
|
+
>
|
|
335
|
+
<svg aria-hidden="true" viewBox="0 0 22 24" slot="forward">
|
|
336
|
+
<path d="M11 6V3l5.61 4L11 10.94V8a5.54 5.54 0 0 0-1.9 10.48v2.12A7.5 7.5 0 0 1 11 6Z" />
|
|
337
|
+
<text class="value" transform="translate(10 21)" style="font-size: 8px; font-family: 'ArialMT', 'Arial'">
|
|
338
|
+
{{forwardseekoffset}}
|
|
339
|
+
</text>
|
|
340
|
+
</svg>
|
|
341
|
+
</media-seek-forward-button>
|
|
342
|
+
</template>
|
|
343
|
+
|
|
344
|
+
<template partial="MuteButton">
|
|
345
|
+
<media-mute-button part="bottom mute button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
346
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="high">
|
|
347
|
+
<path
|
|
348
|
+
d="m11.14 4.86-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.21a.5.5 0 0 0-.86-.35Zm2.74-1.56v1.52A7.52 7.52 0 0 1 19.47 12a7.52 7.52 0 0 1-5.59 7.18v1.52A9 9 0 0 0 21 12a9 9 0 0 0-7.12-8.7Zm3.56 8.7a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
|
|
349
|
+
/>
|
|
350
|
+
</svg>
|
|
351
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="low">
|
|
352
|
+
<path
|
|
353
|
+
d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
|
|
354
|
+
/>
|
|
355
|
+
</svg>
|
|
356
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="medium">
|
|
357
|
+
<path
|
|
358
|
+
d="m11.14 4.853-4 4a.49.49 0 0 1-.35.14H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.5.5 0 0 0 .85-.36V5.203a.5.5 0 0 0-.86-.35Zm6.3 7.14a5.49 5.49 0 0 0-3.56-5.1v1.66a3.93 3.93 0 0 1 0 6.88v1.66a5.49 5.49 0 0 0 3.56-5.1Z"
|
|
359
|
+
/>
|
|
360
|
+
</svg>
|
|
361
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="off">
|
|
362
|
+
<path
|
|
363
|
+
d="m3 4.05 4.48 4.47-.33.33a.49.49 0 0 1-.36.15H3.25a.25.25 0 0 0-.25.25v5.5a.25.25 0 0 0 .25.25h3.54a.49.49 0 0 1 .36.15l4 4a.48.48 0 0 0 .36.15.5.5 0 0 0 .5-.5v-5.75l4.67 4.66a7.71 7.71 0 0 1-2.79 1.47v1.52a9.32 9.32 0 0 0 3.87-1.91L20 21l1-1L4.06 3 3 4.05Zm5.36 5.36 2.39 2.39V17L8 14.26a1.74 1.74 0 0 0-1.24-.51H4.25v-3.5h2.54A1.74 1.74 0 0 0 8 9.74l.36-.33ZM19.47 12a7.19 7.19 0 0 1-.89 3.47l1.11 1.1A8.64 8.64 0 0 0 21 12a9 9 0 0 0-7.12-8.7v1.52A7.52 7.52 0 0 1 19.47 12ZM12 8.88V5.21a.5.5 0 0 0-.5-.5.48.48 0 0 0-.36.15L9.56 6.44 12 8.88ZM15.91 12a4.284 4.284 0 0 1-.07.72l1.22 1.22a5.2 5.2 0 0 0 .38-1.94 5.49 5.49 0 0 0-3.56-5.1v1.66A4 4 0 0 1 15.91 12Z"
|
|
364
|
+
/>
|
|
365
|
+
</svg>
|
|
366
|
+
</media-mute-button>
|
|
367
|
+
</template>
|
|
368
|
+
|
|
369
|
+
<template partial="RenditionSelect">
|
|
370
|
+
<media-rendition-selectmenu part="bottom rendition selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
371
|
+
<media-rendition-button slot="button" part="bottom rendition button">
|
|
372
|
+
<svg slot="icon" viewBox="0 0 18 24">
|
|
373
|
+
<path d="M2.25 14.5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm6.75 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"/>
|
|
374
|
+
</svg>
|
|
375
|
+
</media-rendition-button>
|
|
376
|
+
<media-rendition-listbox slot="listbox" part="bottom rendition listbox">
|
|
377
|
+
<div slot="header">Quality</div>
|
|
378
|
+
</media-rendition-listbox>
|
|
379
|
+
</media-rendition-selectmenu>
|
|
380
|
+
</template>
|
|
381
|
+
|
|
382
|
+
<template partial="CaptionsSelect">
|
|
383
|
+
<media-captions-selectmenu part="bottom captions selectmenu" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
384
|
+
<media-captions-button slot="button" part="bottom captions button">
|
|
385
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="on">
|
|
386
|
+
<path d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-3.62-.24-11.44-.24-15.06 0a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c3.62.24 11.44.24 15.06 0a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-11.41 10.1a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 4 4 0 0 1-1.28-.83 3.67 3.67 0 0 1-.84-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.53 3.53 0 0 1 .84-1.21 3.89 3.89 0 0 1 1.29-.8 4.76 4.76 0 0 1 1.63-.27 4.06 4.06 0 0 1 1.35.24c.225.091.44.205.64.34a2.7 2.7 0 0 1 .55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.35 2.35 0 0 0-.46.77 2.78 2.78 0 0 0-.16 1c-.009.34.046.68.16 1 .104.283.26.545.46.77.188.21.415.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.88 2.88 0 0 1-1.22 1.01Zm7.52 0a3.63 3.63 0 0 1-1.51.32 4.76 4.76 0 0 1-1.63-.27 3.89 3.89 0 0 1-1.28-.83 3.55 3.55 0 0 1-.85-1.26 4.23 4.23 0 0 1-.3-1.63 4.28 4.28 0 0 1 .3-1.64 3.43 3.43 0 0 1 .85-1.25 3.75 3.75 0 0 1 1.28-.8 4.76 4.76 0 0 1 1.63-.27 4 4 0 0 1 1.35.24c.225.091.44.205.64.34.21.144.395.32.55.52l-1.27 1a1.79 1.79 0 0 0-.6-.46 2 2 0 0 0-.83-.16 2 2 0 0 0-1.56.69 2.352 2.352 0 0 0-.46.77 3.01 3.01 0 0 0-.16 1c-.003.34.05.678.16 1 .108.282.263.542.46.77.188.21.416.38.67.5a2 2 0 0 0 .84.18 1.87 1.87 0 0 0 .9-.21 1.78 1.78 0 0 0 .65-.6l1.38 1a2.82 2.82 0 0 1-1.21 1.05Z"/>
|
|
387
|
+
</svg>
|
|
388
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="off">
|
|
389
|
+
<path d="M22.832 5.68a2.58 2.58 0 0 0-2.3-2.5c-1.81-.12-4.67-.18-7.53-.18-2.86 0-5.72.06-7.53.18a2.58 2.58 0 0 0-2.3 2.5c-.23 4.21-.23 8.43 0 12.64a2.58 2.58 0 0 0 2.3 2.5c1.81.12 4.67.18 7.53.18 2.86 0 5.72-.06 7.53-.18a2.58 2.58 0 0 0 2.3-2.5c.23-4.21.23-8.43 0-12.64Zm-1.49 12.53a1.11 1.11 0 0 1-.91 1.11c-1.67.11-4.45.18-7.43.18-2.98 0-5.76-.07-7.43-.18a1.11 1.11 0 0 1-.91-1.11c-.21-4.137-.21-8.283 0-12.42a1.11 1.11 0 0 1 .91-1.11c1.67-.11 4.43-.18 7.43-.18s5.76.07 7.43.18a1.11 1.11 0 0 1 .91 1.11c.21 4.137.21 8.283 0 12.42ZM10.843 14a1.55 1.55 0 0 1-.76.18 1.57 1.57 0 0 1-.71-.18 1.69 1.69 0 0 1-.57-.42 2.099 2.099 0 0 1-.38-.58 2.47 2.47 0 0 1 0-1.64 2 2 0 0 1 .39-.66 1.73 1.73 0 0 1 .58-.42c.23-.103.479-.158.73-.16.241-.004.48.044.7.14.199.088.373.222.51.39l1.08-.89a2.179 2.179 0 0 0-.47-.44 2.81 2.81 0 0 0-.54-.32 2.91 2.91 0 0 0-.58-.15 2.71 2.71 0 0 0-.56 0 4.08 4.08 0 0 0-1.38.15 3.27 3.27 0 0 0-1.09.67 3.14 3.14 0 0 0-.71 1.06 3.62 3.62 0 0 0-.26 1.39 3.57 3.57 0 0 0 .26 1.38 3 3 0 0 0 .71 1.06c.316.293.687.52 1.09.67.443.16.91.238 1.38.23a3.2 3.2 0 0 0 1.28-.27c.401-.183.747-.47 1-.83l-1.17-.88a1.42 1.42 0 0 1-.53.52Zm6.62 0a1.58 1.58 0 0 1-.76.18 1.54 1.54 0 0 1-.7-.18 1.69 1.69 0 0 1-.57-.42 2.12 2.12 0 0 1-.43-.58 2.29 2.29 0 0 1 .39-2.3 1.84 1.84 0 0 1 1.32-.58c.241-.003.48.045.7.14.199.088.373.222.51.39l1.08-.92a2.43 2.43 0 0 0-.47-.44 3.22 3.22 0 0 0-.53-.29 2.999 2.999 0 0 0-.57-.15 2.87 2.87 0 0 0-.57 0 4.06 4.06 0 0 0-1.36.15 3.17 3.17 0 0 0-1.09.67 3 3 0 0 0-.72 1.06 3.62 3.62 0 0 0-.25 1.39 3.57 3.57 0 0 0 .25 1.38c.16.402.405.764.72 1.06a3.17 3.17 0 0 0 1.09.67c.44.16.904.237 1.37.23.441 0 .877-.092 1.28-.27a2.45 2.45 0 0 0 1-.83l-1.15-.85a1.49 1.49 0 0 1-.54.49Z"/>
|
|
390
|
+
</svg>
|
|
391
|
+
</media-captions-button>
|
|
392
|
+
<media-captions-listbox slot="listbox" part="bottom captions listbox"></media-captions-listbox>
|
|
393
|
+
</media-captions-selectmenu>
|
|
394
|
+
</template>
|
|
395
|
+
|
|
396
|
+
<template partial="AirplayButton">
|
|
397
|
+
<media-airplay-button part="bottom airplay button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
398
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="airplay">
|
|
399
|
+
<path
|
|
400
|
+
d="M13.19 14.22a.25.25 0 0 0-.38 0l-5.46 6.37a.25.25 0 0 0 .19.41h10.92a.25.25 0 0 0 .19-.41l-5.46-6.37Z"
|
|
401
|
+
/>
|
|
402
|
+
<path
|
|
403
|
+
d="M22 3H4a1 1 0 0 0-1 1v13a1 1 0 0 0 1 1h2.94L8 16.75H4.25V4.25h17.5v12.5H18L19.06 18H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
|
|
404
|
+
/>
|
|
405
|
+
</svg>
|
|
406
|
+
</media-airplay-button>
|
|
407
|
+
</template>
|
|
408
|
+
|
|
409
|
+
<template partial="CastButton">
|
|
410
|
+
<media-cast-button part="bottom cast button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
411
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
412
|
+
<path d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z" />
|
|
413
|
+
<path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z" />
|
|
414
|
+
<path
|
|
415
|
+
d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
|
|
416
|
+
/>
|
|
417
|
+
</svg>
|
|
418
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
|
|
419
|
+
<path d="M3 15.5V17c2.206 0 4 1.794 4 4h1.5A5.5 5.5 0 0 0 3 15.5Zm0 3V21h2.5A2.5 2.5 0 0 0 3 18.5Z" />
|
|
420
|
+
<path d="M3 12.5V14c3.86 0 7 3.14 7 7h1.5A8.5 8.5 0 0 0 3 12.5Z" />
|
|
421
|
+
<path
|
|
422
|
+
d="M22 3H4a1 1 0 0 0-1 1v6.984c.424 0 .84.035 1.25.086V4.25h17.5v15.5h-8.82c.051.41.086.826.086 1.25H22a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1Z"
|
|
423
|
+
/>
|
|
424
|
+
<path d="M20.5 5.5h-15v5.811c3.52.906 6.283 3.67 7.189 7.19H20.5V5.5Z" />
|
|
425
|
+
</svg>
|
|
426
|
+
</media-cast-button>
|
|
427
|
+
</template>
|
|
428
|
+
|
|
429
|
+
<template partial="PipButton">
|
|
430
|
+
<media-pip-button part="bottom pip button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
431
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="enter">
|
|
432
|
+
<path
|
|
433
|
+
d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
|
|
434
|
+
/>
|
|
435
|
+
</svg>
|
|
436
|
+
<svg aria-hidden="true" viewBox="0 0 26 24" slot="exit">
|
|
437
|
+
<path
|
|
438
|
+
d="M22 3H4a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h6.75v-1.25h-6.5V4.25h17.5v6.5H23V4a1 1 0 0 0-1-1Zm0 10h-8a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1Zm-.5 6.5h-7v-5h7v5Z"
|
|
439
|
+
/>
|
|
440
|
+
</svg>
|
|
441
|
+
</media-pip-button>
|
|
442
|
+
</template>
|
|
443
|
+
|
|
444
|
+
<template partial="FullscreenButton">
|
|
445
|
+
<media-fullscreen-button part="bottom fullscreen button" disabled="{{disabled}}" aria-disabled="{{disabled}}">
|
|
446
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="enter">
|
|
447
|
+
<path
|
|
448
|
+
d="M20.25 14.5a.76.76 0 0 0-.75.75v4.25h-4.25a.75.75 0 1 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5a.76.76 0 0 0-.75-.75Zm0-11.5h-5a.76.76 0 0 0-.75.75.76.76 0 0 0 .75.75h4.25v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75ZM8.75 19.5H4.5v-4.25a.76.76 0 0 0-.75-.75.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75h5a.75.75 0 1 0 0-1.5Zm0-16.5h-5a.76.76 0 0 0-.75.75v5a.76.76 0 0 0 .75.75.76.76 0 0 0 .75-.75V4.5h4.25a.76.76 0 0 0 .75-.75.76.76 0 0 0-.75-.75Z"
|
|
449
|
+
/>
|
|
450
|
+
</svg>
|
|
451
|
+
<svg aria-hidden="true" viewBox="0 0 24 24" slot="exit">
|
|
452
|
+
<path
|
|
453
|
+
d="M20.25 14.5h-5a.76.76 0 0 0-.75.75v5a.75.75 0 1 0 1.5 0V16h4.25a.75.75 0 1 0 0-1.5Zm-5-5h5a.75.75 0 1 0 0-1.5H16V3.75a.75.75 0 1 0-1.5 0v5a.76.76 0 0 0 .75.75Zm-6.5 5h-5a.75.75 0 1 0 0 1.5H8v4.25a.75.75 0 1 0 1.5 0v-5a.76.76 0 0 0-.75-.75Zm0-11.5a.76.76 0 0 0-.75.75V8H3.75a.75.75 0 0 0 0 1.5h5a.76.76 0 0 0 .75-.75v-5A.76.76 0 0 0 8.75 3Z"
|
|
454
|
+
/>
|
|
455
|
+
</svg>
|
|
456
|
+
</media-fullscreen-button>
|
|
457
|
+
</template>
|
|
458
|
+
|
|
459
|
+
<template partial="LiveButton">
|
|
460
|
+
<media-live-button
|
|
461
|
+
part="{{section ?? 'top'}} live button"
|
|
462
|
+
disabled="{{disabled}}"
|
|
463
|
+
aria-disabled="{{disabled}}"
|
|
464
|
+
></media-live-button>
|
|
465
|
+
</template>
|
|
466
|
+
|
|
467
|
+
<template partial="PlaybackRateButton">
|
|
468
|
+
<media-playback-rate-button
|
|
469
|
+
rates="{{playbackrates}}"
|
|
470
|
+
part="bottom playback-rate button"
|
|
471
|
+
disabled="{{disabled}}"
|
|
472
|
+
aria-disabled="{{disabled}}"
|
|
473
|
+
></media-playback-rate-button>
|
|
474
|
+
</template>
|
|
475
|
+
|
|
476
|
+
<template partial="VolumeRange">
|
|
477
|
+
<media-volume-range
|
|
478
|
+
part="bottom volume range"
|
|
479
|
+
disabled="{{disabled}}"
|
|
480
|
+
aria-disabled="{{disabled}}"
|
|
481
|
+
></media-volume-range>
|
|
482
|
+
</template>
|
|
483
|
+
|
|
484
|
+
<template partial="TimeDisplay">
|
|
485
|
+
<media-time-display
|
|
486
|
+
remaining="{{defaultshowremainingtime}}"
|
|
487
|
+
showduration="{{!hideduration}}"
|
|
488
|
+
part="bottom time display"
|
|
489
|
+
disabled="{{disabled}}"
|
|
490
|
+
aria-disabled="{{disabled}}"
|
|
491
|
+
></media-time-display>
|
|
492
|
+
</template>
|
|
493
|
+
|
|
494
|
+
<template partial="TimeRange">
|
|
495
|
+
<media-time-range
|
|
496
|
+
part="bottom time range"
|
|
497
|
+
disabled="{{disabled}}"
|
|
498
|
+
aria-disabled="{{disabled}}"
|
|
499
|
+
></media-time-range>
|
|
500
|
+
</template>
|
|
501
|
+
|
|
502
|
+
<media-controller
|
|
503
|
+
part="controller"
|
|
504
|
+
defaultstreamtype="{{defaultstreamtype ?? 'on-demand'}}"
|
|
505
|
+
breakpoints="sm:300 md:700"
|
|
506
|
+
gesturesdisabled="{{disabled}}"
|
|
507
|
+
hotkeys="{{hotkeys}}"
|
|
508
|
+
nohotkeys="{{nohotkeys}}"
|
|
509
|
+
novolumepref="{{novolumepref}}"
|
|
510
|
+
audio="{{audio}}"
|
|
511
|
+
noautoseektolive="{{noautoseektolive}}"
|
|
512
|
+
defaultsubtitles="{{defaultsubtitles}}"
|
|
513
|
+
exportparts="layer, media-layer, poster-layer, vertical-layer, centered-layer, gesture-layer"
|
|
514
|
+
>
|
|
515
|
+
<slot name="media" slot="media"></slot>
|
|
516
|
+
<slot name="poster" slot="poster"></slot>
|
|
517
|
+
<media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
|
|
518
|
+
|
|
519
|
+
<template if="audio">
|
|
520
|
+
|
|
521
|
+
<template if="streamtype == 'on-demand'">
|
|
522
|
+
<template if="title">
|
|
523
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
524
|
+
</template>
|
|
525
|
+
<media-control-bar>
|
|
526
|
+
{{>PlayButton}}
|
|
527
|
+
{{>SeekBackwardButton}}
|
|
528
|
+
{{>SeekForwardButton}}
|
|
529
|
+
{{>TimeDisplay}}
|
|
530
|
+
{{>TimeRange}}
|
|
531
|
+
{{>MuteButton}}
|
|
532
|
+
{{>VolumeRange}}
|
|
533
|
+
{{>PlaybackRateButton}}
|
|
534
|
+
{{>AirplayButton}}
|
|
535
|
+
{{>CastButton}}
|
|
536
|
+
</media-control-bar>
|
|
537
|
+
</template>
|
|
538
|
+
|
|
539
|
+
<template if="streamtype == 'live'">
|
|
540
|
+
|
|
541
|
+
<template if="targetlivewindow > 0">
|
|
542
|
+
<template if="title">
|
|
543
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
544
|
+
</template>
|
|
545
|
+
<media-control-bar>
|
|
546
|
+
{{>PlayButton}}
|
|
547
|
+
{{>LiveButton section="bottom"}}
|
|
548
|
+
{{>SeekBackwardButton}}
|
|
549
|
+
{{>SeekForwardButton}}
|
|
550
|
+
{{>TimeDisplay}}
|
|
551
|
+
{{>TimeRange}}
|
|
552
|
+
{{>MuteButton}}
|
|
553
|
+
{{>VolumeRange}}
|
|
554
|
+
{{>PlaybackRateButton}}
|
|
555
|
+
{{>AirplayButton}}
|
|
556
|
+
{{>CastButton}}
|
|
557
|
+
</media-control-bar>
|
|
558
|
+
</template>
|
|
559
|
+
|
|
560
|
+
<template if="!targetlivewindow">
|
|
561
|
+
<template if="title">
|
|
562
|
+
<media-control-bar>{{>TitleDisplay}}</media-control-bar>
|
|
563
|
+
</template>
|
|
564
|
+
<media-control-bar>
|
|
565
|
+
{{>PlayButton}}
|
|
566
|
+
{{>LiveButton section="bottom"}}
|
|
567
|
+
{{>MuteButton}}
|
|
568
|
+
{{>VolumeRange}}
|
|
569
|
+
<div class="spacer"></div>
|
|
570
|
+
{{>AirplayButton}}
|
|
571
|
+
{{>CastButton}}
|
|
572
|
+
</media-control-bar>
|
|
573
|
+
</template>
|
|
574
|
+
|
|
575
|
+
</template>
|
|
576
|
+
</template>
|
|
577
|
+
|
|
578
|
+
<template if="!audio">
|
|
579
|
+
|
|
580
|
+
<template if="streamtype == 'on-demand'">
|
|
581
|
+
|
|
582
|
+
<template if="!breakpointsm">
|
|
583
|
+
{{>TimeRange}}
|
|
584
|
+
<media-control-bar>
|
|
585
|
+
{{>PlayButton}}
|
|
586
|
+
{{>MuteButton}}
|
|
587
|
+
<div class="spacer"></div>
|
|
588
|
+
{{>CaptionsSelect}}
|
|
589
|
+
{{>FullscreenButton}}
|
|
590
|
+
</media-control-bar>
|
|
591
|
+
</template>
|
|
592
|
+
|
|
593
|
+
<template if="breakpointsm">
|
|
594
|
+
<template if="!breakpointmd">
|
|
595
|
+
<media-control-bar slot="top-chrome">
|
|
596
|
+
{{>TitleDisplay}}
|
|
597
|
+
</media-control-bar>
|
|
598
|
+
<div slot="centered-chrome" class="center-controls">
|
|
599
|
+
{{>SeekBackwardButton section="center"}}
|
|
600
|
+
{{>PlayButton section="center"}}
|
|
601
|
+
{{>SeekForwardButton section="center"}}
|
|
602
|
+
</div>
|
|
603
|
+
{{>TimeRange}}
|
|
604
|
+
<media-control-bar>
|
|
605
|
+
{{>PlayButton}}
|
|
606
|
+
{{>TimeDisplay}}
|
|
607
|
+
{{>MuteButton}}
|
|
608
|
+
{{>VolumeRange}}
|
|
609
|
+
<div class="spacer"></div>
|
|
610
|
+
{{>RenditionSelect}}
|
|
611
|
+
{{>PlaybackRateButton}}
|
|
612
|
+
{{>CaptionsSelect}}
|
|
613
|
+
{{>AirplayButton}}
|
|
614
|
+
{{>CastButton}}
|
|
615
|
+
{{>PipButton}}
|
|
616
|
+
{{>FullscreenButton}}
|
|
617
|
+
</media-control-bar>
|
|
618
|
+
</template>
|
|
619
|
+
</template>
|
|
620
|
+
|
|
621
|
+
<template if="breakpointmd">
|
|
622
|
+
<media-control-bar slot="top-chrome">
|
|
623
|
+
{{>TitleDisplay}}
|
|
624
|
+
</media-control-bar>
|
|
625
|
+
<div slot="centered-chrome" class="center-controls">
|
|
626
|
+
{{>PlayButton section="center"}}
|
|
627
|
+
</div>
|
|
628
|
+
{{>TimeRange}}
|
|
629
|
+
<media-control-bar>
|
|
630
|
+
{{>PlayButton}}
|
|
631
|
+
{{>SeekBackwardButton}}
|
|
632
|
+
{{>SeekForwardButton}}
|
|
633
|
+
{{>TimeDisplay}}
|
|
634
|
+
{{>MuteButton}}
|
|
635
|
+
{{>VolumeRange}}
|
|
636
|
+
<div class="spacer"></div>
|
|
637
|
+
{{>RenditionSelect}}
|
|
638
|
+
{{>PlaybackRateButton}}
|
|
639
|
+
{{>CaptionsSelect}}
|
|
640
|
+
{{>AirplayButton}}
|
|
641
|
+
{{>CastButton}}
|
|
642
|
+
{{>PipButton}}
|
|
643
|
+
{{>FullscreenButton}}
|
|
644
|
+
</media-control-bar>
|
|
645
|
+
</template>
|
|
646
|
+
|
|
647
|
+
</template>
|
|
648
|
+
|
|
649
|
+
<template if="streamtype == 'live'">
|
|
650
|
+
|
|
651
|
+
<template if="!targetlivewindow">
|
|
652
|
+
|
|
653
|
+
<template if="!breakpointsm">
|
|
654
|
+
<media-control-bar slot="top-chrome">
|
|
655
|
+
{{>LiveButton}}
|
|
656
|
+
</media-control-bar>
|
|
657
|
+
<media-control-bar>
|
|
658
|
+
{{>PlayButton}}
|
|
659
|
+
{{>MuteButton}}
|
|
660
|
+
<div class="spacer"></div>
|
|
661
|
+
{{>CaptionsSelect}}
|
|
662
|
+
{{>FullscreenButton}}
|
|
663
|
+
</media-control-bar>
|
|
664
|
+
</template>
|
|
665
|
+
|
|
666
|
+
<template if="breakpointsm">
|
|
667
|
+
<template if="!breakpointmd">
|
|
668
|
+
<media-control-bar slot="top-chrome">
|
|
669
|
+
{{>LiveButton}}
|
|
670
|
+
{{>TitleDisplay}}
|
|
671
|
+
</media-control-bar>
|
|
672
|
+
<div slot="centered-chrome" class="center-controls">
|
|
673
|
+
{{>PlayButton section="center"}}
|
|
674
|
+
</div>
|
|
675
|
+
<media-control-bar>
|
|
676
|
+
{{>PlayButton}}
|
|
677
|
+
{{>MuteButton}}
|
|
678
|
+
{{>VolumeRange}}
|
|
679
|
+
<div class="spacer"></div>
|
|
680
|
+
{{>RenditionSelect}}
|
|
681
|
+
{{>CaptionsSelect}}
|
|
682
|
+
{{>AirplayButton}}
|
|
683
|
+
{{>CastButton}}
|
|
684
|
+
{{>PipButton}}
|
|
685
|
+
{{>FullscreenButton}}
|
|
686
|
+
</media-control-bar>
|
|
687
|
+
</template>
|
|
688
|
+
</template>
|
|
689
|
+
|
|
690
|
+
<template if="breakpointmd">
|
|
691
|
+
<media-control-bar slot="top-chrome">
|
|
692
|
+
{{>LiveButton}}
|
|
693
|
+
{{>TitleDisplay}}
|
|
694
|
+
</media-control-bar>
|
|
695
|
+
<div slot="centered-chrome" class="center-controls">
|
|
696
|
+
{{>PlayButton section="center"}}
|
|
697
|
+
</div>
|
|
698
|
+
<media-control-bar>
|
|
699
|
+
{{>PlayButton}}
|
|
700
|
+
{{>MuteButton}}
|
|
701
|
+
{{>VolumeRange}}
|
|
702
|
+
<div class="spacer"></div>
|
|
703
|
+
{{>RenditionSelect}}
|
|
704
|
+
{{>CaptionsSelect}}
|
|
705
|
+
{{>AirplayButton}}
|
|
706
|
+
{{>CastButton}}
|
|
707
|
+
{{>PipButton}}
|
|
708
|
+
{{>FullscreenButton}}
|
|
709
|
+
</media-control-bar>
|
|
710
|
+
</template>
|
|
711
|
+
</template>
|
|
712
|
+
|
|
713
|
+
<template if="targetlivewindow > 0">
|
|
714
|
+
|
|
715
|
+
<template if="!breakpointsm">
|
|
716
|
+
<media-control-bar slot="top-chrome">
|
|
717
|
+
{{>LiveButton}}
|
|
718
|
+
</media-control-bar>
|
|
719
|
+
{{>TimeRange}}
|
|
720
|
+
<media-control-bar>
|
|
721
|
+
{{>PlayButton}}
|
|
722
|
+
{{>MuteButton}}
|
|
723
|
+
<div class="spacer"></div>
|
|
724
|
+
{{>CaptionsSelect}}
|
|
725
|
+
{{>FullscreenButton}}
|
|
726
|
+
</media-control-bar>
|
|
727
|
+
</template>
|
|
728
|
+
|
|
729
|
+
<template if="breakpointsm">
|
|
730
|
+
<template if="!breakpointmd">
|
|
731
|
+
<media-control-bar slot="top-chrome">
|
|
732
|
+
{{>LiveButton}}
|
|
733
|
+
{{>TitleDisplay}}
|
|
734
|
+
</media-control-bar>
|
|
735
|
+
<div slot="centered-chrome" class="center-controls">
|
|
736
|
+
{{>SeekBackwardButton section="center"}}
|
|
737
|
+
{{>PlayButton section="center"}}
|
|
738
|
+
{{>SeekForwardButton section="center"}}
|
|
739
|
+
</div>
|
|
740
|
+
{{>TimeRange}}
|
|
741
|
+
<media-control-bar>
|
|
742
|
+
{{>PlayButton}}
|
|
743
|
+
{{>MuteButton}}
|
|
744
|
+
{{>VolumeRange}}
|
|
745
|
+
<div class="spacer"></div>
|
|
746
|
+
{{>RenditionSelect}}
|
|
747
|
+
{{>CaptionsSelect}}
|
|
748
|
+
{{>AirplayButton}}
|
|
749
|
+
{{>CastButton}}
|
|
750
|
+
{{>PipButton}}
|
|
751
|
+
{{>FullscreenButton}}
|
|
752
|
+
</media-control-bar>
|
|
753
|
+
</template>
|
|
754
|
+
</template>
|
|
755
|
+
|
|
756
|
+
<template if="breakpointmd">
|
|
757
|
+
<media-control-bar slot="top-chrome">
|
|
758
|
+
{{>LiveButton}}
|
|
759
|
+
{{>TitleDisplay}}
|
|
760
|
+
</media-control-bar>
|
|
761
|
+
<div slot="centered-chrome" class="center-controls">
|
|
762
|
+
{{>PlayButton section="center"}}
|
|
763
|
+
</div>
|
|
764
|
+
{{>TimeRange}}
|
|
765
|
+
<media-control-bar>
|
|
766
|
+
{{>PlayButton}}
|
|
767
|
+
{{>SeekBackwardButton}}
|
|
768
|
+
{{>SeekForwardButton}}
|
|
769
|
+
{{>MuteButton}}
|
|
770
|
+
{{>VolumeRange}}
|
|
771
|
+
<div class="spacer"></div>
|
|
772
|
+
{{>RenditionSelect}}
|
|
773
|
+
{{>CaptionsSelect}}
|
|
774
|
+
{{>AirplayButton}}
|
|
775
|
+
{{>CastButton}}
|
|
776
|
+
{{>PipButton}}
|
|
777
|
+
{{>FullscreenButton}}
|
|
778
|
+
</media-control-bar>
|
|
779
|
+
</template>
|
|
780
|
+
|
|
781
|
+
</template>
|
|
782
|
+
|
|
783
|
+
</template>
|
|
784
|
+
|
|
785
|
+
</template>
|
|
786
|
+
|
|
787
|
+
<slot></slot>
|
|
788
|
+
|
|
789
|
+
</media-controller>
|
|
790
|
+
</template>
|
|
791
|
+
`;
|
|
792
|
+
|
|
793
|
+
// src/polyfills/index.ts
|
|
794
|
+
var EventTarget = class {
|
|
795
|
+
addEventListener() {
|
|
796
|
+
}
|
|
797
|
+
removeEventListener() {
|
|
798
|
+
}
|
|
799
|
+
dispatchEvent(_event) {
|
|
800
|
+
return true;
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
if (typeof DocumentFragment === "undefined") {
|
|
804
|
+
class DocumentFragment3 extends EventTarget {
|
|
805
|
+
}
|
|
806
|
+
globalThis.DocumentFragment = DocumentFragment3;
|
|
807
|
+
}
|
|
808
|
+
var HTMLElement = class extends EventTarget {
|
|
809
|
+
};
|
|
810
|
+
var HTMLVideoElement = class extends EventTarget {
|
|
811
|
+
};
|
|
812
|
+
var customElements = {
|
|
813
|
+
get(_name) {
|
|
814
|
+
return void 0;
|
|
815
|
+
},
|
|
816
|
+
define(_name, _constructor, _options) {
|
|
817
|
+
},
|
|
818
|
+
upgrade(_root) {
|
|
819
|
+
},
|
|
820
|
+
whenDefined(_name) {
|
|
821
|
+
return Promise.resolve(HTMLElement);
|
|
822
|
+
}
|
|
823
|
+
};
|
|
824
|
+
var _detail;
|
|
825
|
+
var CustomEvent = class {
|
|
826
|
+
constructor(typeArg, eventInitDict = {}) {
|
|
827
|
+
__privateAdd(this, _detail, void 0);
|
|
828
|
+
__privateSet(this, _detail, eventInitDict == null ? void 0 : eventInitDict.detail);
|
|
829
|
+
}
|
|
830
|
+
get detail() {
|
|
831
|
+
return __privateGet(this, _detail);
|
|
832
|
+
}
|
|
833
|
+
initCustomEvent() {
|
|
834
|
+
}
|
|
835
|
+
};
|
|
836
|
+
_detail = new WeakMap();
|
|
837
|
+
function createElement(_tagName, _options) {
|
|
838
|
+
return new HTMLElement();
|
|
839
|
+
}
|
|
840
|
+
var globalThisShim = {
|
|
841
|
+
document: {
|
|
842
|
+
createElement
|
|
843
|
+
},
|
|
844
|
+
DocumentFragment,
|
|
845
|
+
customElements,
|
|
846
|
+
CustomEvent,
|
|
847
|
+
EventTarget,
|
|
848
|
+
HTMLElement,
|
|
849
|
+
HTMLVideoElement
|
|
850
|
+
};
|
|
851
|
+
var isServer = typeof window === "undefined" || typeof globalThis.customElements === "undefined";
|
|
852
|
+
var internalGlobalThis = isServer ? globalThisShim : globalThis;
|
|
853
|
+
var internalDocument = isServer ? globalThisShim.document : globalThis.document;
|
|
854
|
+
|
|
855
|
+
// ../../node_modules/media-chrome/dist/utils/server-safe-globals.js
|
|
856
|
+
var EventTarget2 = class {
|
|
857
|
+
addEventListener() {
|
|
858
|
+
}
|
|
859
|
+
removeEventListener() {
|
|
860
|
+
}
|
|
861
|
+
dispatchEvent() {
|
|
862
|
+
return true;
|
|
863
|
+
}
|
|
864
|
+
};
|
|
865
|
+
var ResizeObserver = class {
|
|
866
|
+
observe() {
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
var documentShim = {
|
|
870
|
+
createElement: function() {
|
|
871
|
+
return new globalThisShim2.HTMLElement();
|
|
872
|
+
},
|
|
873
|
+
addEventListener() {
|
|
874
|
+
},
|
|
875
|
+
removeEventListener() {
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
var globalThisShim2 = {
|
|
879
|
+
ResizeObserver,
|
|
880
|
+
document: documentShim,
|
|
881
|
+
HTMLElement: class HTMLElement2 extends EventTarget2 {
|
|
882
|
+
},
|
|
883
|
+
DocumentFragment: class DocumentFragment2 extends EventTarget2 {
|
|
884
|
+
},
|
|
885
|
+
customElements: {
|
|
886
|
+
get: function() {
|
|
887
|
+
},
|
|
888
|
+
define: function() {
|
|
889
|
+
},
|
|
890
|
+
whenDefined: function() {
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
CustomEvent: function CustomEvent2() {
|
|
894
|
+
},
|
|
895
|
+
getComputedStyle: function() {
|
|
896
|
+
}
|
|
897
|
+
};
|
|
898
|
+
var isServer2 = typeof window === "undefined" || typeof window.customElements === "undefined";
|
|
899
|
+
var isShimmed = Object.keys(globalThisShim2).every((key) => key in globalThis);
|
|
900
|
+
var GlobalThis = isServer2 && !isShimmed ? globalThisShim2 : globalThis;
|
|
901
|
+
var Document = isServer2 && !isShimmed ? documentShim : globalThis.document;
|
|
902
|
+
|
|
903
|
+
// ../../node_modules/media-chrome/dist/utils/template-parts.js
|
|
904
|
+
var __defProp = Object.defineProperty;
|
|
905
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
906
|
+
var __publicField = (obj, key, value) => {
|
|
907
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
908
|
+
return value;
|
|
909
|
+
};
|
|
910
|
+
var __accessCheck2 = (obj, member, msg) => {
|
|
911
|
+
if (!member.has(obj))
|
|
912
|
+
throw TypeError("Cannot " + msg);
|
|
913
|
+
};
|
|
914
|
+
var __privateGet2 = (obj, member, getter) => {
|
|
915
|
+
__accessCheck2(obj, member, "read from private field");
|
|
916
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
917
|
+
};
|
|
918
|
+
var __privateAdd2 = (obj, member, value) => {
|
|
919
|
+
if (member.has(obj))
|
|
920
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
921
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
922
|
+
};
|
|
923
|
+
var __privateSet2 = (obj, member, value, setter) => {
|
|
924
|
+
__accessCheck2(obj, member, "write to private field");
|
|
925
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
926
|
+
return value;
|
|
927
|
+
};
|
|
928
|
+
var _parts;
|
|
929
|
+
var _processor;
|
|
930
|
+
var _items;
|
|
931
|
+
var _value;
|
|
932
|
+
var _element;
|
|
933
|
+
var _attributeName;
|
|
934
|
+
var _namespaceURI;
|
|
935
|
+
var _list;
|
|
936
|
+
var list_get;
|
|
937
|
+
var _parentNode;
|
|
938
|
+
var _nodes;
|
|
939
|
+
var ELEMENT = 1;
|
|
940
|
+
var STRING = 0;
|
|
941
|
+
var PART = 1;
|
|
942
|
+
var defaultProcessor = {
|
|
943
|
+
processCallback(instance, parts, state) {
|
|
944
|
+
if (!state)
|
|
945
|
+
return;
|
|
946
|
+
for (const [expression, part] of parts) {
|
|
947
|
+
if (expression in state) {
|
|
948
|
+
const value = state[expression];
|
|
949
|
+
if (typeof value === "boolean" && part instanceof AttrPart && typeof part.element[part.attributeName] === "boolean") {
|
|
950
|
+
part.booleanValue = value;
|
|
951
|
+
} else if (typeof value === "function" && part instanceof AttrPart) {
|
|
952
|
+
part.element[part.attributeName] = value;
|
|
953
|
+
} else {
|
|
954
|
+
part.value = value;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
var TemplateInstance = class extends GlobalThis.DocumentFragment {
|
|
961
|
+
constructor(template2, state, processor2 = defaultProcessor) {
|
|
962
|
+
var _a2;
|
|
963
|
+
super();
|
|
964
|
+
__privateAdd2(this, _parts, void 0);
|
|
965
|
+
__privateAdd2(this, _processor, void 0);
|
|
966
|
+
this.append(template2.content.cloneNode(true));
|
|
967
|
+
__privateSet2(this, _parts, parse(this));
|
|
968
|
+
__privateSet2(this, _processor, processor2);
|
|
969
|
+
(_a2 = processor2.createCallback) == null ? void 0 : _a2.call(processor2, this, __privateGet2(this, _parts), state);
|
|
970
|
+
processor2.processCallback(this, __privateGet2(this, _parts), state);
|
|
971
|
+
}
|
|
972
|
+
update(state) {
|
|
973
|
+
__privateGet2(this, _processor).processCallback(this, __privateGet2(this, _parts), state);
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
_parts = /* @__PURE__ */ new WeakMap();
|
|
977
|
+
_processor = /* @__PURE__ */ new WeakMap();
|
|
978
|
+
var parse = (element, parts = []) => {
|
|
979
|
+
let type, value;
|
|
980
|
+
for (let attr of element.attributes || []) {
|
|
981
|
+
if (attr.value.includes("{{")) {
|
|
982
|
+
const list = new AttrPartList();
|
|
983
|
+
for ([type, value] of tokenize(attr.value)) {
|
|
984
|
+
if (!type)
|
|
985
|
+
list.append(value);
|
|
986
|
+
else {
|
|
987
|
+
const part = new AttrPart(element, attr.name, attr.namespaceURI);
|
|
988
|
+
list.append(part);
|
|
989
|
+
parts.push([value, part]);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
attr.value = list.toString();
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
for (let node of element.childNodes) {
|
|
996
|
+
if (node.nodeType === ELEMENT && !(node instanceof HTMLTemplateElement)) {
|
|
997
|
+
parse(node, parts);
|
|
998
|
+
} else {
|
|
999
|
+
if (node.nodeType === ELEMENT || node.data.includes("{{")) {
|
|
1000
|
+
const items = [];
|
|
1001
|
+
if (node.data) {
|
|
1002
|
+
for ([type, value] of tokenize(node.data))
|
|
1003
|
+
if (!type)
|
|
1004
|
+
items.push(new Text(value));
|
|
1005
|
+
else {
|
|
1006
|
+
const part = new ChildNodePart(element);
|
|
1007
|
+
items.push(part);
|
|
1008
|
+
parts.push([value, part]);
|
|
1009
|
+
}
|
|
1010
|
+
} else if (node instanceof HTMLTemplateElement) {
|
|
1011
|
+
const part = new InnerTemplatePart(element, node);
|
|
1012
|
+
items.push(part);
|
|
1013
|
+
parts.push([part.expression, part]);
|
|
1014
|
+
}
|
|
1015
|
+
node.replaceWith(
|
|
1016
|
+
...items.flatMap((part) => part.replacementNodes || [part])
|
|
1017
|
+
);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
return parts;
|
|
1022
|
+
};
|
|
1023
|
+
var mem = {};
|
|
1024
|
+
var tokenize = (text) => {
|
|
1025
|
+
let value = "", open = 0, tokens = mem[text], i = 0, c;
|
|
1026
|
+
if (tokens)
|
|
1027
|
+
return tokens;
|
|
1028
|
+
else
|
|
1029
|
+
tokens = [];
|
|
1030
|
+
for (; c = text[i]; i++) {
|
|
1031
|
+
if (c === "{" && text[i + 1] === "{" && text[i - 1] !== "\\" && text[i + 2] && ++open == 1) {
|
|
1032
|
+
if (value)
|
|
1033
|
+
tokens.push([STRING, value]);
|
|
1034
|
+
value = "";
|
|
1035
|
+
i++;
|
|
1036
|
+
} else if (c === "}" && text[i + 1] === "}" && text[i - 1] !== "\\" && !--open) {
|
|
1037
|
+
tokens.push([PART, value.trim()]);
|
|
1038
|
+
value = "";
|
|
1039
|
+
i++;
|
|
1040
|
+
} else
|
|
1041
|
+
value += c || "";
|
|
1042
|
+
}
|
|
1043
|
+
if (value)
|
|
1044
|
+
tokens.push([STRING, (open > 0 ? "{{" : "") + value]);
|
|
1045
|
+
return mem[text] = tokens;
|
|
1046
|
+
};
|
|
1047
|
+
var FRAGMENT = 11;
|
|
1048
|
+
var Part = class {
|
|
1049
|
+
get value() {
|
|
1050
|
+
return "";
|
|
1051
|
+
}
|
|
1052
|
+
set value(val) {
|
|
1053
|
+
}
|
|
1054
|
+
toString() {
|
|
1055
|
+
return this.value;
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
var attrPartToList = /* @__PURE__ */ new WeakMap();
|
|
1059
|
+
var AttrPartList = class {
|
|
1060
|
+
constructor() {
|
|
1061
|
+
__privateAdd2(this, _items, []);
|
|
1062
|
+
}
|
|
1063
|
+
[Symbol.iterator]() {
|
|
1064
|
+
return __privateGet2(this, _items).values();
|
|
1065
|
+
}
|
|
1066
|
+
get length() {
|
|
1067
|
+
return __privateGet2(this, _items).length;
|
|
1068
|
+
}
|
|
1069
|
+
item(index) {
|
|
1070
|
+
return __privateGet2(this, _items)[index];
|
|
1071
|
+
}
|
|
1072
|
+
append(...items) {
|
|
1073
|
+
for (const item of items) {
|
|
1074
|
+
if (item instanceof AttrPart) {
|
|
1075
|
+
attrPartToList.set(item, this);
|
|
1076
|
+
}
|
|
1077
|
+
__privateGet2(this, _items).push(item);
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
toString() {
|
|
1081
|
+
return __privateGet2(this, _items).join("");
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
_items = /* @__PURE__ */ new WeakMap();
|
|
1085
|
+
var AttrPart = class extends Part {
|
|
1086
|
+
constructor(element, attributeName, namespaceURI) {
|
|
1087
|
+
super();
|
|
1088
|
+
__privateAdd2(this, _list);
|
|
1089
|
+
__privateAdd2(this, _value, "");
|
|
1090
|
+
__privateAdd2(this, _element, void 0);
|
|
1091
|
+
__privateAdd2(this, _attributeName, void 0);
|
|
1092
|
+
__privateAdd2(this, _namespaceURI, void 0);
|
|
1093
|
+
__privateSet2(this, _element, element);
|
|
1094
|
+
__privateSet2(this, _attributeName, attributeName);
|
|
1095
|
+
__privateSet2(this, _namespaceURI, namespaceURI);
|
|
1096
|
+
}
|
|
1097
|
+
get attributeName() {
|
|
1098
|
+
return __privateGet2(this, _attributeName);
|
|
1099
|
+
}
|
|
1100
|
+
get attributeNamespace() {
|
|
1101
|
+
return __privateGet2(this, _namespaceURI);
|
|
1102
|
+
}
|
|
1103
|
+
get element() {
|
|
1104
|
+
return __privateGet2(this, _element);
|
|
1105
|
+
}
|
|
1106
|
+
get value() {
|
|
1107
|
+
return __privateGet2(this, _value);
|
|
1108
|
+
}
|
|
1109
|
+
set value(newValue) {
|
|
1110
|
+
if (__privateGet2(this, _value) === newValue)
|
|
1111
|
+
return;
|
|
1112
|
+
__privateSet2(this, _value, newValue);
|
|
1113
|
+
if (!__privateGet2(this, _list, list_get) || __privateGet2(this, _list, list_get).length === 1) {
|
|
1114
|
+
if (newValue == null) {
|
|
1115
|
+
__privateGet2(this, _element).removeAttributeNS(
|
|
1116
|
+
__privateGet2(this, _namespaceURI),
|
|
1117
|
+
__privateGet2(this, _attributeName)
|
|
1118
|
+
);
|
|
1119
|
+
} else {
|
|
1120
|
+
__privateGet2(this, _element).setAttributeNS(
|
|
1121
|
+
__privateGet2(this, _namespaceURI),
|
|
1122
|
+
__privateGet2(this, _attributeName),
|
|
1123
|
+
newValue
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
} else {
|
|
1127
|
+
__privateGet2(this, _element).setAttributeNS(
|
|
1128
|
+
__privateGet2(this, _namespaceURI),
|
|
1129
|
+
__privateGet2(this, _attributeName),
|
|
1130
|
+
__privateGet2(this, _list, list_get)
|
|
1131
|
+
);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
get booleanValue() {
|
|
1135
|
+
return __privateGet2(this, _element).hasAttributeNS(
|
|
1136
|
+
__privateGet2(this, _namespaceURI),
|
|
1137
|
+
__privateGet2(this, _attributeName)
|
|
1138
|
+
);
|
|
1139
|
+
}
|
|
1140
|
+
set booleanValue(value) {
|
|
1141
|
+
if (!__privateGet2(this, _list, list_get) || __privateGet2(this, _list, list_get).length === 1)
|
|
1142
|
+
this.value = value ? "" : null;
|
|
1143
|
+
else
|
|
1144
|
+
throw new DOMException("Value is not fully templatized");
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
_value = /* @__PURE__ */ new WeakMap();
|
|
1148
|
+
_element = /* @__PURE__ */ new WeakMap();
|
|
1149
|
+
_attributeName = /* @__PURE__ */ new WeakMap();
|
|
1150
|
+
_namespaceURI = /* @__PURE__ */ new WeakMap();
|
|
1151
|
+
_list = /* @__PURE__ */ new WeakSet();
|
|
1152
|
+
list_get = function() {
|
|
1153
|
+
return attrPartToList.get(this);
|
|
1154
|
+
};
|
|
1155
|
+
var ChildNodePart = class extends Part {
|
|
1156
|
+
constructor(parentNode, nodes) {
|
|
1157
|
+
super();
|
|
1158
|
+
__privateAdd2(this, _parentNode, void 0);
|
|
1159
|
+
__privateAdd2(this, _nodes, void 0);
|
|
1160
|
+
__privateSet2(this, _parentNode, parentNode);
|
|
1161
|
+
__privateSet2(this, _nodes, nodes ? [...nodes] : [new Text()]);
|
|
1162
|
+
}
|
|
1163
|
+
get replacementNodes() {
|
|
1164
|
+
return __privateGet2(this, _nodes);
|
|
1165
|
+
}
|
|
1166
|
+
get parentNode() {
|
|
1167
|
+
return __privateGet2(this, _parentNode);
|
|
1168
|
+
}
|
|
1169
|
+
get nextSibling() {
|
|
1170
|
+
return __privateGet2(this, _nodes)[__privateGet2(this, _nodes).length - 1].nextSibling;
|
|
1171
|
+
}
|
|
1172
|
+
get previousSibling() {
|
|
1173
|
+
return __privateGet2(this, _nodes)[0].previousSibling;
|
|
1174
|
+
}
|
|
1175
|
+
get value() {
|
|
1176
|
+
return __privateGet2(this, _nodes).map((node) => node.textContent).join("");
|
|
1177
|
+
}
|
|
1178
|
+
set value(newValue) {
|
|
1179
|
+
this.replace(newValue);
|
|
1180
|
+
}
|
|
1181
|
+
replace(...nodes) {
|
|
1182
|
+
const normalisedNodes = nodes.flat().flatMap(
|
|
1183
|
+
(node) => node == null ? [new Text()] : node.forEach ? [...node] : node.nodeType === FRAGMENT ? [...node.childNodes] : node.nodeType ? [node] : [new Text(node)]
|
|
1184
|
+
);
|
|
1185
|
+
if (!normalisedNodes.length)
|
|
1186
|
+
normalisedNodes.push(new Text());
|
|
1187
|
+
__privateSet2(this, _nodes, swapdom(
|
|
1188
|
+
__privateGet2(this, _nodes)[0].parentNode,
|
|
1189
|
+
__privateGet2(this, _nodes),
|
|
1190
|
+
normalisedNodes,
|
|
1191
|
+
this.nextSibling
|
|
1192
|
+
));
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
_parentNode = /* @__PURE__ */ new WeakMap();
|
|
1196
|
+
_nodes = /* @__PURE__ */ new WeakMap();
|
|
1197
|
+
var InnerTemplatePart = class extends ChildNodePart {
|
|
1198
|
+
constructor(parentNode, template2) {
|
|
1199
|
+
let directive = template2.getAttribute("directive") || template2.getAttribute("type");
|
|
1200
|
+
let expression = template2.getAttribute("expression") || template2.getAttribute(directive) || "";
|
|
1201
|
+
if (expression.startsWith("{{"))
|
|
1202
|
+
expression = expression.trim().slice(2, -2).trim();
|
|
1203
|
+
super(parentNode);
|
|
1204
|
+
__publicField(this, "directive");
|
|
1205
|
+
this.expression = expression;
|
|
1206
|
+
this.template = template2;
|
|
1207
|
+
this.directive = directive;
|
|
1208
|
+
}
|
|
1209
|
+
};
|
|
1210
|
+
function swapdom(parent, a, b, end = null) {
|
|
1211
|
+
let i = 0, cur, next, bi, n = b.length, m = a.length;
|
|
1212
|
+
while (i < n && i < m && a[i] == b[i])
|
|
1213
|
+
i++;
|
|
1214
|
+
while (i < n && i < m && b[n - 1] == a[m - 1])
|
|
1215
|
+
end = b[--m, --n];
|
|
1216
|
+
if (i == m)
|
|
1217
|
+
while (i < n)
|
|
1218
|
+
parent.insertBefore(b[i++], end);
|
|
1219
|
+
if (i == n)
|
|
1220
|
+
while (i < m)
|
|
1221
|
+
parent.removeChild(a[i++]);
|
|
1222
|
+
else {
|
|
1223
|
+
cur = a[i];
|
|
1224
|
+
while (i < n) {
|
|
1225
|
+
bi = b[i++], next = cur ? cur.nextSibling : end;
|
|
1226
|
+
if (cur == bi)
|
|
1227
|
+
cur = next;
|
|
1228
|
+
else if (i < n && b[i] == next)
|
|
1229
|
+
parent.replaceChild(bi, cur), cur = next;
|
|
1230
|
+
else
|
|
1231
|
+
parent.insertBefore(bi, cur);
|
|
1232
|
+
}
|
|
1233
|
+
while (cur != end)
|
|
1234
|
+
next = cur.nextSibling, parent.removeChild(cur), cur = next;
|
|
1235
|
+
}
|
|
1236
|
+
return b;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
// ../../node_modules/media-chrome/dist/utils/utils.js
|
|
1240
|
+
function camelCase(name) {
|
|
1241
|
+
return name.replace(/[-_]([a-z])/g, ($0, $1) => $1.toUpperCase());
|
|
1242
|
+
}
|
|
1243
|
+
function isNumericString(str) {
|
|
1244
|
+
if (typeof str != "string")
|
|
1245
|
+
return false;
|
|
1246
|
+
return !isNaN(str) && !isNaN(parseFloat(str));
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
// ../../node_modules/media-chrome/dist/utils/template-processor.js
|
|
1250
|
+
var pipeModifiers = {
|
|
1251
|
+
string: (value) => String(value)
|
|
1252
|
+
};
|
|
1253
|
+
var PartialTemplate = class {
|
|
1254
|
+
constructor(template2) {
|
|
1255
|
+
this.template = template2;
|
|
1256
|
+
this.state = void 0;
|
|
1257
|
+
}
|
|
1258
|
+
};
|
|
1259
|
+
var templates = /* @__PURE__ */ new WeakMap();
|
|
1260
|
+
var templateInstances = /* @__PURE__ */ new WeakMap();
|
|
1261
|
+
var Directives = {
|
|
1262
|
+
partial: (part, state) => {
|
|
1263
|
+
state[part.expression] = new PartialTemplate(part.template);
|
|
1264
|
+
},
|
|
1265
|
+
if: (part, state) => {
|
|
1266
|
+
var _a2;
|
|
1267
|
+
if (evaluateExpression(part.expression, state)) {
|
|
1268
|
+
if (templates.get(part) !== part.template) {
|
|
1269
|
+
templates.set(part, part.template);
|
|
1270
|
+
const tpl = new TemplateInstance(part.template, state, processor);
|
|
1271
|
+
part.replace(tpl);
|
|
1272
|
+
templateInstances.set(part, tpl);
|
|
1273
|
+
} else {
|
|
1274
|
+
(_a2 = templateInstances.get(part)) == null ? void 0 : _a2.update(state);
|
|
1275
|
+
}
|
|
1276
|
+
} else {
|
|
1277
|
+
part.replace("");
|
|
1278
|
+
templates.delete(part);
|
|
1279
|
+
templateInstances.delete(part);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
var DirectiveNames = Object.keys(Directives);
|
|
1284
|
+
var processor = {
|
|
1285
|
+
processCallback(instance, parts, state) {
|
|
1286
|
+
var _a2, _b2;
|
|
1287
|
+
if (!state)
|
|
1288
|
+
return;
|
|
1289
|
+
for (const [expression, part] of parts) {
|
|
1290
|
+
if (part instanceof InnerTemplatePart) {
|
|
1291
|
+
if (!part.directive) {
|
|
1292
|
+
const directive = DirectiveNames.find((n) => part.template.hasAttribute(n));
|
|
1293
|
+
if (directive) {
|
|
1294
|
+
part.directive = directive;
|
|
1295
|
+
part.expression = part.template.getAttribute(directive);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
(_a2 = Directives[part.directive]) == null ? void 0 : _a2.call(Directives, part, state);
|
|
1299
|
+
continue;
|
|
1300
|
+
}
|
|
1301
|
+
let value = evaluateExpression(expression, state);
|
|
1302
|
+
if (value instanceof PartialTemplate) {
|
|
1303
|
+
if (templates.get(part) !== value.template) {
|
|
1304
|
+
templates.set(part, value.template);
|
|
1305
|
+
value = new TemplateInstance(
|
|
1306
|
+
value.template,
|
|
1307
|
+
value.state,
|
|
1308
|
+
processor
|
|
1309
|
+
);
|
|
1310
|
+
part.value = value;
|
|
1311
|
+
templateInstances.set(part, value);
|
|
1312
|
+
} else {
|
|
1313
|
+
(_b2 = templateInstances.get(part)) == null ? void 0 : _b2.update(value.state);
|
|
1314
|
+
}
|
|
1315
|
+
continue;
|
|
1316
|
+
}
|
|
1317
|
+
if (value) {
|
|
1318
|
+
if (part instanceof AttrPart) {
|
|
1319
|
+
if (part.attributeName.startsWith("aria-")) {
|
|
1320
|
+
value = String(value);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
if (part instanceof AttrPart) {
|
|
1324
|
+
if (typeof value === "boolean") {
|
|
1325
|
+
part.booleanValue = value;
|
|
1326
|
+
} else if (typeof value === "function") {
|
|
1327
|
+
part.element[part.attributeName] = value;
|
|
1328
|
+
} else {
|
|
1329
|
+
part.value = value;
|
|
1330
|
+
}
|
|
1331
|
+
} else {
|
|
1332
|
+
part.value = value;
|
|
1333
|
+
templates.delete(part);
|
|
1334
|
+
templateInstances.delete(part);
|
|
1335
|
+
}
|
|
1336
|
+
} else {
|
|
1337
|
+
if (part instanceof AttrPart) {
|
|
1338
|
+
part.value = void 0;
|
|
1339
|
+
} else {
|
|
1340
|
+
part.value = void 0;
|
|
1341
|
+
templates.delete(part);
|
|
1342
|
+
templateInstances.delete(part);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
};
|
|
1348
|
+
var operators = {
|
|
1349
|
+
"!": (a) => !a,
|
|
1350
|
+
"!!": (a) => !!a,
|
|
1351
|
+
"==": (a, b) => a == b,
|
|
1352
|
+
"!=": (a, b) => a != b,
|
|
1353
|
+
">": (a, b) => a > b,
|
|
1354
|
+
">=": (a, b) => a >= b,
|
|
1355
|
+
"<": (a, b) => a < b,
|
|
1356
|
+
"<=": (a, b) => a <= b,
|
|
1357
|
+
"??": (a, b) => a != null ? a : b,
|
|
1358
|
+
"|": (a, b) => {
|
|
1359
|
+
var _a2;
|
|
1360
|
+
return (_a2 = pipeModifiers[b]) == null ? void 0 : _a2.call(pipeModifiers, a);
|
|
1361
|
+
}
|
|
1362
|
+
};
|
|
1363
|
+
function tokenizeExpression(expr) {
|
|
1364
|
+
return tokenize2(expr, {
|
|
1365
|
+
boolean: /true|false/,
|
|
1366
|
+
number: /-?\d+\.?\d*/,
|
|
1367
|
+
string: /(["'])((?:\\.|[^\\])*?)\1/,
|
|
1368
|
+
operator: /[!=><][=!]?|\?\?|\|/,
|
|
1369
|
+
ws: /\s+/,
|
|
1370
|
+
param: /[$a-z_][$\w]*/i
|
|
1371
|
+
}).filter(({ type }) => type !== "ws");
|
|
1372
|
+
}
|
|
1373
|
+
function evaluateExpression(expr, state = {}) {
|
|
1374
|
+
var _a2, _b2, _c, _d, _e, _f, _g;
|
|
1375
|
+
const tokens = tokenizeExpression(expr);
|
|
1376
|
+
if (tokens.length === 0 || tokens.some(({ type }) => !type)) {
|
|
1377
|
+
return invalidExpression(expr);
|
|
1378
|
+
}
|
|
1379
|
+
if (((_a2 = tokens[0]) == null ? void 0 : _a2.token) === ">") {
|
|
1380
|
+
const partial = state[(_b2 = tokens[1]) == null ? void 0 : _b2.token];
|
|
1381
|
+
if (!partial) {
|
|
1382
|
+
return invalidExpression(expr);
|
|
1383
|
+
}
|
|
1384
|
+
const partialState = { ...state };
|
|
1385
|
+
partial.state = partialState;
|
|
1386
|
+
const args = tokens.slice(2);
|
|
1387
|
+
for (let i = 0; i < args.length; i += 3) {
|
|
1388
|
+
const name = (_c = args[i]) == null ? void 0 : _c.token;
|
|
1389
|
+
const operator = (_d = args[i + 1]) == null ? void 0 : _d.token;
|
|
1390
|
+
const value = (_e = args[i + 2]) == null ? void 0 : _e.token;
|
|
1391
|
+
if (name && operator === "=") {
|
|
1392
|
+
partialState[name] = getParamValue(value, state);
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
return partial;
|
|
1396
|
+
}
|
|
1397
|
+
if (tokens.length === 1) {
|
|
1398
|
+
if (!isValidParam(tokens[0])) {
|
|
1399
|
+
return invalidExpression(expr);
|
|
1400
|
+
}
|
|
1401
|
+
return getParamValue(tokens[0].token, state);
|
|
1402
|
+
}
|
|
1403
|
+
if (tokens.length === 2) {
|
|
1404
|
+
const operator = (_f = tokens[0]) == null ? void 0 : _f.token;
|
|
1405
|
+
const run = operators[operator];
|
|
1406
|
+
if (!run || !isValidParam(tokens[1])) {
|
|
1407
|
+
return invalidExpression(expr);
|
|
1408
|
+
}
|
|
1409
|
+
const a = getParamValue(tokens[1].token, state);
|
|
1410
|
+
return run(a);
|
|
1411
|
+
}
|
|
1412
|
+
if (tokens.length === 3) {
|
|
1413
|
+
const operator = (_g = tokens[1]) == null ? void 0 : _g.token;
|
|
1414
|
+
const run = operators[operator];
|
|
1415
|
+
if (!run || !isValidParam(tokens[0]) || !isValidParam(tokens[2])) {
|
|
1416
|
+
return invalidExpression(expr);
|
|
1417
|
+
}
|
|
1418
|
+
const a = getParamValue(tokens[0].token, state);
|
|
1419
|
+
if (operator === "|") {
|
|
1420
|
+
return run(a, tokens[2].token);
|
|
1421
|
+
}
|
|
1422
|
+
const b = getParamValue(tokens[2].token, state);
|
|
1423
|
+
return run(a, b);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
function invalidExpression(expr) {
|
|
1427
|
+
console.warn(`Warning: invalid expression \`${expr}\``);
|
|
1428
|
+
return false;
|
|
1429
|
+
}
|
|
1430
|
+
function isValidParam({ type }) {
|
|
1431
|
+
return ["number", "boolean", "string", "param"].includes(type);
|
|
1432
|
+
}
|
|
1433
|
+
function getParamValue(raw, state) {
|
|
1434
|
+
const firstChar = raw[0];
|
|
1435
|
+
const lastChar = raw.slice(-1);
|
|
1436
|
+
if (raw === "true" || raw === "false") {
|
|
1437
|
+
return raw === "true";
|
|
1438
|
+
}
|
|
1439
|
+
if (firstChar === lastChar && [`'`, `"`].includes(firstChar)) {
|
|
1440
|
+
return raw.slice(1, -1);
|
|
1441
|
+
}
|
|
1442
|
+
if (isNumericString(raw)) {
|
|
1443
|
+
return parseFloat(raw);
|
|
1444
|
+
}
|
|
1445
|
+
return state[raw];
|
|
1446
|
+
}
|
|
1447
|
+
function tokenize2(str, parsers) {
|
|
1448
|
+
let len, match, token, tokens = [];
|
|
1449
|
+
while (str) {
|
|
1450
|
+
token = null;
|
|
1451
|
+
len = str.length;
|
|
1452
|
+
for (let key in parsers) {
|
|
1453
|
+
match = parsers[key].exec(str);
|
|
1454
|
+
if (match && match.index < len) {
|
|
1455
|
+
token = {
|
|
1456
|
+
token: match[0],
|
|
1457
|
+
type: key,
|
|
1458
|
+
matches: match.slice(1)
|
|
1459
|
+
};
|
|
1460
|
+
len = match.index;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
if (len) {
|
|
1464
|
+
tokens.push({
|
|
1465
|
+
token: str.substr(0, len),
|
|
1466
|
+
type: void 0
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
if (token) {
|
|
1470
|
+
tokens.push(token);
|
|
1471
|
+
}
|
|
1472
|
+
str = str.substr(len + (token ? token.token.length : 0));
|
|
1473
|
+
}
|
|
1474
|
+
return tokens;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
// ../../node_modules/media-chrome/dist/media-theme-element.js
|
|
1478
|
+
var __defProp2 = Object.defineProperty;
|
|
1479
|
+
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1480
|
+
var __publicField2 = (obj, key, value) => {
|
|
1481
|
+
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1482
|
+
return value;
|
|
1483
|
+
};
|
|
1484
|
+
var __accessCheck3 = (obj, member, msg) => {
|
|
1485
|
+
if (!member.has(obj))
|
|
1486
|
+
throw TypeError("Cannot " + msg);
|
|
1487
|
+
};
|
|
1488
|
+
var __privateGet3 = (obj, member, getter) => {
|
|
1489
|
+
__accessCheck3(obj, member, "read from private field");
|
|
1490
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
1491
|
+
};
|
|
1492
|
+
var __privateAdd3 = (obj, member, value) => {
|
|
1493
|
+
if (member.has(obj))
|
|
1494
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
1495
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
1496
|
+
};
|
|
1497
|
+
var __privateSet3 = (obj, member, value, setter) => {
|
|
1498
|
+
__accessCheck3(obj, member, "write to private field");
|
|
1499
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
1500
|
+
return value;
|
|
1501
|
+
};
|
|
1502
|
+
var __privateMethod = (obj, member, method) => {
|
|
1503
|
+
__accessCheck3(obj, member, "access private method");
|
|
1504
|
+
return method;
|
|
1505
|
+
};
|
|
1506
|
+
var _template;
|
|
1507
|
+
var _prevTemplate;
|
|
1508
|
+
var _prevTemplateId;
|
|
1509
|
+
var _upgradeProperty;
|
|
1510
|
+
var upgradeProperty_fn;
|
|
1511
|
+
var _updateTemplate;
|
|
1512
|
+
var updateTemplate_fn;
|
|
1513
|
+
var observedMediaAttributes = {
|
|
1514
|
+
mediatargetlivewindow: "targetlivewindow",
|
|
1515
|
+
mediastreamtype: "streamtype"
|
|
1516
|
+
};
|
|
1517
|
+
var prependTemplate = Document.createElement("template");
|
|
1518
|
+
prependTemplate.innerHTML = `
|
|
1519
|
+
<style>
|
|
1520
|
+
:host {
|
|
1521
|
+
display: inline-block;
|
|
1522
|
+
line-height: 0;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
media-controller {
|
|
1526
|
+
width: 100%;
|
|
1527
|
+
height: 100%;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
media-controller:not([mediasubtitleslist]) media-captions-selectmenu,
|
|
1531
|
+
media-captions-button:not([mediasubtitleslist]),
|
|
1532
|
+
media-rendition-selectmenu[mediarenditionunavailable],
|
|
1533
|
+
media-volume-range[mediavolumeunavailable],
|
|
1534
|
+
media-airplay-button[mediaairplayunavailable],
|
|
1535
|
+
media-fullscreen-button[mediafullscreenunavailable],
|
|
1536
|
+
media-cast-button[mediacastunavailable],
|
|
1537
|
+
media-pip-button[mediapipunavailable] {
|
|
1538
|
+
display: none;
|
|
1539
|
+
}
|
|
1540
|
+
</style>
|
|
1541
|
+
`;
|
|
1542
|
+
var MediaThemeElement = class extends GlobalThis.HTMLElement {
|
|
1543
|
+
constructor() {
|
|
1544
|
+
super();
|
|
1545
|
+
__privateAdd3(this, _upgradeProperty);
|
|
1546
|
+
__privateAdd3(this, _updateTemplate);
|
|
1547
|
+
__publicField2(this, "renderRoot");
|
|
1548
|
+
__publicField2(this, "renderer");
|
|
1549
|
+
__privateAdd3(this, _template, void 0);
|
|
1550
|
+
__privateAdd3(this, _prevTemplate, void 0);
|
|
1551
|
+
__privateAdd3(this, _prevTemplateId, void 0);
|
|
1552
|
+
if (this.shadowRoot) {
|
|
1553
|
+
this.renderRoot = this.shadowRoot;
|
|
1554
|
+
} else {
|
|
1555
|
+
this.renderRoot = this.attachShadow({ mode: "open" });
|
|
1556
|
+
this.createRenderer();
|
|
1557
|
+
}
|
|
1558
|
+
const observer = new MutationObserver((mutationList) => {
|
|
1559
|
+
if (mutationList.some((mutation) => {
|
|
1560
|
+
const target = mutation.target;
|
|
1561
|
+
if (target === this)
|
|
1562
|
+
return true;
|
|
1563
|
+
if (target.localName !== "media-controller")
|
|
1564
|
+
return false;
|
|
1565
|
+
if (observedMediaAttributes[mutation.attributeName])
|
|
1566
|
+
return true;
|
|
1567
|
+
if (mutation.attributeName.startsWith("breakpoint"))
|
|
1568
|
+
return true;
|
|
1569
|
+
return false;
|
|
1570
|
+
})) {
|
|
1571
|
+
this.render();
|
|
1572
|
+
}
|
|
1573
|
+
});
|
|
1574
|
+
observer.observe(this, { attributes: true });
|
|
1575
|
+
observer.observe(this.renderRoot, {
|
|
1576
|
+
attributes: true,
|
|
1577
|
+
subtree: true
|
|
1578
|
+
});
|
|
1579
|
+
__privateMethod(this, _upgradeProperty, upgradeProperty_fn).call(this, "template");
|
|
1580
|
+
}
|
|
1581
|
+
get mediaController() {
|
|
1582
|
+
return this.renderRoot.querySelector("media-controller");
|
|
1583
|
+
}
|
|
1584
|
+
get template() {
|
|
1585
|
+
var _a2;
|
|
1586
|
+
return (_a2 = __privateGet3(this, _template)) != null ? _a2 : this.constructor.template;
|
|
1587
|
+
}
|
|
1588
|
+
set template(element) {
|
|
1589
|
+
__privateSet3(this, _prevTemplateId, null);
|
|
1590
|
+
__privateSet3(this, _template, element);
|
|
1591
|
+
this.createRenderer();
|
|
1592
|
+
}
|
|
1593
|
+
get props() {
|
|
1594
|
+
var _a2, _b2, _c;
|
|
1595
|
+
const observedAttributes = [
|
|
1596
|
+
...Array.from((_b2 = (_a2 = this.mediaController) == null ? void 0 : _a2.attributes) != null ? _b2 : []).filter(({ name }) => {
|
|
1597
|
+
return observedMediaAttributes[name] || name.startsWith("breakpoint");
|
|
1598
|
+
}),
|
|
1599
|
+
...Array.from(this.attributes)
|
|
1600
|
+
];
|
|
1601
|
+
const props = {};
|
|
1602
|
+
for (let attr of observedAttributes) {
|
|
1603
|
+
const name = (_c = observedMediaAttributes[attr.name]) != null ? _c : camelCase(attr.name);
|
|
1604
|
+
let { value } = attr;
|
|
1605
|
+
if (value != null) {
|
|
1606
|
+
if (isNumericString(value)) {
|
|
1607
|
+
value = parseFloat(value);
|
|
1608
|
+
}
|
|
1609
|
+
props[name] = value === "" ? true : value;
|
|
1610
|
+
} else {
|
|
1611
|
+
props[name] = false;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
return props;
|
|
1615
|
+
}
|
|
1616
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
1617
|
+
if (attrName === "template" && oldValue != newValue) {
|
|
1618
|
+
__privateMethod(this, _updateTemplate, updateTemplate_fn).call(this);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
connectedCallback() {
|
|
1622
|
+
__privateMethod(this, _updateTemplate, updateTemplate_fn).call(this);
|
|
1623
|
+
}
|
|
1624
|
+
createRenderer() {
|
|
1625
|
+
if (this.template && this.template !== __privateGet3(this, _prevTemplate)) {
|
|
1626
|
+
__privateSet3(this, _prevTemplate, this.template);
|
|
1627
|
+
this.renderer = new TemplateInstance(
|
|
1628
|
+
this.template,
|
|
1629
|
+
this.props,
|
|
1630
|
+
this.constructor.processor
|
|
1631
|
+
);
|
|
1632
|
+
this.renderRoot.textContent = "";
|
|
1633
|
+
this.renderRoot.append(
|
|
1634
|
+
prependTemplate.content.cloneNode(true),
|
|
1635
|
+
this.renderer
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
render() {
|
|
1640
|
+
var _a2;
|
|
1641
|
+
(_a2 = this.renderer) == null ? void 0 : _a2.update(this.props);
|
|
1642
|
+
}
|
|
1643
|
+
};
|
|
1644
|
+
_template = /* @__PURE__ */ new WeakMap();
|
|
1645
|
+
_prevTemplate = /* @__PURE__ */ new WeakMap();
|
|
1646
|
+
_prevTemplateId = /* @__PURE__ */ new WeakMap();
|
|
1647
|
+
_upgradeProperty = /* @__PURE__ */ new WeakSet();
|
|
1648
|
+
upgradeProperty_fn = function(prop) {
|
|
1649
|
+
if (Object.prototype.hasOwnProperty.call(this, prop)) {
|
|
1650
|
+
const value = this[prop];
|
|
1651
|
+
delete this[prop];
|
|
1652
|
+
this[prop] = value;
|
|
1653
|
+
}
|
|
1654
|
+
};
|
|
1655
|
+
_updateTemplate = /* @__PURE__ */ new WeakSet();
|
|
1656
|
+
updateTemplate_fn = function() {
|
|
1657
|
+
var _a2;
|
|
1658
|
+
const templateId = this.getAttribute("template");
|
|
1659
|
+
if (!templateId || templateId === __privateGet3(this, _prevTemplateId))
|
|
1660
|
+
return;
|
|
1661
|
+
const rootNode = this.getRootNode();
|
|
1662
|
+
const template2 = (_a2 = rootNode == null ? void 0 : rootNode.getElementById) == null ? void 0 : _a2.call(rootNode, templateId);
|
|
1663
|
+
if (template2) {
|
|
1664
|
+
__privateSet3(this, _prevTemplateId, templateId);
|
|
1665
|
+
__privateSet3(this, _template, template2);
|
|
1666
|
+
this.createRenderer();
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
if (isValidUrl(templateId)) {
|
|
1670
|
+
__privateSet3(this, _prevTemplateId, templateId);
|
|
1671
|
+
request(templateId).then((data) => {
|
|
1672
|
+
const template22 = Document.createElement("template");
|
|
1673
|
+
template22.innerHTML = data;
|
|
1674
|
+
__privateSet3(this, _template, template22);
|
|
1675
|
+
this.createRenderer();
|
|
1676
|
+
}).catch(console.error);
|
|
1677
|
+
}
|
|
1678
|
+
};
|
|
1679
|
+
__publicField2(MediaThemeElement, "template");
|
|
1680
|
+
__publicField2(MediaThemeElement, "observedAttributes", ["template"]);
|
|
1681
|
+
__publicField2(MediaThemeElement, "processor", processor);
|
|
1682
|
+
function isValidUrl(url) {
|
|
1683
|
+
if (!/^(\/|\.\/|https?:\/\/)/.test(url))
|
|
1684
|
+
return false;
|
|
1685
|
+
const base = /^https?:\/\//.test(url) ? void 0 : location.origin;
|
|
1686
|
+
try {
|
|
1687
|
+
new URL(url, base);
|
|
1688
|
+
} catch (e) {
|
|
1689
|
+
return false;
|
|
1690
|
+
}
|
|
1691
|
+
return true;
|
|
1692
|
+
}
|
|
1693
|
+
async function request(resource) {
|
|
1694
|
+
const response = await fetch(resource);
|
|
1695
|
+
if (response.status !== 200) {
|
|
1696
|
+
throw new Error(`Failed to load resource: the server responded with a status of ${response.status}`);
|
|
1697
|
+
}
|
|
1698
|
+
return response.text();
|
|
1699
|
+
}
|
|
1700
|
+
if (!GlobalThis.customElements.get("media-theme")) {
|
|
1701
|
+
GlobalThis.customElements.define("media-theme", MediaThemeElement);
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
// src/themes/classic/index.ts
|
|
1705
|
+
var template = internalDocument.createElement("template");
|
|
1706
|
+
if ("innerHTML" in template)
|
|
1707
|
+
template.innerHTML = classic_default;
|
|
1708
|
+
var _a, _b;
|
|
1709
|
+
var MediaThemeClassic = class extends MediaThemeElement {
|
|
1710
|
+
};
|
|
1711
|
+
MediaThemeClassic.template = (_b = (_a = template.content) == null ? void 0 : _a.children) == null ? void 0 : _b[0];
|
|
1712
|
+
if (!internalGlobalThis.customElements.get("media-theme-classic")) {
|
|
1713
|
+
internalGlobalThis.customElements.define("media-theme-classic", MediaThemeClassic);
|
|
1714
|
+
}
|
|
1715
|
+
var classic_default2 = MediaThemeClassic;
|
|
1716
|
+
export {
|
|
1717
|
+
classic_default2 as default
|
|
1718
|
+
};
|