@mux/mux-player 0.1.0-beta.21 → 0.1.0-beta.22
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/CHANGELOG.md +4 -0
- package/coverage/lcov-report/index.html +5 -5
- package/coverage/lcov-report/src/dialog.ts.html +1 -1
- package/coverage/lcov-report/src/errors.ts.html +1 -1
- package/coverage/lcov-report/src/helpers.ts.html +1 -1
- package/coverage/lcov-report/src/html.ts.html +1 -1
- package/coverage/lcov-report/src/index.html +5 -5
- package/coverage/lcov-report/src/index.ts.html +4 -4
- package/coverage/lcov-report/src/logger.ts.html +1 -1
- package/coverage/lcov-report/src/media-chrome/dialog.ts.html +1 -1
- package/coverage/lcov-report/src/media-chrome/index.html +1 -1
- package/coverage/lcov-report/src/media-chrome/time-display.ts.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/airplay.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/captions-off.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/captions-on.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/fullscreen-enter.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/fullscreen-exit.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/index.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/pause.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/pip-enter.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/pip-exit.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/play.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/seek-backward.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/seek-forward.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-high.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-low.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-medium.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons/volume-off.svg.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/icons.ts.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/index.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/media-theme-mux.ts.html +1 -1
- package/coverage/lcov-report/src/media-theme-mux/styles.css.html +1 -1
- package/coverage/lcov-report/src/styles.css.html +1 -1
- package/coverage/lcov-report/src/template.ts.html +1 -1
- package/coverage/lcov-report/src/utils.ts.html +1 -1
- package/coverage/lcov-report/src/video-api.ts.html +1 -1
- package/coverage/lcov.info +106 -107
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mux-player.js +2 -2
- package/dist/mux-player.mjs +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.1.0-beta.22](https://github.com/muxinc/elements/compare/@mux/mux-player@0.1.0-beta.21...@mux/mux-player@0.1.0-beta.22) (2022-07-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @mux/mux-player
|
|
9
|
+
|
|
6
10
|
# 0.1.0-beta.21 (2022-07-05)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">82.
|
|
33
|
+
<span class="strong">82.01% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>269/328</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="82.64" class="pct high">82.64%</td>
|
|
87
87
|
<td data-value="2057" class="abs high">1700/2057</td>
|
|
88
|
-
<td data-value="82.
|
|
89
|
-
<td data-value="
|
|
88
|
+
<td data-value="82.28" class="pct high">82.28%</td>
|
|
89
|
+
<td data-value="271" class="abs high">223/271</td>
|
|
90
90
|
<td data-value="75.29" class="pct medium">75.29%</td>
|
|
91
91
|
<td data-value="170" class="abs medium">128/170</td>
|
|
92
92
|
<td data-value="82.64" class="pct high">82.64%</td>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at Tue Jul 05 2022
|
|
149
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
150
150
|
</div>
|
|
151
151
|
<script src="prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -232,7 +232,7 @@ export default MxpDialog;
|
|
|
232
232
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
233
233
|
Code coverage generated by
|
|
234
234
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
235
|
-
at Tue Jul 05 2022
|
|
235
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
236
236
|
</div>
|
|
237
237
|
<script src="../prettify.js"></script>
|
|
238
238
|
<script>
|
|
@@ -559,7 +559,7 @@ export function getErrorLogs(
|
|
|
559
559
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
560
560
|
Code coverage generated by
|
|
561
561
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
562
|
-
at Tue Jul 05 2022
|
|
562
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
563
563
|
</div>
|
|
564
564
|
<script src="../prettify.js"></script>
|
|
565
565
|
<script>
|
|
@@ -463,7 +463,7 @@ export const isInLiveWindow = (el: MuxPlayerElement) => {
|
|
|
463
463
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
464
464
|
Code coverage generated by
|
|
465
465
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
466
|
-
at Tue Jul 05 2022
|
|
466
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
467
467
|
</div>
|
|
468
468
|
<script src="../prettify.js"></script>
|
|
469
469
|
<script>
|
|
@@ -565,7 +565,7 @@ export function createTemplateInstance(content: string, props?: any) {
|
|
|
565
565
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
566
566
|
Code coverage generated by
|
|
567
567
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
568
|
-
at Tue Jul 05 2022
|
|
568
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
569
569
|
</div>
|
|
570
570
|
<script src="../prettify.js"></script>
|
|
571
571
|
<script>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">82.
|
|
33
|
+
<span class="strong">82.28% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>223/271</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -145,8 +145,8 @@
|
|
|
145
145
|
</td>
|
|
146
146
|
<td data-value="73.84" class="pct medium">73.84%</td>
|
|
147
147
|
<td data-value="952" class="abs medium">703/952</td>
|
|
148
|
-
<td data-value="79.
|
|
149
|
-
<td data-value="
|
|
148
|
+
<td data-value="79.43" class="pct medium">79.43%</td>
|
|
149
|
+
<td data-value="107" class="abs medium">85/107</td>
|
|
150
150
|
<td data-value="66.66" class="pct medium">66.66%</td>
|
|
151
151
|
<td data-value="81" class="abs medium">54/81</td>
|
|
152
152
|
<td data-value="73.84" class="pct medium">73.84%</td>
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
237
237
|
Code coverage generated by
|
|
238
238
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
239
|
-
at Tue Jul 05 2022
|
|
239
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
240
240
|
</div>
|
|
241
241
|
<script src="../prettify.js"></script>
|
|
242
242
|
<script>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">79.
|
|
33
|
+
<span class="strong">79.43% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>85/107</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -1063,7 +1063,7 @@
|
|
|
1063
1063
|
<span class="cline-any cline-yes">2x</span>
|
|
1064
1064
|
<span class="cline-any cline-yes">2x</span>
|
|
1065
1065
|
<span class="cline-any cline-yes">2x</span>
|
|
1066
|
-
<span class="cline-any cline-yes">
|
|
1066
|
+
<span class="cline-any cline-yes">2x</span>
|
|
1067
1067
|
<span class="cline-any cline-yes">2x</span>
|
|
1068
1068
|
<span class="cline-any cline-yes">2x</span>
|
|
1069
1069
|
<span class="cline-any cline-yes">2x</span>
|
|
@@ -2926,7 +2926,7 @@ export default MuxPlayerElement;
|
|
|
2926
2926
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
2927
2927
|
Code coverage generated by
|
|
2928
2928
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
2929
|
-
at Tue Jul 05 2022
|
|
2929
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
2930
2930
|
</div>
|
|
2931
2931
|
<script src="../prettify.js"></script>
|
|
2932
2932
|
<script>
|
|
@@ -148,7 +148,7 @@ export <span class="fstat-no" title="function not covered" >function devlog(opts
|
|
|
148
148
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
149
149
|
Code coverage generated by
|
|
150
150
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
151
|
-
at Tue Jul 05 2022
|
|
151
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
152
152
|
</div>
|
|
153
153
|
<script src="../prettify.js"></script>
|
|
154
154
|
<script>
|
|
@@ -646,7 +646,7 @@ export default MediaDialog;
|
|
|
646
646
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
647
647
|
Code coverage generated by
|
|
648
648
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
649
|
-
at Tue Jul 05 2022
|
|
649
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
650
650
|
</div>
|
|
651
651
|
<script src="../../prettify.js"></script>
|
|
652
652
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at Tue Jul 05 2022
|
|
119
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -280,7 +280,7 @@ export default MxpTimeDisplay;
|
|
|
280
280
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
281
281
|
Code coverage generated by
|
|
282
282
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
283
|
-
at Tue Jul 05 2022
|
|
283
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
284
284
|
</div>
|
|
285
285
|
<script src="../../prettify.js"></script>
|
|
286
286
|
<script>
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
95
95
|
Code coverage generated by
|
|
96
96
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
97
|
-
at Tue Jul 05 2022
|
|
97
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
98
98
|
</div>
|
|
99
99
|
<script src="../../../prettify.js"></script>
|
|
100
100
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
312
312
|
Code coverage generated by
|
|
313
313
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
314
|
-
at Tue Jul 05 2022
|
|
314
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
315
315
|
</div>
|
|
316
316
|
<script src="../../../prettify.js"></script>
|
|
317
317
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at Tue Jul 05 2022
|
|
88
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../prettify.js"></script>
|
|
91
91
|
<script>
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
110
110
|
Code coverage generated by
|
|
111
111
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
112
|
-
at Tue Jul 05 2022
|
|
112
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
113
113
|
</div>
|
|
114
114
|
<script src="../../../prettify.js"></script>
|
|
115
115
|
<script>
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
110
110
|
Code coverage generated by
|
|
111
111
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
112
|
-
at Tue Jul 05 2022
|
|
112
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
113
113
|
</div>
|
|
114
114
|
<script src="../../../prettify.js"></script>
|
|
115
115
|
<script>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
89
89
|
Code coverage generated by
|
|
90
90
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
91
|
-
at Tue Jul 05 2022
|
|
91
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
92
92
|
</div>
|
|
93
93
|
<script src="../../../prettify.js"></script>
|
|
94
94
|
<script>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
89
89
|
Code coverage generated by
|
|
90
90
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
91
|
-
at Tue Jul 05 2022
|
|
91
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
92
92
|
</div>
|
|
93
93
|
<script src="../../../prettify.js"></script>
|
|
94
94
|
<script>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
89
89
|
Code coverage generated by
|
|
90
90
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
91
|
-
at Tue Jul 05 2022
|
|
91
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
92
92
|
</div>
|
|
93
93
|
<script src="../../../prettify.js"></script>
|
|
94
94
|
<script>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
89
89
|
Code coverage generated by
|
|
90
90
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
91
|
-
at Tue Jul 05 2022
|
|
91
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
92
92
|
</div>
|
|
93
93
|
<script src="../../../prettify.js"></script>
|
|
94
94
|
<script>
|
|
@@ -169,7 +169,7 @@ export const VolumeOff = () => createTemplateInstance(volumeOff);
|
|
|
169
169
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
170
170
|
Code coverage generated by
|
|
171
171
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
172
|
-
at Tue Jul 05 2022
|
|
172
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
173
173
|
</div>
|
|
174
174
|
<script src="../../prettify.js"></script>
|
|
175
175
|
<script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at Tue Jul 05 2022
|
|
134
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
135
135
|
</div>
|
|
136
136
|
<script src="../../prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -1264,7 +1264,7 @@ export default MediaThemeMux;
|
|
|
1264
1264
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1265
1265
|
Code coverage generated by
|
|
1266
1266
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1267
|
-
at Tue Jul 05 2022
|
|
1267
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
1268
1268
|
</div>
|
|
1269
1269
|
<script src="../../prettify.js"></script>
|
|
1270
1270
|
<script>
|
|
@@ -571,7 +571,7 @@ media-time-display {
|
|
|
571
571
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
572
572
|
Code coverage generated by
|
|
573
573
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
574
|
-
at Tue Jul 05 2022
|
|
574
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
575
575
|
</div>
|
|
576
576
|
<script src="../../prettify.js"></script>
|
|
577
577
|
<script>
|
|
@@ -196,7 +196,7 @@ media-controller {
|
|
|
196
196
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
197
197
|
Code coverage generated by
|
|
198
198
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
199
|
-
at Tue Jul 05 2022
|
|
199
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
200
200
|
</div>
|
|
201
201
|
<script src="../prettify.js"></script>
|
|
202
202
|
<script>
|
|
@@ -448,7 +448,7 @@ export const content = (props: MuxTemplateProps) => html`
|
|
|
448
448
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
449
449
|
Code coverage generated by
|
|
450
450
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
451
|
-
at Tue Jul 05 2022
|
|
451
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
452
452
|
</div>
|
|
453
453
|
<script src="../prettify.js"></script>
|
|
454
454
|
<script>
|
|
@@ -370,7 +370,7 @@ export const containsComposedNode = (rootNode: Node, childNode?: Node | Element
|
|
|
370
370
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
371
371
|
Code coverage generated by
|
|
372
372
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
373
|
-
at Tue Jul 05 2022
|
|
373
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
374
374
|
</div>
|
|
375
375
|
<script src="../prettify.js"></script>
|
|
376
376
|
<script>
|
|
@@ -964,7 +964,7 @@ export default VideoApiElement;
|
|
|
964
964
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
965
965
|
Code coverage generated by
|
|
966
966
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
967
|
-
at Tue Jul 05 2022
|
|
967
|
+
at Tue Jul 05 2022 23:20:21 GMT+0000 (Coordinated Universal Time)
|
|
968
968
|
</div>
|
|
969
969
|
<script src="../prettify.js"></script>
|
|
970
970
|
<script>
|
package/coverage/lcov.info
CHANGED
|
@@ -884,7 +884,7 @@ DA:45,2
|
|
|
884
884
|
DA:46,2
|
|
885
885
|
DA:47,2
|
|
886
886
|
DA:48,2
|
|
887
|
-
DA:49,
|
|
887
|
+
DA:49,2
|
|
888
888
|
DA:50,2
|
|
889
889
|
DA:51,2
|
|
890
890
|
DA:52,2
|
|
@@ -1791,115 +1791,114 @@ DA:952,2
|
|
|
1791
1791
|
LF:952
|
|
1792
1792
|
LH:703
|
|
1793
1793
|
BRDA:43,0,0,2
|
|
1794
|
-
BRDA:
|
|
1795
|
-
BRDA:
|
|
1796
|
-
BRDA:
|
|
1797
|
-
BRDA:
|
|
1798
|
-
BRDA:
|
|
1799
|
-
BRDA:
|
|
1800
|
-
BRDA:
|
|
1801
|
-
BRDA:
|
|
1802
|
-
BRDA:
|
|
1803
|
-
BRDA:
|
|
1804
|
-
BRDA:
|
|
1805
|
-
BRDA:
|
|
1806
|
-
BRDA:
|
|
1807
|
-
BRDA:
|
|
1808
|
-
BRDA:
|
|
1809
|
-
BRDA:224,16,0,
|
|
1794
|
+
BRDA:87,1,0,2
|
|
1795
|
+
BRDA:90,2,0,1
|
|
1796
|
+
BRDA:143,3,0,6
|
|
1797
|
+
BRDA:153,4,0,2
|
|
1798
|
+
BRDA:157,5,0,2
|
|
1799
|
+
BRDA:161,6,0,0
|
|
1800
|
+
BRDA:164,7,0,2
|
|
1801
|
+
BRDA:174,8,0,2
|
|
1802
|
+
BRDA:179,9,0,0
|
|
1803
|
+
BRDA:189,10,0,0
|
|
1804
|
+
BRDA:194,11,0,0
|
|
1805
|
+
BRDA:199,12,0,0
|
|
1806
|
+
BRDA:219,13,0,0
|
|
1807
|
+
BRDA:220,14,0,2
|
|
1808
|
+
BRDA:224,15,0,0
|
|
1809
|
+
BRDA:224,16,0,2
|
|
1810
1810
|
BRDA:224,17,0,2
|
|
1811
|
-
BRDA:
|
|
1812
|
-
BRDA:
|
|
1813
|
-
BRDA:
|
|
1814
|
-
BRDA:
|
|
1815
|
-
BRDA:
|
|
1816
|
-
BRDA:
|
|
1817
|
-
BRDA:
|
|
1818
|
-
BRDA:251,25,0,
|
|
1819
|
-
BRDA:
|
|
1820
|
-
BRDA:
|
|
1821
|
-
BRDA:
|
|
1822
|
-
BRDA:
|
|
1823
|
-
BRDA:
|
|
1824
|
-
BRDA:
|
|
1825
|
-
BRDA:
|
|
1826
|
-
BRDA:
|
|
1827
|
-
BRDA:
|
|
1828
|
-
BRDA:
|
|
1829
|
-
BRDA:
|
|
1830
|
-
BRDA:
|
|
1831
|
-
BRDA:
|
|
1832
|
-
BRDA:
|
|
1833
|
-
BRDA:
|
|
1834
|
-
BRDA:
|
|
1835
|
-
BRDA:
|
|
1836
|
-
BRDA:
|
|
1837
|
-
BRDA:
|
|
1838
|
-
BRDA:
|
|
1839
|
-
BRDA:
|
|
1840
|
-
BRDA:
|
|
1841
|
-
BRDA:
|
|
1842
|
-
BRDA:
|
|
1843
|
-
BRDA:
|
|
1844
|
-
BRDA:
|
|
1845
|
-
BRDA:
|
|
1846
|
-
BRDA:
|
|
1811
|
+
BRDA:231,18,0,2
|
|
1812
|
+
BRDA:236,19,0,2
|
|
1813
|
+
BRDA:237,20,0,2
|
|
1814
|
+
BRDA:242,21,0,2
|
|
1815
|
+
BRDA:246,22,0,2
|
|
1816
|
+
BRDA:250,23,0,0
|
|
1817
|
+
BRDA:251,24,0,0
|
|
1818
|
+
BRDA:251,25,0,2
|
|
1819
|
+
BRDA:257,26,0,0
|
|
1820
|
+
BRDA:256,27,0,2
|
|
1821
|
+
BRDA:257,28,0,2
|
|
1822
|
+
BRDA:261,29,0,3
|
|
1823
|
+
BRDA:278,30,0,2
|
|
1824
|
+
BRDA:281,31,0,1
|
|
1825
|
+
BRDA:291,32,0,2
|
|
1826
|
+
BRDA:295,33,0,2
|
|
1827
|
+
BRDA:303,34,0,0
|
|
1828
|
+
BRDA:313,35,0,0
|
|
1829
|
+
BRDA:318,36,0,0
|
|
1830
|
+
BRDA:348,37,0,2
|
|
1831
|
+
BRDA:353,38,0,1
|
|
1832
|
+
BRDA:363,39,0,2
|
|
1833
|
+
BRDA:370,40,0,2
|
|
1834
|
+
BRDA:372,41,0,4
|
|
1835
|
+
BRDA:385,42,0,0
|
|
1836
|
+
BRDA:390,43,0,2
|
|
1837
|
+
BRDA:396,44,0,1
|
|
1838
|
+
BRDA:397,45,0,1
|
|
1839
|
+
BRDA:403,46,0,4
|
|
1840
|
+
BRDA:404,47,0,0
|
|
1841
|
+
BRDA:408,48,0,1
|
|
1842
|
+
BRDA:461,49,0,2
|
|
1843
|
+
BRDA:462,50,0,0
|
|
1844
|
+
BRDA:467,51,0,1
|
|
1845
|
+
BRDA:472,52,0,1
|
|
1846
|
+
BRDA:464,53,0,3
|
|
1847
1847
|
BRDA:464,54,0,3
|
|
1848
|
-
BRDA:
|
|
1849
|
-
BRDA:
|
|
1850
|
-
BRDA:
|
|
1851
|
-
BRDA:
|
|
1852
|
-
BRDA:
|
|
1853
|
-
BRDA:
|
|
1854
|
-
BRDA:
|
|
1855
|
-
BRDA:
|
|
1856
|
-
BRDA:
|
|
1857
|
-
BRDA:
|
|
1858
|
-
BRDA:
|
|
1859
|
-
BRDA:
|
|
1860
|
-
BRDA:
|
|
1861
|
-
BRDA:
|
|
1862
|
-
BRDA:
|
|
1863
|
-
BRDA:
|
|
1864
|
-
BRDA:
|
|
1865
|
-
BRDA:
|
|
1866
|
-
BRDA:
|
|
1867
|
-
BRDA:
|
|
1868
|
-
BRDA:
|
|
1869
|
-
BRDA:
|
|
1870
|
-
BRDA:
|
|
1871
|
-
BRDA:
|
|
1872
|
-
BRDA:
|
|
1873
|
-
BRDA:
|
|
1874
|
-
BRDA:
|
|
1875
|
-
BRDA:
|
|
1876
|
-
BRDA:
|
|
1877
|
-
BRDA:
|
|
1878
|
-
BRDA:
|
|
1879
|
-
BRDA:
|
|
1880
|
-
BRDA:
|
|
1881
|
-
BRDA:
|
|
1882
|
-
BRDA:
|
|
1883
|
-
BRDA:
|
|
1884
|
-
BRDA:
|
|
1885
|
-
BRDA:
|
|
1886
|
-
BRDA:
|
|
1887
|
-
BRDA:
|
|
1888
|
-
BRDA:
|
|
1889
|
-
BRDA:
|
|
1890
|
-
BRDA:
|
|
1891
|
-
BRDA:
|
|
1892
|
-
BRDA:
|
|
1893
|
-
BRDA:
|
|
1894
|
-
BRDA:
|
|
1895
|
-
BRDA:
|
|
1896
|
-
BRDA:
|
|
1897
|
-
BRDA:
|
|
1848
|
+
BRDA:491,55,0,2
|
|
1849
|
+
BRDA:496,56,0,0
|
|
1850
|
+
BRDA:502,57,0,2
|
|
1851
|
+
BRDA:511,58,0,2
|
|
1852
|
+
BRDA:512,59,0,0
|
|
1853
|
+
BRDA:531,60,0,0
|
|
1854
|
+
BRDA:540,61,0,1
|
|
1855
|
+
BRDA:549,62,0,1
|
|
1856
|
+
BRDA:561,63,0,0
|
|
1857
|
+
BRDA:571,64,0,0
|
|
1858
|
+
BRDA:580,65,0,0
|
|
1859
|
+
BRDA:614,66,0,2
|
|
1860
|
+
BRDA:631,67,0,2
|
|
1861
|
+
BRDA:645,68,0,2
|
|
1862
|
+
BRDA:659,69,0,2
|
|
1863
|
+
BRDA:673,70,0,2
|
|
1864
|
+
BRDA:687,71,0,2
|
|
1865
|
+
BRDA:701,72,0,2
|
|
1866
|
+
BRDA:709,73,0,2
|
|
1867
|
+
BRDA:716,74,0,2
|
|
1868
|
+
BRDA:723,75,0,2
|
|
1869
|
+
BRDA:743,76,0,2
|
|
1870
|
+
BRDA:753,77,0,1
|
|
1871
|
+
BRDA:780,78,0,2
|
|
1872
|
+
BRDA:795,79,0,2
|
|
1873
|
+
BRDA:812,80,0,2
|
|
1874
|
+
BRDA:827,81,0,2
|
|
1875
|
+
BRDA:841,82,0,2
|
|
1876
|
+
BRDA:858,83,0,2
|
|
1877
|
+
BRDA:873,84,0,2
|
|
1878
|
+
BRDA:885,85,0,1
|
|
1879
|
+
BRDA:886,86,0,1
|
|
1880
|
+
BRDA:887,87,0,1
|
|
1881
|
+
BRDA:895,88,0,2
|
|
1882
|
+
BRDA:941,89,0,2
|
|
1883
|
+
BRDA:157,90,0,6
|
|
1884
|
+
BRDA:265,91,0,3
|
|
1885
|
+
BRDA:410,92,0,4
|
|
1886
|
+
BRDA:426,93,0,4
|
|
1887
|
+
BRDA:428,94,0,4
|
|
1888
|
+
BRDA:449,95,0,4
|
|
1889
|
+
BRDA:450,96,0,4
|
|
1890
|
+
BRDA:457,97,0,4
|
|
1891
|
+
BRDA:458,98,0,4
|
|
1892
|
+
BRDA:482,99,0,4
|
|
1893
|
+
BRDA:485,100,0,4
|
|
1894
|
+
BRDA:544,101,0,1
|
|
1895
|
+
BRDA:553,102,0,1
|
|
1896
|
+
BRDA:588,103,0,6
|
|
1897
|
+
BRDA:594,104,0,6
|
|
1898
1898
|
BRDA:594,105,0,6
|
|
1899
|
-
BRDA:
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
BRH:86
|
|
1899
|
+
BRDA:753,106,0,6
|
|
1900
|
+
BRF:107
|
|
1901
|
+
BRH:85
|
|
1903
1902
|
end_of_record
|
|
1904
1903
|
TN:
|
|
1905
1904
|
SF:packages/mux-player/src/logger.ts
|
package/dist/index.cjs.js
CHANGED
|
@@ -1212,7 +1212,7 @@ media-time-display {
|
|
|
1212
1212
|
${ce()}
|
|
1213
1213
|
<div class="mxp-padding-2"></div>
|
|
1214
1214
|
</media-control-bar>
|
|
1215
|
-
`;function gs(t,e){return{audio:t.hasAttribute("audio"),streamType:t.getAttribute("stream-type"),playerSize:t.getAttribute("player-size"),defaultHiddenCaptions:t.hasAttribute("default-hidden-captions"),hasCaptions:t.hasAttribute("has-captions"),forwardSeekOffset:t.getAttribute("forward-seek-offset"),backwardSeekOffset:t.getAttribute("backward-seek-offset"),...e}}var Qt=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),Pe(bs(gs(this)),this.shadowRoot)}attributeChangedCallback(){Pe(bs(gs(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Qt);var fs=Qt;var be=Z(require("@mux/mux-video")),F=Z(require("@mux/playback-core"));var Rs=Z(require("@mux/mux-video"));var $n="en",ue={code:$n};var vs="en";function g(t,e=!0){var s,n;let a=e&&(n=(s=ue)==null?void 0:s[t])!=null?n:t,i=e?ue.code:vs;return new As(a,i)}var As=class{constructor(e,a=(i=>(i=ue.code)!=null?i:vs)()){this.message=e,this.locale=a}format(e){return this.message.replace(/\{(\w+)\}/g,(a,i)=>{var s;return(s=e[i])!=null?s:""})}toString(){return this.message}};function Is(t){let e="";return Object.entries(t).forEach(([a,i])=>{i!=null&&(e+=`${Bn(a)}: ${i}; `)}),e?e.trim():void 0}function Bn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ts(t){return t.replace(/[-_]([a-z])/g,(e,a)=>a.toUpperCase())}function $e(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function dt(t){let e=jn(t).toString();return e?"?"+e:""}function jn(t){let e={};for(let a in t)t[a]!=null&&(e[a]=t[a]);return new URLSearchParams(e)}function Be(t){let a=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(a).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}var qt=(t,e)=>!t||!e?!1:t.contains(e)?!0:qt(t,e.getRootNode().host);var je=Z(require("@mux/playback-core")),Zt="mux.com",Hn=()=>{try{return"0.1.0-beta.
|
|
1215
|
+
`;function gs(t,e){return{audio:t.hasAttribute("audio"),streamType:t.getAttribute("stream-type"),playerSize:t.getAttribute("player-size"),defaultHiddenCaptions:t.hasAttribute("default-hidden-captions"),hasCaptions:t.hasAttribute("has-captions"),forwardSeekOffset:t.getAttribute("forward-seek-offset"),backwardSeekOffset:t.getAttribute("backward-seek-offset"),...e}}var Qt=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),Pe(bs(gs(this)),this.shadowRoot)}attributeChangedCallback(){Pe(bs(gs(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Qt);var fs=Qt;var be=Z(require("@mux/mux-video")),F=Z(require("@mux/playback-core"));var Rs=Z(require("@mux/mux-video"));var $n="en",ue={code:$n};var vs="en";function g(t,e=!0){var s,n;let a=e&&(n=(s=ue)==null?void 0:s[t])!=null?n:t,i=e?ue.code:vs;return new As(a,i)}var As=class{constructor(e,a=(i=>(i=ue.code)!=null?i:vs)()){this.message=e,this.locale=a}format(e){return this.message.replace(/\{(\w+)\}/g,(a,i)=>{var s;return(s=e[i])!=null?s:""})}toString(){return this.message}};function Is(t){let e="";return Object.entries(t).forEach(([a,i])=>{i!=null&&(e+=`${Bn(a)}: ${i}; `)}),e?e.trim():void 0}function Bn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ts(t){return t.replace(/[-_]([a-z])/g,(e,a)=>a.toUpperCase())}function $e(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function dt(t){let e=jn(t).toString();return e?"?"+e:""}function jn(t){let e={};for(let a in t)t[a]!=null&&(e[a]=t[a]);return new URLSearchParams(e)}function Be(t){let a=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),i=decodeURIComponent(atob(a).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(i)}var qt=(t,e)=>!t||!e?!1:t.contains(e)?!0:qt(t,e.getRootNode().host);var je=Z(require("@mux/playback-core")),Zt="mux.com",Hn=()=>{try{return"0.1.0-beta.22"}catch{}return"UNKNOWN"},Wn=Hn(),mt=()=>Wn,Xt=(t,{token:e,domain:a=Zt}={})=>`https://stream.${a}/${t}.m3u8${dt(!!e?{token:e}:{redundant_streams:!0})}`,ys=(t,{token:e,thumbnailTime:a,domain:i=Zt}={})=>{let s=e==null?a:void 0;return`https://image.${i}/${t}/thumbnail.jpg${dt({token:e,time:s})}`},_s=(t,{token:e,domain:a=Zt}={})=>`https://image.${a}/${t}/storyboard.vtt${dt({token:e})}`,Fn={crossorigin:"crossOrigin",playsinline:"playsInline"};function Ms(t){var e;return(e=Fn[t])!=null?e:Ts(t)}var ct,Kn=(t="video")=>ct||(typeof window!="undefined"&&(ct=document.createElement(t)),ct),Ss=async(t=Kn())=>{if(!t)return!1;let e=t.volume;return t.volume=e/2+.1,new Promise((a,i)=>{setTimeout(()=>{a(t.volume!==e)},0)})};function Cs(t){var e,a;return Array.from((a=(e=t.media)==null?void 0:e.textTracks)!=null?a:[]).filter(({kind:i})=>i==="subtitles"||i==="captions")}var Ls=t=>{var a,i;let{media:e}=t;return(i=(a=e==null?void 0:e._hls)==null?void 0:a.liveSyncPosition)!=null?i:(e==null?void 0:e.seekable.length)?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Jt=t=>{let e=Ls(t);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}t.currentTime=e},zn=1,Yn=5,ks=3,xs=.5,Ds=t=>{var n;let{streamType:e}=t,a=Ls(t),i=(n=t.media)==null?void 0:n.currentTime;if(a==null||i==null)return!1;let s=a-i;return e===je.StreamTypes.LL_LIVE||e===je.StreamTypes.LL_DVR?s<=zn*(ks+xs):e===je.StreamTypes.LIVE||e===je.StreamTypes.DVR?s<=Yn*(ks+xs):!1};var ws=`[mux-player ${mt()}]`;function W(...t){console.warn(ws,...t)}function he(...t){console.error(ws,...t)}function ut(t){var a;let e=(a=t.message)!=null?a:"";if(t.file){let i="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${g("Read more: ")}
|
|
1216
1216
|
${i}${t.file}`}W(e)}var _={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",SRC:"src",POSTER:"poster",PRELOAD:"preload"},ht={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},Gn=Rs.VideoEvents.filter(t=>t!=="error"),Qn=Object.values(_),qn=Object.values(ht);function Us(t){t.querySelectorAll(":scope > track").forEach(e=>{var a;(a=t.media)==null||a.append(e.cloneNode())}),Gn.forEach(e=>{var a;(a=t.media)==null||a.addEventListener(e,i=>{t.dispatchEvent(new Event(i.type))})})}var Ns=class extends HTMLElement{static get observedAttributes(){return[...Qn,...qn]}constructor(){super();this.querySelectorAll(":scope > track").forEach(i=>{var s;(s=this.media)==null||s.append(i.cloneNode())});let e=i=>{for(let s of i)s.type==="childList"&&(s.removedNodes.forEach(n=>{var l,c;let r=(l=this.media)==null?void 0:l.querySelector(`track[src="${n.src}"]`);r&&((c=this.media)==null||c.removeChild(r))}),s.addedNodes.forEach(n=>{var r;(r=this.media)==null||r.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,a,i){switch(e){case ht.MUTED:{this.media&&(this.media.muted=i!=null);return}case ht.VOLUME:{let s=+i;this.media&&!Number.isNaN(s)&&(this.media.volume=s);return}case ht.PLAYBACKRATE:{let s=+i;this.media&&!Number.isNaN(s)&&(this.media.playbackRate=s);return}}}play(){var e;return(e=this.media)==null?void 0:e.play()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var a;return(a=this.media)==null?void 0:a.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get video(){return W("<mux-player>.video is deprecated, please use .media instead"),this.media}get paused(){var e,a;return(a=(e=this.media)==null?void 0:e.paused)!=null?a:!0}get duration(){var e,a;return(a=(e=this.media)==null?void 0:e.duration)!=null?a:NaN}get ended(){var e,a;return(a=(e=this.media)==null?void 0:e.ended)!=null?a:!1}get buffered(){var e;return(e=this.media)==null?void 0:e.buffered}get readyState(){var e,a;return(a=(e=this.media)==null?void 0:e.readyState)!=null?a:0}get videoWidth(){var e;return(e=this.media)==null?void 0:e.videoWidth}get videoHeight(){var e;return(e=this.media)==null?void 0:e.videoHeight}get currentTime(){var e,a;return(a=(e=this.media)==null?void 0:e.currentTime)!=null?a:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,a;return(a=(e=this.media)==null?void 0:e.volume)!=null?a:1}set volume(e){this.media&&(this.media.volume=Number(e))}get src(){return te(this,_.SRC)}set src(e){this.setAttribute(_.SRC,`${e}`)}get poster(){var e;return(e=te(this,_.POSTER))!=null?e:""}set poster(e){this.setAttribute(_.POSTER,`${e}`)}get playbackRate(){var e,a;return(a=(e=this.media)==null?void 0:e.playbackRate)!=null?a:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get crossOrigin(){return te(this,_.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(_.CROSSORIGIN,`${e}`)}get autoplay(){return te(this,_.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(_.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(_.AUTOPLAY)}get loop(){return te(this,_.LOOP)!=null}set loop(e){e?this.setAttribute(_.LOOP,""):this.removeAttribute(_.LOOP)}get muted(){return te(this,_.MUTED)!=null}set muted(e){e?this.setAttribute(_.MUTED,""):this.removeAttribute(_.MUTED)}get playsInline(){return te(this,_.PLAYSINLINE)!=null}set playsInline(e){e?this.setAttribute(_.PLAYSINLINE,""):this.removeAttribute(_.PLAYSINLINE)}get preload(){return te(this,_.PRELOAD)}set preload(e){e?this.setAttribute(_.PRELOAD,e):this.removeAttribute(_.PRELOAD)}};function te(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var ea=Ns;var Os=`
|
|
1217
1217
|
:host {
|
|
1218
1218
|
z-index: 100;
|
package/dist/index.mjs
CHANGED
|
@@ -489,7 +489,7 @@ media-time-display {
|
|
|
489
489
|
${U()}
|
|
490
490
|
<div class="mxp-padding-2"></div>
|
|
491
491
|
</media-control-bar>
|
|
492
|
-
`;function Nt(t,e){return{audio:t.hasAttribute("audio"),streamType:t.getAttribute("stream-type"),playerSize:t.getAttribute("player-size"),defaultHiddenCaptions:t.hasAttribute("default-hidden-captions"),hasCaptions:t.hasAttribute("has-captions"),forwardSeekOffset:t.getAttribute("forward-seek-offset"),backwardSeekOffset:t.getAttribute("backward-seek-offset"),...e}}var Pe=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),ee(Dt(Nt(this)),this.shadowRoot)}attributeChangedCallback(){ee(Dt(Nt(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Pe);var Vt=Pe;import hi,{MediaError as Be}from"@mux/mux-video";import{StreamTypes as I}from"@mux/playback-core";import{VideoEvents as ni}from"@mux/mux-video";var Ga="en",B={code:Ga};var Ht="en";function l(t,e=!0){var i,n;let a=e&&(n=(i=B)==null?void 0:i[t])!=null?n:t,o=e?B.code:Ht;return new Ut(a,o)}var Ut=class{constructor(e,a=(o=>(o=B.code)!=null?o:Ht)()){this.message=e,this.locale=a}format(e){return this.message.replace(/\{(\w+)\}/g,(a,o)=>{var i;return(i=e[o])!=null?i:""})}toString(){return this.message}};function Bt(t){let e="";return Object.entries(t).forEach(([a,o])=>{o!=null&&(e+=`${Xa(a)}: ${o}; `)}),e?e.trim():void 0}function Xa(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ft(t){return t.replace(/[-_]([a-z])/g,(e,a)=>a.toUpperCase())}function ae(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function me(t){let e=Ja(t).toString();return e?"?"+e:""}function Ja(t){let e={};for(let a in t)t[a]!=null&&(e[a]=t[a]);return new URLSearchParams(e)}function ie(t){let a=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(a).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(o)}var _e=(t,e)=>!t||!e?!1:t.contains(e)?!0:_e(t,e.getRootNode().host);import{StreamTypes as ce}from"@mux/playback-core";var De="mux.com",Qa=()=>{try{return"0.1.0-beta.
|
|
492
|
+
`;function Nt(t,e){return{audio:t.hasAttribute("audio"),streamType:t.getAttribute("stream-type"),playerSize:t.getAttribute("player-size"),defaultHiddenCaptions:t.hasAttribute("default-hidden-captions"),hasCaptions:t.hasAttribute("has-captions"),forwardSeekOffset:t.getAttribute("forward-seek-offset"),backwardSeekOffset:t.getAttribute("backward-seek-offset"),...e}}var Pe=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),ee(Dt(Nt(this)),this.shadowRoot)}attributeChangedCallback(){ee(Dt(Nt(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Pe);var Vt=Pe;import hi,{MediaError as Be}from"@mux/mux-video";import{StreamTypes as I}from"@mux/playback-core";import{VideoEvents as ni}from"@mux/mux-video";var Ga="en",B={code:Ga};var Ht="en";function l(t,e=!0){var i,n;let a=e&&(n=(i=B)==null?void 0:i[t])!=null?n:t,o=e?B.code:Ht;return new Ut(a,o)}var Ut=class{constructor(e,a=(o=>(o=B.code)!=null?o:Ht)()){this.message=e,this.locale=a}format(e){return this.message.replace(/\{(\w+)\}/g,(a,o)=>{var i;return(i=e[o])!=null?i:""})}toString(){return this.message}};function Bt(t){let e="";return Object.entries(t).forEach(([a,o])=>{o!=null&&(e+=`${Xa(a)}: ${o}; `)}),e?e.trim():void 0}function Xa(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ft(t){return t.replace(/[-_]([a-z])/g,(e,a)=>a.toUpperCase())}function ae(t){if(t==null)return;let e=+t;return Number.isNaN(e)?void 0:e}function me(t){let e=Ja(t).toString();return e?"?"+e:""}function Ja(t){let e={};for(let a in t)t[a]!=null&&(e[a]=t[a]);return new URLSearchParams(e)}function ie(t){let a=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),o=decodeURIComponent(atob(a).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(o)}var _e=(t,e)=>!t||!e?!1:t.contains(e)?!0:_e(t,e.getRootNode().host);import{StreamTypes as ce}from"@mux/playback-core";var De="mux.com",Qa=()=>{try{return"0.1.0-beta.22"}catch{}return"UNKNOWN"},ei=Qa(),ue=()=>ei,Ne=(t,{token:e,domain:a=De}={})=>`https://stream.${a}/${t}.m3u8${me(!!e?{token:e}:{redundant_streams:!0})}`,Kt=(t,{token:e,thumbnailTime:a,domain:o=De}={})=>{let i=e==null?a:void 0;return`https://image.${o}/${t}/thumbnail.jpg${me({token:e,time:i})}`},Yt=(t,{token:e,domain:a=De}={})=>`https://image.${a}/${t}/storyboard.vtt${me({token:e})}`,ti={crossorigin:"crossOrigin",playsinline:"playsInline"};function zt(t){var e;return(e=ti[t])!=null?e:Ft(t)}var he,ai=(t="video")=>he||(typeof window!="undefined"&&(he=document.createElement(t)),he),Zt=async(t=ai())=>{if(!t)return!1;let e=t.volume;return t.volume=e/2+.1,new Promise((a,o)=>{setTimeout(()=>{a(t.volume!==e)},0)})};function Wt(t){var e,a;return Array.from((a=(e=t.media)==null?void 0:e.textTracks)!=null?a:[]).filter(({kind:o})=>o==="subtitles"||o==="captions")}var qt=t=>{var a,o;let{media:e}=t;return(o=(a=e==null?void 0:e._hls)==null?void 0:a.liveSyncPosition)!=null?o:(e==null?void 0:e.seekable.length)?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Ve=t=>{let e=qt(t);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}t.currentTime=e},ii=1,oi=5,jt=3,Gt=.5,Xt=t=>{var n;let{streamType:e}=t,a=qt(t),o=(n=t.media)==null?void 0:n.currentTime;if(a==null||o==null)return!1;let i=a-o;return e===ce.LL_LIVE||e===ce.LL_DVR?i<=ii*(jt+Gt):e===ce.LIVE||e===ce.DVR?i<=oi*(jt+Gt):!1};var Jt=`[mux-player ${ue()}]`;function L(...t){console.warn(Jt,...t)}function F(...t){console.error(Jt,...t)}function pe(t){var a;let e=(a=t.message)!=null?a:"";if(t.file){let o="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${l("Read more: ")}
|
|
493
493
|
${o}${t.file}`}L(e)}var h={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",SRC:"src",POSTER:"poster",PRELOAD:"preload"},ge={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},ri=ni.filter(t=>t!=="error"),si=Object.values(h),li=Object.values(ge);function Qt(t){t.querySelectorAll(":scope > track").forEach(e=>{var a;(a=t.media)==null||a.append(e.cloneNode())}),ri.forEach(e=>{var a;(a=t.media)==null||a.addEventListener(e,o=>{t.dispatchEvent(new Event(o.type))})})}var ea=class extends HTMLElement{static get observedAttributes(){return[...si,...li]}constructor(){super();this.querySelectorAll(":scope > track").forEach(o=>{var i;(i=this.media)==null||i.append(o.cloneNode())});let e=o=>{for(let i of o)i.type==="childList"&&(i.removedNodes.forEach(n=>{var u,g;let r=(u=this.media)==null?void 0:u.querySelector(`track[src="${n.src}"]`);r&&((g=this.media)==null||g.removeChild(r))}),i.addedNodes.forEach(n=>{var r;(r=this.media)==null||r.append(n.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,a,o){switch(e){case ge.MUTED:{this.media&&(this.media.muted=o!=null);return}case ge.VOLUME:{let i=+o;this.media&&!Number.isNaN(i)&&(this.media.volume=i);return}case ge.PLAYBACKRATE:{let i=+o;this.media&&!Number.isNaN(i)&&(this.media.playbackRate=i);return}}}play(){var e;return(e=this.media)==null?void 0:e.play()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var a;return(a=this.media)==null?void 0:a.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get video(){return L("<mux-player>.video is deprecated, please use .media instead"),this.media}get paused(){var e,a;return(a=(e=this.media)==null?void 0:e.paused)!=null?a:!0}get duration(){var e,a;return(a=(e=this.media)==null?void 0:e.duration)!=null?a:NaN}get ended(){var e,a;return(a=(e=this.media)==null?void 0:e.ended)!=null?a:!1}get buffered(){var e;return(e=this.media)==null?void 0:e.buffered}get readyState(){var e,a;return(a=(e=this.media)==null?void 0:e.readyState)!=null?a:0}get videoWidth(){var e;return(e=this.media)==null?void 0:e.videoWidth}get videoHeight(){var e;return(e=this.media)==null?void 0:e.videoHeight}get currentTime(){var e,a;return(a=(e=this.media)==null?void 0:e.currentTime)!=null?a:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,a;return(a=(e=this.media)==null?void 0:e.volume)!=null?a:1}set volume(e){this.media&&(this.media.volume=Number(e))}get src(){return P(this,h.SRC)}set src(e){this.setAttribute(h.SRC,`${e}`)}get poster(){var e;return(e=P(this,h.POSTER))!=null?e:""}set poster(e){this.setAttribute(h.POSTER,`${e}`)}get playbackRate(){var e,a;return(a=(e=this.media)==null?void 0:e.playbackRate)!=null?a:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get crossOrigin(){return P(this,h.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(h.CROSSORIGIN,`${e}`)}get autoplay(){return P(this,h.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(h.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(h.AUTOPLAY)}get loop(){return P(this,h.LOOP)!=null}set loop(e){e?this.setAttribute(h.LOOP,""):this.removeAttribute(h.LOOP)}get muted(){return P(this,h.MUTED)!=null}set muted(e){e?this.setAttribute(h.MUTED,""):this.removeAttribute(h.MUTED)}get playsInline(){return P(this,h.PLAYSINLINE)!=null}set playsInline(e){e?this.setAttribute(h.PLAYSINLINE,""):this.removeAttribute(h.PLAYSINLINE)}get preload(){return P(this,h.PRELOAD)}set preload(e){e?this.setAttribute(h.PRELOAD,e):this.removeAttribute(h.PRELOAD)}};function P(t,e){return t.media?t.media.getAttribute(e):t.getAttribute(e)}var He=ea;var ta=`
|
|
494
494
|
:host {
|
|
495
495
|
z-index: 100;
|
package/dist/mux-player.js
CHANGED
|
@@ -1240,7 +1240,7 @@ media-time-display {
|
|
|
1240
1240
|
${xt()}
|
|
1241
1241
|
<div class="mxp-padding-2"></div>
|
|
1242
1242
|
</media-control-bar>
|
|
1243
|
-
`;function Rs(h,e){return{audio:h.hasAttribute("audio"),streamType:h.getAttribute("stream-type"),playerSize:h.getAttribute("player-size"),defaultHiddenCaptions:h.hasAttribute("default-hidden-captions"),hasCaptions:h.hasAttribute("has-captions"),forwardSeekOffset:h.getAttribute("forward-seek-offset"),backwardSeekOffset:h.getAttribute("backward-seek-offset"),...e}}var Fi=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),ir(Ms(Rs(this)),this.shadowRoot)}attributeChangedCallback(){ir(Ms(Rs(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Fi);var Cs=Fi;var vu=Object.defineProperty,mu=(h,e,t)=>e in h?vu(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t,Pr=(h,e,t)=>(mu(h,typeof e!="symbol"?e+"":e,t),t),ji=(h,e,t)=>{if(!e.has(h))throw TypeError("Cannot "+t)},ae=(h,e,t)=>(ji(h,e,"read from private field"),t?t.call(h):e.get(h)),Le=(h,e,t)=>{if(e.has(h))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(h):e.set(h,t)},ze=(h,e,t,l)=>(ji(h,e,"write to private field"),l?l.call(h,t):e.set(h,t),t),He=(h,e,t)=>(ji(h,e,"access private method"),t),gu=()=>{try{return"0.8.0"}catch{}return"UNKNOWN"},pu=gu(),Eu=()=>pu,yu=h=>{var e,t,l,n,v,R,T,L,_,E,I,M,D,b,A,u,r,s,i,a,d,o,y,p,m,g,f,c,x,S,C,O,P,w,U,k,N,B,K,W;return e=class extends h{constructor(){super();Le(this,f),Le(this,x),Le(this,C),Le(this,P),Le(this,U),Le(this,N),Le(this,K),Pr(this,"castEnabled",!1),Le(this,d,{paused:!1}),Le(this,o,void 0),Le(this,y,{}),Le(this,p,void 0),Le(this,m,void 0),Le(this,g,void 0),e.instances.add(this),He(this,U,k).call(this)}static get castElement(){return ae(e,t)}static get castEnabled(){return ae(e,l)}static get castState(){var F;return(F=ae(e,_,E))==null?void 0:F.getCastState()}static async exitCast(){let F=!0;try{await ae(e,_,E).endCurrentSession(F)}catch(H){console.error(H);return}}get castPlayer(){if(e.castElement===this)return ae(this,o)}attributeChangedCallback(F){if(this.castPlayer)switch(F){case"cast-stream-type":case"cast-src":this.load();break}}async requestCast(F={}){var H;He(H=e,i,a).call(H,F),ze(e,t,this),Object.entries(ae(this,y)).forEach(([Y,$])=>{ae(this,o).controller.addEventListener(Y,$)});try{await ae(e,_,E).requestSession()}catch{ze(e,t,void 0);return}ae(this,d).paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(Y){console.error(Y)}}async load(){var F,H;if(!this.castPlayer)return super.load();let Y=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType),$=[...this.querySelectorAll("track")].filter(({kind:X,src:ie})=>ie&&(X==="subtitles"||X==="captions")),Z=[],q=0;$.length&&(Y.tracks=$.map(X=>{let ie=++q;Z.length===0&&X.track.mode==="showing"&&Z.push(ie);let fe=new chrome.cast.media.Track(ie,chrome.cast.media.TrackType.TEXT);return fe.trackContentId=X.src,fe.trackContentType="text/vtt",fe.subtype=X.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,fe.name=X.label,fe.language=X.srclang,fe})),this.castStreamType==="live"?Y.streamType=chrome.cast.media.StreamType.LIVE:Y.streamType=chrome.cast.media.StreamType.BUFFERED,Y.metadata=new chrome.cast.media.GenericMediaMetadata,Y.metadata.title=this.title,Y.metadata.images=[{url:this.poster}];let oe=new chrome.cast.media.LoadRequest(Y);oe.currentTime=(F=super.currentTime)!=null?F:0,oe.autoplay=!ae(this,d).paused,oe.activeTrackIds=Z,await((H=ae(e,I,M))==null?void 0:H.loadMedia(oe)),this.dispatchEvent(new Event("volumechange"))}play(){var F;if(this.castPlayer){this.castPlayer.isPaused&&((F=this.castPlayer.controller)==null||F.playOrPause());return}return super.play()}pause(){var F;if(this.castPlayer){this.castPlayer.isPaused||(F=this.castPlayer.controller)==null||F.playOrPause();return}super.pause()}get castSrc(){var F,H,Y;return(Y=(H=this.getAttribute("cast-src"))!=null?H:(F=this.querySelector("source"))==null?void 0:F.src)!=null?Y:this.currentSrc}set castSrc(F){this.castSrc!=F&&this.setAttribute("cast-src",`${F}`)}get castContentType(){var F;return(F=this.getAttribute("cast-content-type"))!=null?F:void 0}set castContentType(F){this.setAttribute("cast-content-type",`${F}`)}get castStreamType(){var F;return(F=this.getAttribute("cast-stream-type"))!=null?F:void 0}set castStreamType(F){this.setAttribute("cast-stream-type",`${F}`)}get readyState(){if(this.castPlayer)switch(this.castPlayer.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.castPlayer?this.castPlayer.isPaused:super.paused}get muted(){var F;return this.castPlayer?(F=this.castPlayer)==null?void 0:F.isMuted:super.muted}set muted(F){var H;if(this.castPlayer){(F&&!this.castPlayer.isMuted||!F&&this.castPlayer.isMuted)&&((H=this.castPlayer.controller)==null||H.muteOrUnmute());return}super.muted=F}get volume(){var F,H;return this.castPlayer?(H=(F=this.castPlayer)==null?void 0:F.volumeLevel)!=null?H:1:super.volume}set volume(F){var H;if(this.castPlayer){this.castPlayer.volumeLevel=F,(H=this.castPlayer.controller)==null||H.setVolumeLevel();return}super.volume=F}get duration(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.duration)!=null?H:NaN:super.duration}get currentTime(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.currentTime)!=null?H:0:super.currentTime}set currentTime(F){var H;if(this.castPlayer){this.castPlayer.currentTime=F,(H=this.castPlayer.controller)==null||H.seek();return}super.currentTime=F}get onentercast(){return ae(this,p)}set onentercast(F){ae(this,p)&&(this.removeEventListener("entercast",ae(this,p)),ze(this,p,null)),typeof F=="function"&&(ze(this,p,F),this.addEventListener("entercast",F))}get onleavecast(){return ae(this,m)}set onleavecast(F){ae(this,m)&&(this.removeEventListener("leavecast",ae(this,m)),ze(this,m,null)),typeof F=="function"&&(ze(this,m,F),this.addEventListener("leavecast",F))}get oncastchange(){return ae(this,g)}set oncastchange(F){ae(this,g)&&(this.removeEventListener("castchange",ae(this,g)),ze(this,g,null)),typeof F=="function"&&(ze(this,g,F),this.addEventListener("castchange",F))}},t=new WeakMap,l=new WeakMap,n=new WeakMap,v=new WeakSet,R=function(){return typeof chrome!="undefined"&&chrome.cast&&chrome.cast.isAvailable},T=new WeakSet,L=function(){return typeof cast!="undefined"&&cast.framework},_=new WeakSet,E=function(){if(ae(e,T,L))return cast.framework.CastContext.getInstance()},I=new WeakSet,M=function(){var F;return(F=ae(e,_,E))==null?void 0:F.getCurrentSession()},D=new WeakSet,b=function(){var F;return(F=ae(e,I,M))==null?void 0:F.getSessionObj().media[0]},A=new WeakSet,u=function(F){return new Promise((H,Y)=>{ae(e,D,b).editTracksInfo(F,H,Y)})},r=new WeakSet,s=function(F){return new Promise((H,Y)=>{ae(e,D,b).getStatus(F,H,Y)})},i=new WeakSet,a=function(F){return ae(e,_,E).setOptions({receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0,...F})},d=new WeakMap,o=new WeakMap,y=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,f=new WeakSet,c=function(){var F;return(F=this.castPlayer)==null?void 0:F.isMediaLoaded},x=new WeakSet,S=function(){ae(e,t)===this&&(Object.entries(ae(this,y)).forEach(([F,H])=>{ae(this,o).controller.removeEventListener(F,H)}),ze(e,t,void 0),this.muted=ae(this,o).isMuted,this.currentTime=ae(this,o).savedPlayerState.currentTime,ae(this,o).savedPlayerState.isPaused===!1&&this.play())},C=new WeakSet,O=function(){this.dispatchEvent(new CustomEvent("castchange",{detail:ae(e,_,E).getCastState()}))},P=new WeakSet,w=async function(){var F,H;let{SESSION_RESUMED:Y}=cast.framework.SessionState;if(ae(e,_,E).getSessionState()===Y&&this.castSrc===((F=ae(e,D,b))==null?void 0:F.media.contentId)){ze(e,t,this),Object.entries(ae(this,y)).forEach(([$,Z])=>{ae(this,o).controller.addEventListener($,Z)});try{await He(H=e,r,s).call(H,new chrome.cast.media.GetStatusRequest)}catch($){console.error($)}ae(this,y)[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED](),ae(this,y)[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},U=new WeakSet,k=function(){var F;!ae(e,T,L)||this.castEnabled||(this.castEnabled=!0,He(F=e,i,a).call(F),this.textTracks.addEventListener("change",He(this,K,W).bind(this)),He(this,C,O).call(this),ze(this,o,new cast.framework.RemotePlayer),new cast.framework.RemotePlayerController(ae(this,o)),ze(this,y,{[cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:H})=>{H===!1&&He(this,x,S).call(this),this.dispatchEvent(new Event(H?"entercast":"leavecast"))},[cast.framework.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.dispatchEvent(new Event("durationchange"))},[cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{!ae(this,f,c)||this.dispatchEvent(new Event("timeupdate"))},[cast.framework.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.dispatchEvent(new Event("resize"))},[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.dispatchEvent(new Event(this.paused?"pause":"play"))},[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var H,Y;((H=this.castPlayer)==null?void 0:H.playerState)!==chrome.cast.media.PlayerState.PAUSED&&this.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(Y=this.castPlayer)==null?void 0:Y.playerState]))},[cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{!ae(this,f,c)||(await Promise.resolve(),He(this,N,B).call(this))}}))},N=new WeakSet,B=function(){He(this,K,W).call(this)},K=new WeakSet,W=async function(){var F,H,Y,$,Z,q;if(!this.castPlayer)return;let oe=((H=(F=ae(this,o).mediaInfo)==null?void 0:F.tracks)!=null?H:[]).filter(({type:Q})=>Q===chrome.cast.media.TrackType.TEXT),X=[...this.textTracks].filter(({kind:Q})=>Q==="subtitles"||Q==="captions"),ie=oe.map(({language:Q,name:te,trackId:ee})=>{var he;let{mode:_e}=(he=X.find(Ee=>Ee.language===Q&&Ee.label===te))!=null?he:{};return _e?{mode:_e,trackId:ee}:!1}).filter(Boolean),fe=ie.filter(({mode:Q})=>Q!=="showing").map(({trackId:Q})=>Q),ue=ie.find(({mode:Q})=>Q==="showing"),Se=(Z=($=(Y=ae(e,I,M))==null?void 0:Y.getSessionObj().media[0])==null?void 0:$.activeTrackIds)!=null?Z:[],re=Se;if(Se.length&&(re=re.filter(Q=>!fe.includes(Q))),(ue==null?void 0:ue.trackId)&&(re=[...re,ue.trackId]),re=[...new Set(re)],!((Q,te)=>Q.length===te.length&&Q.every(ee=>te.includes(ee)))(Se,re))try{let Q=new chrome.cast.media.EditTracksInfoRequest(re);await He(q=e,A,u).call(q,Q)}catch(Q){console.error(Q)}},Le(e,v),Le(e,T),Le(e,_),Le(e,I),Le(e,D),Le(e,A),Le(e,r),Le(e,i),Pr(e,"observedAttributes",["cast-src","cast-content-type","cast-stream-type"]),Pr(e,"instances",new Set),Le(e,t,void 0),Le(e,l,!1),Pr(e,"initCast",()=>{var F;ae(e,v,R)?ae(e,T,L)?ae(F=e,n).call(F,chrome.cast.isAvailable):customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)}):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)})}}),Le(e,n,F=>{if(F){ze(e,l,!0);let{CAST_STATE_CHANGED:H}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(H,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,C,O).call(q,$)})});let{SESSION_STATE_CHANGED:Y}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(Y,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,P,w).call(q,$)})}),e.instances.forEach($=>{var Z;return He(Z=$,U,k).call(Z)})}}),e},Ki=yu(HTMLVideoElement);customElements.get("castable-video")||(customElements.define("castable-video",Ki,{extends:"video"}),globalThis.CastableVideoElement=Ki);Ki.initCast();var Wi=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","castchange","entercast","leavecast"],Os=document.createElement("template");Os.innerHTML=`
|
|
1243
|
+
`;function Rs(h,e){return{audio:h.hasAttribute("audio"),streamType:h.getAttribute("stream-type"),playerSize:h.getAttribute("player-size"),defaultHiddenCaptions:h.hasAttribute("default-hidden-captions"),hasCaptions:h.hasAttribute("has-captions"),forwardSeekOffset:h.getAttribute("forward-seek-offset"),backwardSeekOffset:h.getAttribute("backward-seek-offset"),...e}}var Fi=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),ir(Ms(Rs(this)),this.shadowRoot)}attributeChangedCallback(){ir(Ms(Rs(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Fi);var Cs=Fi;var vu=Object.defineProperty,mu=(h,e,t)=>e in h?vu(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t,Pr=(h,e,t)=>(mu(h,typeof e!="symbol"?e+"":e,t),t),ji=(h,e,t)=>{if(!e.has(h))throw TypeError("Cannot "+t)},ae=(h,e,t)=>(ji(h,e,"read from private field"),t?t.call(h):e.get(h)),Le=(h,e,t)=>{if(e.has(h))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(h):e.set(h,t)},ze=(h,e,t,l)=>(ji(h,e,"write to private field"),l?l.call(h,t):e.set(h,t),t),He=(h,e,t)=>(ji(h,e,"access private method"),t),gu=()=>{try{return"0.8.1"}catch{}return"UNKNOWN"},pu=gu(),Eu=()=>pu,yu=h=>{var e,t,l,n,v,R,T,L,_,E,I,M,D,b,A,u,r,s,i,a,d,o,y,p,m,g,f,c,x,S,C,O,P,w,U,k,N,B,K,W;return e=class extends h{constructor(){super();Le(this,f),Le(this,x),Le(this,C),Le(this,P),Le(this,U),Le(this,N),Le(this,K),Pr(this,"castEnabled",!1),Le(this,d,{paused:!1}),Le(this,o,void 0),Le(this,y,{}),Le(this,p,void 0),Le(this,m,void 0),Le(this,g,void 0),e.instances.add(this),He(this,U,k).call(this)}static get castElement(){return ae(e,t)}static get castEnabled(){return ae(e,l)}static get castState(){var F;return(F=ae(e,_,E))==null?void 0:F.getCastState()}static async exitCast(){let F=!0;try{await ae(e,_,E).endCurrentSession(F)}catch(H){console.error(H);return}}get castPlayer(){if(e.castElement===this)return ae(this,o)}attributeChangedCallback(F){if(this.castPlayer)switch(F){case"cast-stream-type":case"cast-src":this.load();break}}async requestCast(F={}){var H;He(H=e,i,a).call(H,F),ze(e,t,this),Object.entries(ae(this,y)).forEach(([Y,$])=>{ae(this,o).controller.addEventListener(Y,$)});try{await ae(e,_,E).requestSession()}catch{ze(e,t,void 0);return}ae(this,d).paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(Y){console.error(Y)}}async load(){var F,H;if(!this.castPlayer)return super.load();let Y=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType),$=[...this.querySelectorAll("track")].filter(({kind:X,src:ie})=>ie&&(X==="subtitles"||X==="captions")),Z=[],q=0;$.length&&(Y.tracks=$.map(X=>{let ie=++q;Z.length===0&&X.track.mode==="showing"&&Z.push(ie);let fe=new chrome.cast.media.Track(ie,chrome.cast.media.TrackType.TEXT);return fe.trackContentId=X.src,fe.trackContentType="text/vtt",fe.subtype=X.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,fe.name=X.label,fe.language=X.srclang,fe})),this.castStreamType==="live"?Y.streamType=chrome.cast.media.StreamType.LIVE:Y.streamType=chrome.cast.media.StreamType.BUFFERED,Y.metadata=new chrome.cast.media.GenericMediaMetadata,Y.metadata.title=this.title,Y.metadata.images=[{url:this.poster}];let oe=new chrome.cast.media.LoadRequest(Y);oe.currentTime=(F=super.currentTime)!=null?F:0,oe.autoplay=!ae(this,d).paused,oe.activeTrackIds=Z,await((H=ae(e,I,M))==null?void 0:H.loadMedia(oe)),this.dispatchEvent(new Event("volumechange"))}play(){var F;if(this.castPlayer){this.castPlayer.isPaused&&((F=this.castPlayer.controller)==null||F.playOrPause());return}return super.play()}pause(){var F;if(this.castPlayer){this.castPlayer.isPaused||(F=this.castPlayer.controller)==null||F.playOrPause();return}super.pause()}get castSrc(){var F,H,Y;return(Y=(H=this.getAttribute("cast-src"))!=null?H:(F=this.querySelector("source"))==null?void 0:F.src)!=null?Y:this.currentSrc}set castSrc(F){this.castSrc!=F&&this.setAttribute("cast-src",`${F}`)}get castContentType(){var F;return(F=this.getAttribute("cast-content-type"))!=null?F:void 0}set castContentType(F){this.setAttribute("cast-content-type",`${F}`)}get castStreamType(){var F;return(F=this.getAttribute("cast-stream-type"))!=null?F:void 0}set castStreamType(F){this.setAttribute("cast-stream-type",`${F}`)}get readyState(){if(this.castPlayer)switch(this.castPlayer.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.castPlayer?this.castPlayer.isPaused:super.paused}get muted(){var F;return this.castPlayer?(F=this.castPlayer)==null?void 0:F.isMuted:super.muted}set muted(F){var H;if(this.castPlayer){(F&&!this.castPlayer.isMuted||!F&&this.castPlayer.isMuted)&&((H=this.castPlayer.controller)==null||H.muteOrUnmute());return}super.muted=F}get volume(){var F,H;return this.castPlayer?(H=(F=this.castPlayer)==null?void 0:F.volumeLevel)!=null?H:1:super.volume}set volume(F){var H;if(this.castPlayer){this.castPlayer.volumeLevel=F,(H=this.castPlayer.controller)==null||H.setVolumeLevel();return}super.volume=F}get duration(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.duration)!=null?H:NaN:super.duration}get currentTime(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.currentTime)!=null?H:0:super.currentTime}set currentTime(F){var H;if(this.castPlayer){this.castPlayer.currentTime=F,(H=this.castPlayer.controller)==null||H.seek();return}super.currentTime=F}get onentercast(){return ae(this,p)}set onentercast(F){ae(this,p)&&(this.removeEventListener("entercast",ae(this,p)),ze(this,p,null)),typeof F=="function"&&(ze(this,p,F),this.addEventListener("entercast",F))}get onleavecast(){return ae(this,m)}set onleavecast(F){ae(this,m)&&(this.removeEventListener("leavecast",ae(this,m)),ze(this,m,null)),typeof F=="function"&&(ze(this,m,F),this.addEventListener("leavecast",F))}get oncastchange(){return ae(this,g)}set oncastchange(F){ae(this,g)&&(this.removeEventListener("castchange",ae(this,g)),ze(this,g,null)),typeof F=="function"&&(ze(this,g,F),this.addEventListener("castchange",F))}},t=new WeakMap,l=new WeakMap,n=new WeakMap,v=new WeakSet,R=function(){return typeof chrome!="undefined"&&chrome.cast&&chrome.cast.isAvailable},T=new WeakSet,L=function(){return typeof cast!="undefined"&&cast.framework},_=new WeakSet,E=function(){if(ae(e,T,L))return cast.framework.CastContext.getInstance()},I=new WeakSet,M=function(){var F;return(F=ae(e,_,E))==null?void 0:F.getCurrentSession()},D=new WeakSet,b=function(){var F;return(F=ae(e,I,M))==null?void 0:F.getSessionObj().media[0]},A=new WeakSet,u=function(F){return new Promise((H,Y)=>{ae(e,D,b).editTracksInfo(F,H,Y)})},r=new WeakSet,s=function(F){return new Promise((H,Y)=>{ae(e,D,b).getStatus(F,H,Y)})},i=new WeakSet,a=function(F){return ae(e,_,E).setOptions({receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0,...F})},d=new WeakMap,o=new WeakMap,y=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,f=new WeakSet,c=function(){var F;return(F=this.castPlayer)==null?void 0:F.isMediaLoaded},x=new WeakSet,S=function(){ae(e,t)===this&&(Object.entries(ae(this,y)).forEach(([F,H])=>{ae(this,o).controller.removeEventListener(F,H)}),ze(e,t,void 0),this.muted=ae(this,o).isMuted,this.currentTime=ae(this,o).savedPlayerState.currentTime,ae(this,o).savedPlayerState.isPaused===!1&&this.play())},C=new WeakSet,O=function(){this.dispatchEvent(new CustomEvent("castchange",{detail:ae(e,_,E).getCastState()}))},P=new WeakSet,w=async function(){var F,H;let{SESSION_RESUMED:Y}=cast.framework.SessionState;if(ae(e,_,E).getSessionState()===Y&&this.castSrc===((F=ae(e,D,b))==null?void 0:F.media.contentId)){ze(e,t,this),Object.entries(ae(this,y)).forEach(([$,Z])=>{ae(this,o).controller.addEventListener($,Z)});try{await He(H=e,r,s).call(H,new chrome.cast.media.GetStatusRequest)}catch($){console.error($)}ae(this,y)[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED](),ae(this,y)[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},U=new WeakSet,k=function(){var F;!ae(e,T,L)||this.castEnabled||(this.castEnabled=!0,He(F=e,i,a).call(F),this.textTracks.addEventListener("change",He(this,K,W).bind(this)),He(this,C,O).call(this),ze(this,o,new cast.framework.RemotePlayer),new cast.framework.RemotePlayerController(ae(this,o)),ze(this,y,{[cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:H})=>{H===!1&&He(this,x,S).call(this),this.dispatchEvent(new Event(H?"entercast":"leavecast"))},[cast.framework.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.dispatchEvent(new Event("durationchange"))},[cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{!ae(this,f,c)||this.dispatchEvent(new Event("timeupdate"))},[cast.framework.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.dispatchEvent(new Event("resize"))},[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.dispatchEvent(new Event(this.paused?"pause":"play"))},[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var H,Y;((H=this.castPlayer)==null?void 0:H.playerState)!==chrome.cast.media.PlayerState.PAUSED&&this.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(Y=this.castPlayer)==null?void 0:Y.playerState]))},[cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{!ae(this,f,c)||(await Promise.resolve(),He(this,N,B).call(this))}}))},N=new WeakSet,B=function(){He(this,K,W).call(this)},K=new WeakSet,W=async function(){var F,H,Y,$,Z,q;if(!this.castPlayer)return;let oe=((H=(F=ae(this,o).mediaInfo)==null?void 0:F.tracks)!=null?H:[]).filter(({type:Q})=>Q===chrome.cast.media.TrackType.TEXT),X=[...this.textTracks].filter(({kind:Q})=>Q==="subtitles"||Q==="captions"),ie=oe.map(({language:Q,name:te,trackId:ee})=>{var he;let{mode:_e}=(he=X.find(Ee=>Ee.language===Q&&Ee.label===te))!=null?he:{};return _e?{mode:_e,trackId:ee}:!1}).filter(Boolean),fe=ie.filter(({mode:Q})=>Q!=="showing").map(({trackId:Q})=>Q),ue=ie.find(({mode:Q})=>Q==="showing"),Se=(Z=($=(Y=ae(e,I,M))==null?void 0:Y.getSessionObj().media[0])==null?void 0:$.activeTrackIds)!=null?Z:[],re=Se;if(Se.length&&(re=re.filter(Q=>!fe.includes(Q))),(ue==null?void 0:ue.trackId)&&(re=[...re,ue.trackId]),re=[...new Set(re)],!((Q,te)=>Q.length===te.length&&Q.every(ee=>te.includes(ee)))(Se,re))try{let Q=new chrome.cast.media.EditTracksInfoRequest(re);await He(q=e,A,u).call(q,Q)}catch(Q){console.error(Q)}},Le(e,v),Le(e,T),Le(e,_),Le(e,I),Le(e,D),Le(e,A),Le(e,r),Le(e,i),Pr(e,"observedAttributes",["cast-src","cast-content-type","cast-stream-type"]),Pr(e,"instances",new Set),Le(e,t,void 0),Le(e,l,!1),Pr(e,"initCast",()=>{var F;ae(e,v,R)?ae(e,T,L)?ae(F=e,n).call(F,chrome.cast.isAvailable):customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)}):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)})}}),Le(e,n,F=>{if(F){ze(e,l,!0);let{CAST_STATE_CHANGED:H}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(H,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,C,O).call(q,$)})});let{SESSION_STATE_CHANGED:Y}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(Y,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,P,w).call(q,$)})}),e.instances.forEach($=>{var Z;return He(Z=$,U,k).call(Z)})}}),e},Ki=yu(HTMLVideoElement);customElements.get("castable-video")||(customElements.define("castable-video",Ki,{extends:"video"}),globalThis.CastableVideoElement=Ki);Ki.initCast();var Wi=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","castchange","entercast","leavecast"],Os=document.createElement("template");Os.innerHTML=`
|
|
1244
1244
|
<style>
|
|
1245
1245
|
:host {
|
|
1246
1246
|
display: inline-block;
|
|
@@ -1258,7 +1258,7 @@ media-time-display {
|
|
|
1258
1258
|
</style>
|
|
1259
1259
|
<video is="castable-video" part="video" crossorigin></video>
|
|
1260
1260
|
<slot></slot>
|
|
1261
|
-
`;var kr,wr,Ur,Hi,Nr,Gi,jt=class extends HTMLElement{constructor(){super();Le(this,Ur),Le(this,Nr),Le(this,kr,void 0),Le(this,wr,void 0),this.attachShadow({mode:"open"}),this.isConnected&&He(this,Ur,Hi).call(this)}static get observedAttributes(){let h=[],e=l=>l.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();Object.getOwnPropertyNames(this.prototype).forEach(l=>{let n=!1;try{typeof this.prototype[l]=="function"&&(n=!0)}catch{}!n&&l!==l.toUpperCase()&&h.push(l.toLowerCase(),e(l))});let t=Object.getPrototypeOf(this).observedAttributes;return t&&(h=h.concat(t)),h}attributeChangedCallback(h,e,t){!ae(this,kr)&&!this.isConnected&&(ze(this,kr,!0),He(this,Ur,Hi).call(this)),He(this,Nr,Gi).call(this,h,e,t)}connectedCallback(){}};kr=new WeakMap,wr=new WeakMap,Ur=new WeakSet,Hi=function(){if(ae(this,wr))return;ze(this,wr,!0),this.shadowRoot.append(Os.content.cloneNode(!0)),this.nativeEl=this.shadowRoot.querySelector("video"),Wi.forEach(e=>{this.nativeEl.addEventListener(e,t=>{this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail}))})});let h=this.shadowRoot.querySelector("slot");h.addEventListener("slotchange",()=>{h.assignedElements().forEach(e=>{!["track","source"].includes(e.localName)||this.nativeEl.append(e)})}),Array.prototype.forEach.call(this.attributes,e=>{He(this,Nr,Gi).call(this,e.name,null,e.value)}),this.nativeEl.defaultMuted&&(this.nativeEl.muted=!0)},Nr=new WeakSet,Gi=function(h,e,t){let l=Object.getOwnPropertyNames(Object.getPrototypeOf(this)),n=bu(l,h),v=Object.getPrototypeOf(this.constructor).toString().indexOf("function HTMLElement")===0;n&&!v?typeof this[n]=="boolean"?t===null?this[n]=!1:this[n]=!0:this[n]=t:t===null?this.nativeEl.removeAttribute(h):["id","class"].indexOf(h)===-1&&this.nativeEl.setAttribute(h,t)};var Ps=[],ks=document.createElement("video",{is:"castable-video"}),Tu=["webkitDisplayingFullscreen","webkitSupportsFullscreen"];for(let h=Object.getPrototypeOf(ks);h&&h!==HTMLElement.prototype;h=Object.getPrototypeOf(h))Object.getOwnPropertyNames(h).forEach(e=>{Tu.indexOf(e)===-1&&Ps.push(e)});Ps.forEach(h=>{if(!(h in jt.prototype))if(typeof ks[h]=="function")jt.prototype[h]=function(){return this.nativeEl[h].apply(this.nativeEl,arguments)};else{let e={get(){return this.nativeEl[h]}};h!==h.toUpperCase()&&(e.set=function(t){this.nativeEl[h]=t}),Object.defineProperty(jt.prototype,h,e)}});function bu(h,e){let t=null;return h.forEach(l=>{l.toLowerCase()==e.toLowerCase()&&(t=l)}),t}globalThis.customElements.get("custom-video")||(globalThis.customElements.define("custom-video",jt),globalThis.CustomVideoElement=jt);var ws=jt,ge={ENV_KEY:"env-key",DEBUG:"debug",PLAYBACK_ID:"playback-id",METADATA_URL:"metadata-url",PREFER_MSE:"prefer-mse",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_SOFTWARE_NAME:"player-software-name",METADATA_VIDEO_ID:"metadata-video-id",METADATA_VIDEO_TITLE:"metadata-video-title",METADATA_VIEWER_USER_ID:"metadata-viewer-user-id",BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",TYPE:"type",STREAM_TYPE:"stream-type",START_TIME:"start-time"},Au=Object.values(ge),Su=Eu(),_u="mux-video",Vi=class extends ws{constructor(){super();this.__metadata={},this.__playerInitTime=mn()}static get observedAttributes(){var h;return[...Au,...(h=ws.observedAttributes)!=null?h:[]]}get playerInitTime(){return this.__playerInitTime}get playerSoftwareName(){var h;return(h=this.__playerSoftwareName)!=null?h:_u}set playerSoftwareName(h){this.__playerSoftwareName=h}get playerSoftwareVersion(){var h;return(h=this.__playerSoftwareVersion)!=null?h:Su}set playerSoftwareVersion(h){this.__playerSoftwareVersion=h}get hls(){return console.warn("<mux-video>.hls is deprecated, please use ._hls instead"),this._hls}get _hls(){return this.__hls}get mux(){return this.nativeEl.mux}get error(){var h;return(h=En(this.nativeEl))!=null?h:null}get errorTranslator(){return this.__errorTranslator}set errorTranslator(h){this.__errorTranslator=h}get src(){return this.getAttribute("src")}set src(h){h!==this.src&&(h==null?this.removeAttribute("src"):this.setAttribute("src",h))}get type(){var h;return(h=this.getAttribute(ge.TYPE))!=null?h:void 0}set type(h){h!==this.type&&(h?this.setAttribute(ge.TYPE,h):this.removeAttribute(ge.TYPE))}get autoplay(){let h=this.getAttribute("autoplay");return h===null?!1:h===""?!0:h}set autoplay(h){let e=this.autoplay;h!==e&&(h?this.setAttribute("autoplay",typeof h=="string"?h:""):this.removeAttribute("autoplay"))}get debug(){return this.getAttribute(ge.DEBUG)!=null}set debug(h){h!==this.debug&&(h?this.setAttribute(ge.DEBUG,""):this.removeAttribute(ge.DEBUG))}get startTime(){let h=this.getAttribute(ge.START_TIME);if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}set startTime(h){h!==this.startTime&&(h==null?this.removeAttribute(ge.START_TIME):this.setAttribute(ge.START_TIME,`${h}`))}get playbackId(){var h;return(h=this.getAttribute(ge.PLAYBACK_ID))!=null?h:void 0}set playbackId(h){h!==this.playbackId&&(h?this.setAttribute(ge.PLAYBACK_ID,h):this.removeAttribute(ge.PLAYBACK_ID))}get customDomain(){var h;return(h=this.getAttribute(ge.CUSTOM_DOMAIN))!=null?h:void 0}set customDomain(h){h!==this.customDomain&&(h?this.setAttribute(ge.CUSTOM_DOMAIN,h):this.removeAttribute(ge.CUSTOM_DOMAIN))}get envKey(){var h;return(h=this.getAttribute(ge.ENV_KEY))!=null?h:void 0}set envKey(h){h!==this.envKey&&(h?this.setAttribute(ge.ENV_KEY,h):this.removeAttribute(ge.ENV_KEY))}get beaconCollectionDomain(){var h;return(h=this.getAttribute(ge.BEACON_COLLECTION_DOMAIN))!=null?h:void 0}set beaconCollectionDomain(h){h!==this.beaconCollectionDomain&&(h?this.setAttribute(ge.BEACON_COLLECTION_DOMAIN,h):this.removeAttribute(ge.BEACON_COLLECTION_DOMAIN))}get streamType(){var h;return(h=this.getAttribute(ge.STREAM_TYPE))!=null?h:void 0}set streamType(h){h!==this.streamType&&(h?this.setAttribute(ge.STREAM_TYPE,h):this.removeAttribute(ge.STREAM_TYPE))}get preferMse(){return this.getAttribute(ge.PREFER_MSE)!=null}set preferMse(h){h?this.setAttribute(ge.PREFER_MSE,""):this.removeAttribute(ge.PREFER_MSE)}get metadata(){let h=this.getAttribute(ge.METADATA_VIDEO_ID),e=this.getAttribute(ge.METADATA_VIDEO_TITLE),t=this.getAttribute(ge.METADATA_VIEWER_USER_ID);return{...this.__metadata,...h!=null?{video_id:h}:{},...e!=null?{video_title:e}:{},...t!=null?{viewer_user_id:t}:{}}}set metadata(h){this.__metadata=h!=null?h:{},this.mux&&this.mux.emit("hb",this.__metadata)}load(){let h=Tn(this,this.nativeEl,this.__hls);this.__hls=h;let e=fn(this.nativeEl,this.autoplay,h);this.__updateAutoplay=e}unload(){mi(this.nativeEl,this.__hls),this.__hls=void 0}attributeChangedCallback(h,e,t){var l;switch(h){case ge.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case ge.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":let n=!!e,v=!!t;!n&&v?this.load():n&&!v?this.unload():n&&v&&(this.unload(),this.load());break;case"autoplay":if(t===e)break;(l=this.__updateAutoplay)==null||l.call(this,this.autoplay);break;case ge.PLAYBACK_ID:this.src=gn(t!=null?t:void 0,{domain:this.customDomain});break;case ge.DEBUG:let R=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=R);break;case ge.METADATA_URL:t&&fetch(t).then(T=>T.json()).then(T=>this.metadata=T).catch(T=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;default:break}super.attributeChangedCallback(h,e,t)}disconnectedCallback(){this.unload()}};globalThis.customElements.get("mux-video")||(globalThis.customElements.define("mux-video",Vi),globalThis.MuxVideoElement=Vi);var Us=Vi;var xu="en",Lt={code:xu};var Ns="en";function pe(h,e=!0){var n,v;let t=e&&(v=(n=Lt)==null?void 0:n[h])!=null?v:h,l=e?Lt.code:Ns;return new Bs(t,l)}var Bs=class{constructor(e,t=(l=>(l=Lt.code)!=null?l:Ns)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,l)=>{var n;return(n=e[l])!=null?n:""})}toString(){return this.message}};function Fs(h){let e="";return Object.entries(h).forEach(([t,l])=>{l!=null&&(e+=`${Lu(t)}: ${l}; `)}),e?e.trim():void 0}function Lu(h){return h.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function js(h){return h.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ar(h){if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}function Br(h){let e=Du(h).toString();return e?"?"+e:""}function Du(h){let e={};for(let t in h)h[t]!=null&&(e[t]=h[t]);return new URLSearchParams(e)}function sr(h){let t=h.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),l=decodeURIComponent(atob(t).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(l)}var $i=(h,e)=>!h||!e?!1:h.contains(e)?!0:$i(h,e.getRootNode().host);var Yi="mux.com",Iu=()=>{try{return"0.1.0-beta.21"}catch{}return"UNKNOWN"},Mu=Iu(),Fr=()=>Mu,zi=(h,{token:e,domain:t=Yi}={})=>`https://stream.${t}/${h}.m3u8${Br(!!e?{token:e}:{redundant_streams:!0})}`,Ks=(h,{token:e,thumbnailTime:t,domain:l=Yi}={})=>{let n=e==null?t:void 0;return`https://image.${l}/${h}/thumbnail.jpg${Br({token:e,time:n})}`},Ws=(h,{token:e,domain:t=Yi}={})=>`https://image.${t}/${h}/storyboard.vtt${Br({token:e})}`,Ru={crossorigin:"crossOrigin",playsinline:"playsInline"};function Hs(h){var e;return(e=Ru[h])!=null?e:js(h)}var jr,Cu=(h="video")=>jr||(typeof window!="undefined"&&(jr=document.createElement(h)),jr),Gs=async(h=Cu())=>{if(!h)return!1;let e=h.volume;return h.volume=e/2+.1,new Promise((t,l)=>{setTimeout(()=>{t(h.volume!==e)},0)})};function Vs(h){var e,t;return Array.from((t=(e=h.media)==null?void 0:e.textTracks)!=null?t:[]).filter(({kind:l})=>l==="subtitles"||l==="captions")}var $s=h=>{var t,l;let{media:e}=h;return(l=(t=e==null?void 0:e._hls)==null?void 0:t.liveSyncPosition)!=null?l:(e==null?void 0:e.seekable.length)?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Xi=h=>{let e=$s(h);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}h.currentTime=e},Ou=1,Pu=5,Ys=3,zs=.5,Xs=h=>{var v;let{streamType:e}=h,t=$s(h),l=(v=h.media)==null?void 0:v.currentTime;if(t==null||l==null)return!1;let n=t-l;return e===ve.LL_LIVE||e===ve.LL_DVR?n<=Ou*(Ys+zs):e===ve.LIVE||e===ve.DVR?n<=Pu*(Ys+zs):!1};var Qs=`[mux-player ${Fr()}]`;function st(...h){console.warn(Qs,...h)}function Dt(...h){console.error(Qs,...h)}function Kr(h){var t;let e=(t=h.message)!=null?t:"";if(h.file){let l="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${pe("Read more: ")}
|
|
1261
|
+
`;var kr,wr,Ur,Hi,Nr,Gi,jt=class extends HTMLElement{constructor(){super();Le(this,Ur),Le(this,Nr),Le(this,kr,void 0),Le(this,wr,void 0),this.attachShadow({mode:"open"}),this.isConnected&&He(this,Ur,Hi).call(this)}static get observedAttributes(){let h=[],e=l=>l.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();Object.getOwnPropertyNames(this.prototype).forEach(l=>{let n=!1;try{typeof this.prototype[l]=="function"&&(n=!0)}catch{}!n&&l!==l.toUpperCase()&&h.push(l.toLowerCase(),e(l))});let t=Object.getPrototypeOf(this).observedAttributes;return t&&(h=h.concat(t)),h}attributeChangedCallback(h,e,t){!ae(this,kr)&&!this.isConnected&&(ze(this,kr,!0),He(this,Ur,Hi).call(this)),He(this,Nr,Gi).call(this,h,e,t)}connectedCallback(){}};kr=new WeakMap,wr=new WeakMap,Ur=new WeakSet,Hi=function(){if(ae(this,wr))return;ze(this,wr,!0),this.shadowRoot.append(Os.content.cloneNode(!0)),this.nativeEl=this.shadowRoot.querySelector("video"),Wi.forEach(e=>{this.nativeEl.addEventListener(e,t=>{this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail}))})});let h=this.shadowRoot.querySelector("slot");h.addEventListener("slotchange",()=>{h.assignedElements().forEach(e=>{!["track","source"].includes(e.localName)||this.nativeEl.append(e)})}),Array.prototype.forEach.call(this.attributes,e=>{He(this,Nr,Gi).call(this,e.name,null,e.value)}),this.nativeEl.defaultMuted&&(this.nativeEl.muted=!0)},Nr=new WeakSet,Gi=function(h,e,t){let l=Object.getOwnPropertyNames(Object.getPrototypeOf(this)),n=bu(l,h),v=Object.getPrototypeOf(this.constructor).toString().indexOf("function HTMLElement")===0;n&&!v?typeof this[n]=="boolean"?t===null?this[n]=!1:this[n]=!0:this[n]=t:t===null?this.nativeEl.removeAttribute(h):["id","class"].indexOf(h)===-1&&this.nativeEl.setAttribute(h,t)};var Ps=[],ks=document.createElement("video",{is:"castable-video"}),Tu=["webkitDisplayingFullscreen","webkitSupportsFullscreen"];for(let h=Object.getPrototypeOf(ks);h&&h!==HTMLElement.prototype;h=Object.getPrototypeOf(h))Object.getOwnPropertyNames(h).forEach(e=>{Tu.indexOf(e)===-1&&Ps.push(e)});Ps.forEach(h=>{if(!(h in jt.prototype))if(typeof ks[h]=="function")jt.prototype[h]=function(){return this.nativeEl[h].apply(this.nativeEl,arguments)};else{let e={get(){return this.nativeEl[h]}};h!==h.toUpperCase()&&(e.set=function(t){this.nativeEl[h]=t}),Object.defineProperty(jt.prototype,h,e)}});function bu(h,e){let t=null;return h.forEach(l=>{l.toLowerCase()==e.toLowerCase()&&(t=l)}),t}globalThis.customElements.get("custom-video")||(globalThis.customElements.define("custom-video",jt),globalThis.CustomVideoElement=jt);var ws=jt,ge={ENV_KEY:"env-key",DEBUG:"debug",PLAYBACK_ID:"playback-id",METADATA_URL:"metadata-url",PREFER_MSE:"prefer-mse",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_SOFTWARE_NAME:"player-software-name",METADATA_VIDEO_ID:"metadata-video-id",METADATA_VIDEO_TITLE:"metadata-video-title",METADATA_VIEWER_USER_ID:"metadata-viewer-user-id",BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",TYPE:"type",STREAM_TYPE:"stream-type",START_TIME:"start-time"},Au=Object.values(ge),Su=Eu(),_u="mux-video",Vi=class extends ws{constructor(){super();this.__metadata={},this.__playerInitTime=mn()}static get observedAttributes(){var h;return[...Au,...(h=ws.observedAttributes)!=null?h:[]]}get playerInitTime(){return this.__playerInitTime}get playerSoftwareName(){var h;return(h=this.__playerSoftwareName)!=null?h:_u}set playerSoftwareName(h){this.__playerSoftwareName=h}get playerSoftwareVersion(){var h;return(h=this.__playerSoftwareVersion)!=null?h:Su}set playerSoftwareVersion(h){this.__playerSoftwareVersion=h}get hls(){return console.warn("<mux-video>.hls is deprecated, please use ._hls instead"),this._hls}get _hls(){return this.__hls}get mux(){return this.nativeEl.mux}get error(){var h;return(h=En(this.nativeEl))!=null?h:null}get errorTranslator(){return this.__errorTranslator}set errorTranslator(h){this.__errorTranslator=h}get src(){return this.getAttribute("src")}set src(h){h!==this.src&&(h==null?this.removeAttribute("src"):this.setAttribute("src",h))}get type(){var h;return(h=this.getAttribute(ge.TYPE))!=null?h:void 0}set type(h){h!==this.type&&(h?this.setAttribute(ge.TYPE,h):this.removeAttribute(ge.TYPE))}get autoplay(){let h=this.getAttribute("autoplay");return h===null?!1:h===""?!0:h}set autoplay(h){let e=this.autoplay;h!==e&&(h?this.setAttribute("autoplay",typeof h=="string"?h:""):this.removeAttribute("autoplay"))}get debug(){return this.getAttribute(ge.DEBUG)!=null}set debug(h){h!==this.debug&&(h?this.setAttribute(ge.DEBUG,""):this.removeAttribute(ge.DEBUG))}get startTime(){let h=this.getAttribute(ge.START_TIME);if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}set startTime(h){h!==this.startTime&&(h==null?this.removeAttribute(ge.START_TIME):this.setAttribute(ge.START_TIME,`${h}`))}get playbackId(){var h;return(h=this.getAttribute(ge.PLAYBACK_ID))!=null?h:void 0}set playbackId(h){h!==this.playbackId&&(h?this.setAttribute(ge.PLAYBACK_ID,h):this.removeAttribute(ge.PLAYBACK_ID))}get customDomain(){var h;return(h=this.getAttribute(ge.CUSTOM_DOMAIN))!=null?h:void 0}set customDomain(h){h!==this.customDomain&&(h?this.setAttribute(ge.CUSTOM_DOMAIN,h):this.removeAttribute(ge.CUSTOM_DOMAIN))}get envKey(){var h;return(h=this.getAttribute(ge.ENV_KEY))!=null?h:void 0}set envKey(h){h!==this.envKey&&(h?this.setAttribute(ge.ENV_KEY,h):this.removeAttribute(ge.ENV_KEY))}get beaconCollectionDomain(){var h;return(h=this.getAttribute(ge.BEACON_COLLECTION_DOMAIN))!=null?h:void 0}set beaconCollectionDomain(h){h!==this.beaconCollectionDomain&&(h?this.setAttribute(ge.BEACON_COLLECTION_DOMAIN,h):this.removeAttribute(ge.BEACON_COLLECTION_DOMAIN))}get streamType(){var h;return(h=this.getAttribute(ge.STREAM_TYPE))!=null?h:void 0}set streamType(h){h!==this.streamType&&(h?this.setAttribute(ge.STREAM_TYPE,h):this.removeAttribute(ge.STREAM_TYPE))}get preferMse(){return this.getAttribute(ge.PREFER_MSE)!=null}set preferMse(h){h?this.setAttribute(ge.PREFER_MSE,""):this.removeAttribute(ge.PREFER_MSE)}get metadata(){let h=this.getAttribute(ge.METADATA_VIDEO_ID),e=this.getAttribute(ge.METADATA_VIDEO_TITLE),t=this.getAttribute(ge.METADATA_VIEWER_USER_ID);return{...this.__metadata,...h!=null?{video_id:h}:{},...e!=null?{video_title:e}:{},...t!=null?{viewer_user_id:t}:{}}}set metadata(h){this.__metadata=h!=null?h:{},this.mux&&this.mux.emit("hb",this.__metadata)}load(){let h=Tn(this,this.nativeEl,this.__hls);this.__hls=h;let e=fn(this.nativeEl,this.autoplay,h);this.__updateAutoplay=e}unload(){mi(this.nativeEl,this.__hls),this.__hls=void 0}attributeChangedCallback(h,e,t){var l;switch(h){case ge.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case ge.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":let n=!!e,v=!!t;!n&&v?this.load():n&&!v?this.unload():n&&v&&(this.unload(),this.load());break;case"autoplay":if(t===e)break;(l=this.__updateAutoplay)==null||l.call(this,this.autoplay);break;case ge.PLAYBACK_ID:this.src=gn(t!=null?t:void 0,{domain:this.customDomain});break;case ge.DEBUG:let R=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=R);break;case ge.METADATA_URL:t&&fetch(t).then(T=>T.json()).then(T=>this.metadata=T).catch(T=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;default:break}super.attributeChangedCallback(h,e,t)}disconnectedCallback(){this.unload()}};globalThis.customElements.get("mux-video")||(globalThis.customElements.define("mux-video",Vi),globalThis.MuxVideoElement=Vi);var Us=Vi;var xu="en",Lt={code:xu};var Ns="en";function pe(h,e=!0){var n,v;let t=e&&(v=(n=Lt)==null?void 0:n[h])!=null?v:h,l=e?Lt.code:Ns;return new Bs(t,l)}var Bs=class{constructor(e,t=(l=>(l=Lt.code)!=null?l:Ns)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,l)=>{var n;return(n=e[l])!=null?n:""})}toString(){return this.message}};function Fs(h){let e="";return Object.entries(h).forEach(([t,l])=>{l!=null&&(e+=`${Lu(t)}: ${l}; `)}),e?e.trim():void 0}function Lu(h){return h.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function js(h){return h.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ar(h){if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}function Br(h){let e=Du(h).toString();return e?"?"+e:""}function Du(h){let e={};for(let t in h)h[t]!=null&&(e[t]=h[t]);return new URLSearchParams(e)}function sr(h){let t=h.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),l=decodeURIComponent(atob(t).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(l)}var $i=(h,e)=>!h||!e?!1:h.contains(e)?!0:$i(h,e.getRootNode().host);var Yi="mux.com",Iu=()=>{try{return"0.1.0-beta.22"}catch{}return"UNKNOWN"},Mu=Iu(),Fr=()=>Mu,zi=(h,{token:e,domain:t=Yi}={})=>`https://stream.${t}/${h}.m3u8${Br(!!e?{token:e}:{redundant_streams:!0})}`,Ks=(h,{token:e,thumbnailTime:t,domain:l=Yi}={})=>{let n=e==null?t:void 0;return`https://image.${l}/${h}/thumbnail.jpg${Br({token:e,time:n})}`},Ws=(h,{token:e,domain:t=Yi}={})=>`https://image.${t}/${h}/storyboard.vtt${Br({token:e})}`,Ru={crossorigin:"crossOrigin",playsinline:"playsInline"};function Hs(h){var e;return(e=Ru[h])!=null?e:js(h)}var jr,Cu=(h="video")=>jr||(typeof window!="undefined"&&(jr=document.createElement(h)),jr),Gs=async(h=Cu())=>{if(!h)return!1;let e=h.volume;return h.volume=e/2+.1,new Promise((t,l)=>{setTimeout(()=>{t(h.volume!==e)},0)})};function Vs(h){var e,t;return Array.from((t=(e=h.media)==null?void 0:e.textTracks)!=null?t:[]).filter(({kind:l})=>l==="subtitles"||l==="captions")}var $s=h=>{var t,l;let{media:e}=h;return(l=(t=e==null?void 0:e._hls)==null?void 0:t.liveSyncPosition)!=null?l:(e==null?void 0:e.seekable.length)?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Xi=h=>{let e=$s(h);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}h.currentTime=e},Ou=1,Pu=5,Ys=3,zs=.5,Xs=h=>{var v;let{streamType:e}=h,t=$s(h),l=(v=h.media)==null?void 0:v.currentTime;if(t==null||l==null)return!1;let n=t-l;return e===ve.LL_LIVE||e===ve.LL_DVR?n<=Ou*(Ys+zs):e===ve.LIVE||e===ve.DVR?n<=Pu*(Ys+zs):!1};var Qs=`[mux-player ${Fr()}]`;function st(...h){console.warn(Qs,...h)}function Dt(...h){console.error(Qs,...h)}function Kr(h){var t;let e=(t=h.message)!=null?t:"";if(h.file){let l="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${pe("Read more: ")}
|
|
1262
1262
|
${l}${h.file}`}st(e)}var ke={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",SRC:"src",POSTER:"poster",PRELOAD:"preload"},Wr={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},ku=Wi.filter(h=>h!=="error"),wu=Object.values(ke),Uu=Object.values(Wr);function Js(h){h.querySelectorAll(":scope > track").forEach(e=>{var t;(t=h.media)==null||t.append(e.cloneNode())}),ku.forEach(e=>{var t;(t=h.media)==null||t.addEventListener(e,l=>{h.dispatchEvent(new Event(l.type))})})}var Zs=class extends HTMLElement{static get observedAttributes(){return[...wu,...Uu]}constructor(){super();this.querySelectorAll(":scope > track").forEach(l=>{var n;(n=this.media)==null||n.append(l.cloneNode())});let e=l=>{for(let n of l)n.type==="childList"&&(n.removedNodes.forEach(v=>{var T,L;let R=(T=this.media)==null?void 0:T.querySelector(`track[src="${v.src}"]`);R&&((L=this.media)==null||L.removeChild(R))}),n.addedNodes.forEach(v=>{var R;(R=this.media)==null||R.append(v.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,l){switch(e){case Wr.MUTED:{this.media&&(this.media.muted=l!=null);return}case Wr.VOLUME:{let n=+l;this.media&&!Number.isNaN(n)&&(this.media.volume=n);return}case Wr.PLAYBACKRATE:{let n=+l;this.media&&!Number.isNaN(n)&&(this.media.playbackRate=n);return}}}play(){var e;return(e=this.media)==null?void 0:e.play()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get video(){return st("<mux-player>.video is deprecated, please use .media instead"),this.media}get paused(){var e,t;return(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e;return(e=this.media)==null?void 0:e.buffered}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e;return(e=this.media)==null?void 0:e.videoWidth}get videoHeight(){var e;return(e=this.media)==null?void 0:e.videoHeight}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get src(){return gt(this,ke.SRC)}set src(e){this.setAttribute(ke.SRC,`${e}`)}get poster(){var e;return(e=gt(this,ke.POSTER))!=null?e:""}set poster(e){this.setAttribute(ke.POSTER,`${e}`)}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get crossOrigin(){return gt(this,ke.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(ke.CROSSORIGIN,`${e}`)}get autoplay(){return gt(this,ke.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(ke.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(ke.AUTOPLAY)}get loop(){return gt(this,ke.LOOP)!=null}set loop(e){e?this.setAttribute(ke.LOOP,""):this.removeAttribute(ke.LOOP)}get muted(){return gt(this,ke.MUTED)!=null}set muted(e){e?this.setAttribute(ke.MUTED,""):this.removeAttribute(ke.MUTED)}get playsInline(){return gt(this,ke.PLAYSINLINE)!=null}set playsInline(e){e?this.setAttribute(ke.PLAYSINLINE,""):this.removeAttribute(ke.PLAYSINLINE)}get preload(){return gt(this,ke.PRELOAD)}set preload(e){e?this.setAttribute(ke.PRELOAD,e):this.removeAttribute(ke.PRELOAD)}};function gt(h,e){return h.media?h.media.getAttribute(e):h.getAttribute(e)}var Qi=Zs;var qs=`
|
|
1263
1263
|
:host {
|
|
1264
1264
|
z-index: 100;
|
package/dist/mux-player.mjs
CHANGED
|
@@ -1240,7 +1240,7 @@ media-time-display {
|
|
|
1240
1240
|
${xt()}
|
|
1241
1241
|
<div class="mxp-padding-2"></div>
|
|
1242
1242
|
</media-control-bar>
|
|
1243
|
-
`;function Rs(h,e){return{audio:h.hasAttribute("audio"),streamType:h.getAttribute("stream-type"),playerSize:h.getAttribute("player-size"),defaultHiddenCaptions:h.hasAttribute("default-hidden-captions"),hasCaptions:h.hasAttribute("has-captions"),forwardSeekOffset:h.getAttribute("forward-seek-offset"),backwardSeekOffset:h.getAttribute("backward-seek-offset"),...e}}var Fi=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),ir(Ms(Rs(this)),this.shadowRoot)}attributeChangedCallback(){ir(Ms(Rs(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Fi);var Cs=Fi;var vu=Object.defineProperty,mu=(h,e,t)=>e in h?vu(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t,Pr=(h,e,t)=>(mu(h,typeof e!="symbol"?e+"":e,t),t),ji=(h,e,t)=>{if(!e.has(h))throw TypeError("Cannot "+t)},ae=(h,e,t)=>(ji(h,e,"read from private field"),t?t.call(h):e.get(h)),Le=(h,e,t)=>{if(e.has(h))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(h):e.set(h,t)},ze=(h,e,t,l)=>(ji(h,e,"write to private field"),l?l.call(h,t):e.set(h,t),t),He=(h,e,t)=>(ji(h,e,"access private method"),t),gu=()=>{try{return"0.8.0"}catch{}return"UNKNOWN"},pu=gu(),Eu=()=>pu,yu=h=>{var e,t,l,n,v,R,T,L,_,E,I,M,D,b,A,u,r,s,i,a,d,o,y,p,m,g,f,c,x,S,C,O,P,w,U,k,N,B,K,W;return e=class extends h{constructor(){super();Le(this,f),Le(this,x),Le(this,C),Le(this,P),Le(this,U),Le(this,N),Le(this,K),Pr(this,"castEnabled",!1),Le(this,d,{paused:!1}),Le(this,o,void 0),Le(this,y,{}),Le(this,p,void 0),Le(this,m,void 0),Le(this,g,void 0),e.instances.add(this),He(this,U,k).call(this)}static get castElement(){return ae(e,t)}static get castEnabled(){return ae(e,l)}static get castState(){var F;return(F=ae(e,_,E))==null?void 0:F.getCastState()}static async exitCast(){let F=!0;try{await ae(e,_,E).endCurrentSession(F)}catch(H){console.error(H);return}}get castPlayer(){if(e.castElement===this)return ae(this,o)}attributeChangedCallback(F){if(this.castPlayer)switch(F){case"cast-stream-type":case"cast-src":this.load();break}}async requestCast(F={}){var H;He(H=e,i,a).call(H,F),ze(e,t,this),Object.entries(ae(this,y)).forEach(([Y,$])=>{ae(this,o).controller.addEventListener(Y,$)});try{await ae(e,_,E).requestSession()}catch{ze(e,t,void 0);return}ae(this,d).paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(Y){console.error(Y)}}async load(){var F,H;if(!this.castPlayer)return super.load();let Y=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType),$=[...this.querySelectorAll("track")].filter(({kind:X,src:ie})=>ie&&(X==="subtitles"||X==="captions")),Z=[],q=0;$.length&&(Y.tracks=$.map(X=>{let ie=++q;Z.length===0&&X.track.mode==="showing"&&Z.push(ie);let fe=new chrome.cast.media.Track(ie,chrome.cast.media.TrackType.TEXT);return fe.trackContentId=X.src,fe.trackContentType="text/vtt",fe.subtype=X.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,fe.name=X.label,fe.language=X.srclang,fe})),this.castStreamType==="live"?Y.streamType=chrome.cast.media.StreamType.LIVE:Y.streamType=chrome.cast.media.StreamType.BUFFERED,Y.metadata=new chrome.cast.media.GenericMediaMetadata,Y.metadata.title=this.title,Y.metadata.images=[{url:this.poster}];let oe=new chrome.cast.media.LoadRequest(Y);oe.currentTime=(F=super.currentTime)!=null?F:0,oe.autoplay=!ae(this,d).paused,oe.activeTrackIds=Z,await((H=ae(e,I,M))==null?void 0:H.loadMedia(oe)),this.dispatchEvent(new Event("volumechange"))}play(){var F;if(this.castPlayer){this.castPlayer.isPaused&&((F=this.castPlayer.controller)==null||F.playOrPause());return}return super.play()}pause(){var F;if(this.castPlayer){this.castPlayer.isPaused||(F=this.castPlayer.controller)==null||F.playOrPause();return}super.pause()}get castSrc(){var F,H,Y;return(Y=(H=this.getAttribute("cast-src"))!=null?H:(F=this.querySelector("source"))==null?void 0:F.src)!=null?Y:this.currentSrc}set castSrc(F){this.castSrc!=F&&this.setAttribute("cast-src",`${F}`)}get castContentType(){var F;return(F=this.getAttribute("cast-content-type"))!=null?F:void 0}set castContentType(F){this.setAttribute("cast-content-type",`${F}`)}get castStreamType(){var F;return(F=this.getAttribute("cast-stream-type"))!=null?F:void 0}set castStreamType(F){this.setAttribute("cast-stream-type",`${F}`)}get readyState(){if(this.castPlayer)switch(this.castPlayer.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.castPlayer?this.castPlayer.isPaused:super.paused}get muted(){var F;return this.castPlayer?(F=this.castPlayer)==null?void 0:F.isMuted:super.muted}set muted(F){var H;if(this.castPlayer){(F&&!this.castPlayer.isMuted||!F&&this.castPlayer.isMuted)&&((H=this.castPlayer.controller)==null||H.muteOrUnmute());return}super.muted=F}get volume(){var F,H;return this.castPlayer?(H=(F=this.castPlayer)==null?void 0:F.volumeLevel)!=null?H:1:super.volume}set volume(F){var H;if(this.castPlayer){this.castPlayer.volumeLevel=F,(H=this.castPlayer.controller)==null||H.setVolumeLevel();return}super.volume=F}get duration(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.duration)!=null?H:NaN:super.duration}get currentTime(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.currentTime)!=null?H:0:super.currentTime}set currentTime(F){var H;if(this.castPlayer){this.castPlayer.currentTime=F,(H=this.castPlayer.controller)==null||H.seek();return}super.currentTime=F}get onentercast(){return ae(this,p)}set onentercast(F){ae(this,p)&&(this.removeEventListener("entercast",ae(this,p)),ze(this,p,null)),typeof F=="function"&&(ze(this,p,F),this.addEventListener("entercast",F))}get onleavecast(){return ae(this,m)}set onleavecast(F){ae(this,m)&&(this.removeEventListener("leavecast",ae(this,m)),ze(this,m,null)),typeof F=="function"&&(ze(this,m,F),this.addEventListener("leavecast",F))}get oncastchange(){return ae(this,g)}set oncastchange(F){ae(this,g)&&(this.removeEventListener("castchange",ae(this,g)),ze(this,g,null)),typeof F=="function"&&(ze(this,g,F),this.addEventListener("castchange",F))}},t=new WeakMap,l=new WeakMap,n=new WeakMap,v=new WeakSet,R=function(){return typeof chrome!="undefined"&&chrome.cast&&chrome.cast.isAvailable},T=new WeakSet,L=function(){return typeof cast!="undefined"&&cast.framework},_=new WeakSet,E=function(){if(ae(e,T,L))return cast.framework.CastContext.getInstance()},I=new WeakSet,M=function(){var F;return(F=ae(e,_,E))==null?void 0:F.getCurrentSession()},D=new WeakSet,b=function(){var F;return(F=ae(e,I,M))==null?void 0:F.getSessionObj().media[0]},A=new WeakSet,u=function(F){return new Promise((H,Y)=>{ae(e,D,b).editTracksInfo(F,H,Y)})},r=new WeakSet,s=function(F){return new Promise((H,Y)=>{ae(e,D,b).getStatus(F,H,Y)})},i=new WeakSet,a=function(F){return ae(e,_,E).setOptions({receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0,...F})},d=new WeakMap,o=new WeakMap,y=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,f=new WeakSet,c=function(){var F;return(F=this.castPlayer)==null?void 0:F.isMediaLoaded},x=new WeakSet,S=function(){ae(e,t)===this&&(Object.entries(ae(this,y)).forEach(([F,H])=>{ae(this,o).controller.removeEventListener(F,H)}),ze(e,t,void 0),this.muted=ae(this,o).isMuted,this.currentTime=ae(this,o).savedPlayerState.currentTime,ae(this,o).savedPlayerState.isPaused===!1&&this.play())},C=new WeakSet,O=function(){this.dispatchEvent(new CustomEvent("castchange",{detail:ae(e,_,E).getCastState()}))},P=new WeakSet,w=async function(){var F,H;let{SESSION_RESUMED:Y}=cast.framework.SessionState;if(ae(e,_,E).getSessionState()===Y&&this.castSrc===((F=ae(e,D,b))==null?void 0:F.media.contentId)){ze(e,t,this),Object.entries(ae(this,y)).forEach(([$,Z])=>{ae(this,o).controller.addEventListener($,Z)});try{await He(H=e,r,s).call(H,new chrome.cast.media.GetStatusRequest)}catch($){console.error($)}ae(this,y)[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED](),ae(this,y)[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},U=new WeakSet,k=function(){var F;!ae(e,T,L)||this.castEnabled||(this.castEnabled=!0,He(F=e,i,a).call(F),this.textTracks.addEventListener("change",He(this,K,W).bind(this)),He(this,C,O).call(this),ze(this,o,new cast.framework.RemotePlayer),new cast.framework.RemotePlayerController(ae(this,o)),ze(this,y,{[cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:H})=>{H===!1&&He(this,x,S).call(this),this.dispatchEvent(new Event(H?"entercast":"leavecast"))},[cast.framework.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.dispatchEvent(new Event("durationchange"))},[cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{!ae(this,f,c)||this.dispatchEvent(new Event("timeupdate"))},[cast.framework.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.dispatchEvent(new Event("resize"))},[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.dispatchEvent(new Event(this.paused?"pause":"play"))},[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var H,Y;((H=this.castPlayer)==null?void 0:H.playerState)!==chrome.cast.media.PlayerState.PAUSED&&this.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(Y=this.castPlayer)==null?void 0:Y.playerState]))},[cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{!ae(this,f,c)||(await Promise.resolve(),He(this,N,B).call(this))}}))},N=new WeakSet,B=function(){He(this,K,W).call(this)},K=new WeakSet,W=async function(){var F,H,Y,$,Z,q;if(!this.castPlayer)return;let oe=((H=(F=ae(this,o).mediaInfo)==null?void 0:F.tracks)!=null?H:[]).filter(({type:Q})=>Q===chrome.cast.media.TrackType.TEXT),X=[...this.textTracks].filter(({kind:Q})=>Q==="subtitles"||Q==="captions"),ie=oe.map(({language:Q,name:te,trackId:ee})=>{var he;let{mode:_e}=(he=X.find(Ee=>Ee.language===Q&&Ee.label===te))!=null?he:{};return _e?{mode:_e,trackId:ee}:!1}).filter(Boolean),fe=ie.filter(({mode:Q})=>Q!=="showing").map(({trackId:Q})=>Q),ue=ie.find(({mode:Q})=>Q==="showing"),Se=(Z=($=(Y=ae(e,I,M))==null?void 0:Y.getSessionObj().media[0])==null?void 0:$.activeTrackIds)!=null?Z:[],re=Se;if(Se.length&&(re=re.filter(Q=>!fe.includes(Q))),(ue==null?void 0:ue.trackId)&&(re=[...re,ue.trackId]),re=[...new Set(re)],!((Q,te)=>Q.length===te.length&&Q.every(ee=>te.includes(ee)))(Se,re))try{let Q=new chrome.cast.media.EditTracksInfoRequest(re);await He(q=e,A,u).call(q,Q)}catch(Q){console.error(Q)}},Le(e,v),Le(e,T),Le(e,_),Le(e,I),Le(e,D),Le(e,A),Le(e,r),Le(e,i),Pr(e,"observedAttributes",["cast-src","cast-content-type","cast-stream-type"]),Pr(e,"instances",new Set),Le(e,t,void 0),Le(e,l,!1),Pr(e,"initCast",()=>{var F;ae(e,v,R)?ae(e,T,L)?ae(F=e,n).call(F,chrome.cast.isAvailable):customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)}):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)})}}),Le(e,n,F=>{if(F){ze(e,l,!0);let{CAST_STATE_CHANGED:H}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(H,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,C,O).call(q,$)})});let{SESSION_STATE_CHANGED:Y}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(Y,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,P,w).call(q,$)})}),e.instances.forEach($=>{var Z;return He(Z=$,U,k).call(Z)})}}),e},Ki=yu(HTMLVideoElement);customElements.get("castable-video")||(customElements.define("castable-video",Ki,{extends:"video"}),globalThis.CastableVideoElement=Ki);Ki.initCast();var Wi=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","castchange","entercast","leavecast"],Os=document.createElement("template");Os.innerHTML=`
|
|
1243
|
+
`;function Rs(h,e){return{audio:h.hasAttribute("audio"),streamType:h.getAttribute("stream-type"),playerSize:h.getAttribute("player-size"),defaultHiddenCaptions:h.hasAttribute("default-hidden-captions"),hasCaptions:h.hasAttribute("has-captions"),forwardSeekOffset:h.getAttribute("forward-seek-offset"),backwardSeekOffset:h.getAttribute("backward-seek-offset"),...e}}var Fi=class extends HTMLElement{static get observedAttributes(){return["audio","stream-type","player-size","default-hidden-captions","has-captions","forward-seek-offset","backward-seek-offset"]}constructor(){super();this.attachShadow({mode:"open"}),ir(Ms(Rs(this)),this.shadowRoot)}attributeChangedCallback(){ir(Ms(Rs(this)),this.shadowRoot)}};customElements.get("media-theme-mux")||customElements.define("media-theme-mux",Fi);var Cs=Fi;var vu=Object.defineProperty,mu=(h,e,t)=>e in h?vu(h,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):h[e]=t,Pr=(h,e,t)=>(mu(h,typeof e!="symbol"?e+"":e,t),t),ji=(h,e,t)=>{if(!e.has(h))throw TypeError("Cannot "+t)},ae=(h,e,t)=>(ji(h,e,"read from private field"),t?t.call(h):e.get(h)),Le=(h,e,t)=>{if(e.has(h))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(h):e.set(h,t)},ze=(h,e,t,l)=>(ji(h,e,"write to private field"),l?l.call(h,t):e.set(h,t),t),He=(h,e,t)=>(ji(h,e,"access private method"),t),gu=()=>{try{return"0.8.1"}catch{}return"UNKNOWN"},pu=gu(),Eu=()=>pu,yu=h=>{var e,t,l,n,v,R,T,L,_,E,I,M,D,b,A,u,r,s,i,a,d,o,y,p,m,g,f,c,x,S,C,O,P,w,U,k,N,B,K,W;return e=class extends h{constructor(){super();Le(this,f),Le(this,x),Le(this,C),Le(this,P),Le(this,U),Le(this,N),Le(this,K),Pr(this,"castEnabled",!1),Le(this,d,{paused:!1}),Le(this,o,void 0),Le(this,y,{}),Le(this,p,void 0),Le(this,m,void 0),Le(this,g,void 0),e.instances.add(this),He(this,U,k).call(this)}static get castElement(){return ae(e,t)}static get castEnabled(){return ae(e,l)}static get castState(){var F;return(F=ae(e,_,E))==null?void 0:F.getCastState()}static async exitCast(){let F=!0;try{await ae(e,_,E).endCurrentSession(F)}catch(H){console.error(H);return}}get castPlayer(){if(e.castElement===this)return ae(this,o)}attributeChangedCallback(F){if(this.castPlayer)switch(F){case"cast-stream-type":case"cast-src":this.load();break}}async requestCast(F={}){var H;He(H=e,i,a).call(H,F),ze(e,t,this),Object.entries(ae(this,y)).forEach(([Y,$])=>{ae(this,o).controller.addEventListener(Y,$)});try{await ae(e,_,E).requestSession()}catch{ze(e,t,void 0);return}ae(this,d).paused=super.paused,super.pause(),this.muted=super.muted;try{await this.load()}catch(Y){console.error(Y)}}async load(){var F,H;if(!this.castPlayer)return super.load();let Y=new chrome.cast.media.MediaInfo(this.castSrc,this.castContentType),$=[...this.querySelectorAll("track")].filter(({kind:X,src:ie})=>ie&&(X==="subtitles"||X==="captions")),Z=[],q=0;$.length&&(Y.tracks=$.map(X=>{let ie=++q;Z.length===0&&X.track.mode==="showing"&&Z.push(ie);let fe=new chrome.cast.media.Track(ie,chrome.cast.media.TrackType.TEXT);return fe.trackContentId=X.src,fe.trackContentType="text/vtt",fe.subtype=X.kind==="captions"?chrome.cast.media.TextTrackType.CAPTIONS:chrome.cast.media.TextTrackType.SUBTITLES,fe.name=X.label,fe.language=X.srclang,fe})),this.castStreamType==="live"?Y.streamType=chrome.cast.media.StreamType.LIVE:Y.streamType=chrome.cast.media.StreamType.BUFFERED,Y.metadata=new chrome.cast.media.GenericMediaMetadata,Y.metadata.title=this.title,Y.metadata.images=[{url:this.poster}];let oe=new chrome.cast.media.LoadRequest(Y);oe.currentTime=(F=super.currentTime)!=null?F:0,oe.autoplay=!ae(this,d).paused,oe.activeTrackIds=Z,await((H=ae(e,I,M))==null?void 0:H.loadMedia(oe)),this.dispatchEvent(new Event("volumechange"))}play(){var F;if(this.castPlayer){this.castPlayer.isPaused&&((F=this.castPlayer.controller)==null||F.playOrPause());return}return super.play()}pause(){var F;if(this.castPlayer){this.castPlayer.isPaused||(F=this.castPlayer.controller)==null||F.playOrPause();return}super.pause()}get castSrc(){var F,H,Y;return(Y=(H=this.getAttribute("cast-src"))!=null?H:(F=this.querySelector("source"))==null?void 0:F.src)!=null?Y:this.currentSrc}set castSrc(F){this.castSrc!=F&&this.setAttribute("cast-src",`${F}`)}get castContentType(){var F;return(F=this.getAttribute("cast-content-type"))!=null?F:void 0}set castContentType(F){this.setAttribute("cast-content-type",`${F}`)}get castStreamType(){var F;return(F=this.getAttribute("cast-stream-type"))!=null?F:void 0}set castStreamType(F){this.setAttribute("cast-stream-type",`${F}`)}get readyState(){if(this.castPlayer)switch(this.castPlayer.playerState){case chrome.cast.media.PlayerState.IDLE:return 0;case chrome.cast.media.PlayerState.BUFFERING:return 2;default:return 3}return super.readyState}get paused(){return this.castPlayer?this.castPlayer.isPaused:super.paused}get muted(){var F;return this.castPlayer?(F=this.castPlayer)==null?void 0:F.isMuted:super.muted}set muted(F){var H;if(this.castPlayer){(F&&!this.castPlayer.isMuted||!F&&this.castPlayer.isMuted)&&((H=this.castPlayer.controller)==null||H.muteOrUnmute());return}super.muted=F}get volume(){var F,H;return this.castPlayer?(H=(F=this.castPlayer)==null?void 0:F.volumeLevel)!=null?H:1:super.volume}set volume(F){var H;if(this.castPlayer){this.castPlayer.volumeLevel=F,(H=this.castPlayer.controller)==null||H.setVolumeLevel();return}super.volume=F}get duration(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.duration)!=null?H:NaN:super.duration}get currentTime(){var F,H;return this.castPlayer&&ae(this,f,c)?(H=(F=this.castPlayer)==null?void 0:F.currentTime)!=null?H:0:super.currentTime}set currentTime(F){var H;if(this.castPlayer){this.castPlayer.currentTime=F,(H=this.castPlayer.controller)==null||H.seek();return}super.currentTime=F}get onentercast(){return ae(this,p)}set onentercast(F){ae(this,p)&&(this.removeEventListener("entercast",ae(this,p)),ze(this,p,null)),typeof F=="function"&&(ze(this,p,F),this.addEventListener("entercast",F))}get onleavecast(){return ae(this,m)}set onleavecast(F){ae(this,m)&&(this.removeEventListener("leavecast",ae(this,m)),ze(this,m,null)),typeof F=="function"&&(ze(this,m,F),this.addEventListener("leavecast",F))}get oncastchange(){return ae(this,g)}set oncastchange(F){ae(this,g)&&(this.removeEventListener("castchange",ae(this,g)),ze(this,g,null)),typeof F=="function"&&(ze(this,g,F),this.addEventListener("castchange",F))}},t=new WeakMap,l=new WeakMap,n=new WeakMap,v=new WeakSet,R=function(){return typeof chrome!="undefined"&&chrome.cast&&chrome.cast.isAvailable},T=new WeakSet,L=function(){return typeof cast!="undefined"&&cast.framework},_=new WeakSet,E=function(){if(ae(e,T,L))return cast.framework.CastContext.getInstance()},I=new WeakSet,M=function(){var F;return(F=ae(e,_,E))==null?void 0:F.getCurrentSession()},D=new WeakSet,b=function(){var F;return(F=ae(e,I,M))==null?void 0:F.getSessionObj().media[0]},A=new WeakSet,u=function(F){return new Promise((H,Y)=>{ae(e,D,b).editTracksInfo(F,H,Y)})},r=new WeakSet,s=function(F){return new Promise((H,Y)=>{ae(e,D,b).getStatus(F,H,Y)})},i=new WeakSet,a=function(F){return ae(e,_,E).setOptions({receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,androidReceiverCompatible:!1,language:"en-US",resumeSavedSession:!0,...F})},d=new WeakMap,o=new WeakMap,y=new WeakMap,p=new WeakMap,m=new WeakMap,g=new WeakMap,f=new WeakSet,c=function(){var F;return(F=this.castPlayer)==null?void 0:F.isMediaLoaded},x=new WeakSet,S=function(){ae(e,t)===this&&(Object.entries(ae(this,y)).forEach(([F,H])=>{ae(this,o).controller.removeEventListener(F,H)}),ze(e,t,void 0),this.muted=ae(this,o).isMuted,this.currentTime=ae(this,o).savedPlayerState.currentTime,ae(this,o).savedPlayerState.isPaused===!1&&this.play())},C=new WeakSet,O=function(){this.dispatchEvent(new CustomEvent("castchange",{detail:ae(e,_,E).getCastState()}))},P=new WeakSet,w=async function(){var F,H;let{SESSION_RESUMED:Y}=cast.framework.SessionState;if(ae(e,_,E).getSessionState()===Y&&this.castSrc===((F=ae(e,D,b))==null?void 0:F.media.contentId)){ze(e,t,this),Object.entries(ae(this,y)).forEach(([$,Z])=>{ae(this,o).controller.addEventListener($,Z)});try{await He(H=e,r,s).call(H,new chrome.cast.media.GetStatusRequest)}catch($){console.error($)}ae(this,y)[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED](),ae(this,y)[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]()}},U=new WeakSet,k=function(){var F;!ae(e,T,L)||this.castEnabled||(this.castEnabled=!0,He(F=e,i,a).call(F),this.textTracks.addEventListener("change",He(this,K,W).bind(this)),He(this,C,O).call(this),ze(this,o,new cast.framework.RemotePlayer),new cast.framework.RemotePlayerController(ae(this,o)),ze(this,y,{[cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED]:({value:H})=>{H===!1&&He(this,x,S).call(this),this.dispatchEvent(new Event(H?"entercast":"leavecast"))},[cast.framework.RemotePlayerEventType.DURATION_CHANGED]:()=>{this.dispatchEvent(new Event("durationchange"))},[cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED]:()=>{this.dispatchEvent(new Event("volumechange"))},[cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED]:()=>{!ae(this,f,c)||this.dispatchEvent(new Event("timeupdate"))},[cast.framework.RemotePlayerEventType.VIDEO_INFO_CHANGED]:()=>{this.dispatchEvent(new Event("resize"))},[cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED]:()=>{this.dispatchEvent(new Event(this.paused?"pause":"play"))},[cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED]:()=>{var H,Y;((H=this.castPlayer)==null?void 0:H.playerState)!==chrome.cast.media.PlayerState.PAUSED&&this.dispatchEvent(new Event({[chrome.cast.media.PlayerState.PLAYING]:"playing",[chrome.cast.media.PlayerState.BUFFERING]:"waiting",[chrome.cast.media.PlayerState.IDLE]:"emptied"}[(Y=this.castPlayer)==null?void 0:Y.playerState]))},[cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED]:async()=>{!ae(this,f,c)||(await Promise.resolve(),He(this,N,B).call(this))}}))},N=new WeakSet,B=function(){He(this,K,W).call(this)},K=new WeakSet,W=async function(){var F,H,Y,$,Z,q;if(!this.castPlayer)return;let oe=((H=(F=ae(this,o).mediaInfo)==null?void 0:F.tracks)!=null?H:[]).filter(({type:Q})=>Q===chrome.cast.media.TrackType.TEXT),X=[...this.textTracks].filter(({kind:Q})=>Q==="subtitles"||Q==="captions"),ie=oe.map(({language:Q,name:te,trackId:ee})=>{var he;let{mode:_e}=(he=X.find(Ee=>Ee.language===Q&&Ee.label===te))!=null?he:{};return _e?{mode:_e,trackId:ee}:!1}).filter(Boolean),fe=ie.filter(({mode:Q})=>Q!=="showing").map(({trackId:Q})=>Q),ue=ie.find(({mode:Q})=>Q==="showing"),Se=(Z=($=(Y=ae(e,I,M))==null?void 0:Y.getSessionObj().media[0])==null?void 0:$.activeTrackIds)!=null?Z:[],re=Se;if(Se.length&&(re=re.filter(Q=>!fe.includes(Q))),(ue==null?void 0:ue.trackId)&&(re=[...re,ue.trackId]),re=[...new Set(re)],!((Q,te)=>Q.length===te.length&&Q.every(ee=>te.includes(ee)))(Se,re))try{let Q=new chrome.cast.media.EditTracksInfoRequest(re);await He(q=e,A,u).call(q,Q)}catch(Q){console.error(Q)}},Le(e,v),Le(e,T),Le(e,_),Le(e,I),Le(e,D),Le(e,A),Le(e,r),Le(e,i),Pr(e,"observedAttributes",["cast-src","cast-content-type","cast-stream-type"]),Pr(e,"instances",new Set),Le(e,t,void 0),Le(e,l,!1),Pr(e,"initCast",()=>{var F;ae(e,v,R)?ae(e,T,L)?ae(F=e,n).call(F,chrome.cast.isAvailable):customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)}):globalThis.__onGCastApiAvailable=()=>{customElements.whenDefined("google-cast-button").then(()=>{var H;return ae(H=e,n).call(H,chrome.cast.isAvailable)})}}),Le(e,n,F=>{if(F){ze(e,l,!0);let{CAST_STATE_CHANGED:H}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(H,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,C,O).call(q,$)})});let{SESSION_STATE_CHANGED:Y}=cast.framework.CastContextEventType;ae(e,_,E).addEventListener(Y,$=>{e.instances.forEach(Z=>{var q;return He(q=Z,P,w).call(q,$)})}),e.instances.forEach($=>{var Z;return He(Z=$,U,k).call(Z)})}}),e},Ki=yu(HTMLVideoElement);customElements.get("castable-video")||(customElements.define("castable-video",Ki,{extends:"video"}),globalThis.CastableVideoElement=Ki);Ki.initCast();var Wi=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting","waitingforkey","resize","enterpictureinpicture","leavepictureinpicture","castchange","entercast","leavecast"],Os=document.createElement("template");Os.innerHTML=`
|
|
1244
1244
|
<style>
|
|
1245
1245
|
:host {
|
|
1246
1246
|
display: inline-block;
|
|
@@ -1258,7 +1258,7 @@ media-time-display {
|
|
|
1258
1258
|
</style>
|
|
1259
1259
|
<video is="castable-video" part="video" crossorigin></video>
|
|
1260
1260
|
<slot></slot>
|
|
1261
|
-
`;var kr,wr,Ur,Hi,Nr,Gi,jt=class extends HTMLElement{constructor(){super();Le(this,Ur),Le(this,Nr),Le(this,kr,void 0),Le(this,wr,void 0),this.attachShadow({mode:"open"}),this.isConnected&&He(this,Ur,Hi).call(this)}static get observedAttributes(){let h=[],e=l=>l.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();Object.getOwnPropertyNames(this.prototype).forEach(l=>{let n=!1;try{typeof this.prototype[l]=="function"&&(n=!0)}catch{}!n&&l!==l.toUpperCase()&&h.push(l.toLowerCase(),e(l))});let t=Object.getPrototypeOf(this).observedAttributes;return t&&(h=h.concat(t)),h}attributeChangedCallback(h,e,t){!ae(this,kr)&&!this.isConnected&&(ze(this,kr,!0),He(this,Ur,Hi).call(this)),He(this,Nr,Gi).call(this,h,e,t)}connectedCallback(){}};kr=new WeakMap,wr=new WeakMap,Ur=new WeakSet,Hi=function(){if(ae(this,wr))return;ze(this,wr,!0),this.shadowRoot.append(Os.content.cloneNode(!0)),this.nativeEl=this.shadowRoot.querySelector("video"),Wi.forEach(e=>{this.nativeEl.addEventListener(e,t=>{this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail}))})});let h=this.shadowRoot.querySelector("slot");h.addEventListener("slotchange",()=>{h.assignedElements().forEach(e=>{!["track","source"].includes(e.localName)||this.nativeEl.append(e)})}),Array.prototype.forEach.call(this.attributes,e=>{He(this,Nr,Gi).call(this,e.name,null,e.value)}),this.nativeEl.defaultMuted&&(this.nativeEl.muted=!0)},Nr=new WeakSet,Gi=function(h,e,t){let l=Object.getOwnPropertyNames(Object.getPrototypeOf(this)),n=bu(l,h),v=Object.getPrototypeOf(this.constructor).toString().indexOf("function HTMLElement")===0;n&&!v?typeof this[n]=="boolean"?t===null?this[n]=!1:this[n]=!0:this[n]=t:t===null?this.nativeEl.removeAttribute(h):["id","class"].indexOf(h)===-1&&this.nativeEl.setAttribute(h,t)};var Ps=[],ks=document.createElement("video",{is:"castable-video"}),Tu=["webkitDisplayingFullscreen","webkitSupportsFullscreen"];for(let h=Object.getPrototypeOf(ks);h&&h!==HTMLElement.prototype;h=Object.getPrototypeOf(h))Object.getOwnPropertyNames(h).forEach(e=>{Tu.indexOf(e)===-1&&Ps.push(e)});Ps.forEach(h=>{if(!(h in jt.prototype))if(typeof ks[h]=="function")jt.prototype[h]=function(){return this.nativeEl[h].apply(this.nativeEl,arguments)};else{let e={get(){return this.nativeEl[h]}};h!==h.toUpperCase()&&(e.set=function(t){this.nativeEl[h]=t}),Object.defineProperty(jt.prototype,h,e)}});function bu(h,e){let t=null;return h.forEach(l=>{l.toLowerCase()==e.toLowerCase()&&(t=l)}),t}globalThis.customElements.get("custom-video")||(globalThis.customElements.define("custom-video",jt),globalThis.CustomVideoElement=jt);var ws=jt,ge={ENV_KEY:"env-key",DEBUG:"debug",PLAYBACK_ID:"playback-id",METADATA_URL:"metadata-url",PREFER_MSE:"prefer-mse",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_SOFTWARE_NAME:"player-software-name",METADATA_VIDEO_ID:"metadata-video-id",METADATA_VIDEO_TITLE:"metadata-video-title",METADATA_VIEWER_USER_ID:"metadata-viewer-user-id",BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",TYPE:"type",STREAM_TYPE:"stream-type",START_TIME:"start-time"},Au=Object.values(ge),Su=Eu(),_u="mux-video",Vi=class extends ws{constructor(){super();this.__metadata={},this.__playerInitTime=mn()}static get observedAttributes(){var h;return[...Au,...(h=ws.observedAttributes)!=null?h:[]]}get playerInitTime(){return this.__playerInitTime}get playerSoftwareName(){var h;return(h=this.__playerSoftwareName)!=null?h:_u}set playerSoftwareName(h){this.__playerSoftwareName=h}get playerSoftwareVersion(){var h;return(h=this.__playerSoftwareVersion)!=null?h:Su}set playerSoftwareVersion(h){this.__playerSoftwareVersion=h}get hls(){return console.warn("<mux-video>.hls is deprecated, please use ._hls instead"),this._hls}get _hls(){return this.__hls}get mux(){return this.nativeEl.mux}get error(){var h;return(h=En(this.nativeEl))!=null?h:null}get errorTranslator(){return this.__errorTranslator}set errorTranslator(h){this.__errorTranslator=h}get src(){return this.getAttribute("src")}set src(h){h!==this.src&&(h==null?this.removeAttribute("src"):this.setAttribute("src",h))}get type(){var h;return(h=this.getAttribute(ge.TYPE))!=null?h:void 0}set type(h){h!==this.type&&(h?this.setAttribute(ge.TYPE,h):this.removeAttribute(ge.TYPE))}get autoplay(){let h=this.getAttribute("autoplay");return h===null?!1:h===""?!0:h}set autoplay(h){let e=this.autoplay;h!==e&&(h?this.setAttribute("autoplay",typeof h=="string"?h:""):this.removeAttribute("autoplay"))}get debug(){return this.getAttribute(ge.DEBUG)!=null}set debug(h){h!==this.debug&&(h?this.setAttribute(ge.DEBUG,""):this.removeAttribute(ge.DEBUG))}get startTime(){let h=this.getAttribute(ge.START_TIME);if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}set startTime(h){h!==this.startTime&&(h==null?this.removeAttribute(ge.START_TIME):this.setAttribute(ge.START_TIME,`${h}`))}get playbackId(){var h;return(h=this.getAttribute(ge.PLAYBACK_ID))!=null?h:void 0}set playbackId(h){h!==this.playbackId&&(h?this.setAttribute(ge.PLAYBACK_ID,h):this.removeAttribute(ge.PLAYBACK_ID))}get customDomain(){var h;return(h=this.getAttribute(ge.CUSTOM_DOMAIN))!=null?h:void 0}set customDomain(h){h!==this.customDomain&&(h?this.setAttribute(ge.CUSTOM_DOMAIN,h):this.removeAttribute(ge.CUSTOM_DOMAIN))}get envKey(){var h;return(h=this.getAttribute(ge.ENV_KEY))!=null?h:void 0}set envKey(h){h!==this.envKey&&(h?this.setAttribute(ge.ENV_KEY,h):this.removeAttribute(ge.ENV_KEY))}get beaconCollectionDomain(){var h;return(h=this.getAttribute(ge.BEACON_COLLECTION_DOMAIN))!=null?h:void 0}set beaconCollectionDomain(h){h!==this.beaconCollectionDomain&&(h?this.setAttribute(ge.BEACON_COLLECTION_DOMAIN,h):this.removeAttribute(ge.BEACON_COLLECTION_DOMAIN))}get streamType(){var h;return(h=this.getAttribute(ge.STREAM_TYPE))!=null?h:void 0}set streamType(h){h!==this.streamType&&(h?this.setAttribute(ge.STREAM_TYPE,h):this.removeAttribute(ge.STREAM_TYPE))}get preferMse(){return this.getAttribute(ge.PREFER_MSE)!=null}set preferMse(h){h?this.setAttribute(ge.PREFER_MSE,""):this.removeAttribute(ge.PREFER_MSE)}get metadata(){let h=this.getAttribute(ge.METADATA_VIDEO_ID),e=this.getAttribute(ge.METADATA_VIDEO_TITLE),t=this.getAttribute(ge.METADATA_VIEWER_USER_ID);return{...this.__metadata,...h!=null?{video_id:h}:{},...e!=null?{video_title:e}:{},...t!=null?{viewer_user_id:t}:{}}}set metadata(h){this.__metadata=h!=null?h:{},this.mux&&this.mux.emit("hb",this.__metadata)}load(){let h=Tn(this,this.nativeEl,this.__hls);this.__hls=h;let e=fn(this.nativeEl,this.autoplay,h);this.__updateAutoplay=e}unload(){mi(this.nativeEl,this.__hls),this.__hls=void 0}attributeChangedCallback(h,e,t){var l;switch(h){case ge.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case ge.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":let n=!!e,v=!!t;!n&&v?this.load():n&&!v?this.unload():n&&v&&(this.unload(),this.load());break;case"autoplay":if(t===e)break;(l=this.__updateAutoplay)==null||l.call(this,this.autoplay);break;case ge.PLAYBACK_ID:this.src=gn(t!=null?t:void 0,{domain:this.customDomain});break;case ge.DEBUG:let R=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=R);break;case ge.METADATA_URL:t&&fetch(t).then(T=>T.json()).then(T=>this.metadata=T).catch(T=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;default:break}super.attributeChangedCallback(h,e,t)}disconnectedCallback(){this.unload()}};globalThis.customElements.get("mux-video")||(globalThis.customElements.define("mux-video",Vi),globalThis.MuxVideoElement=Vi);var Us=Vi;var xu="en",Lt={code:xu};var Ns="en";function pe(h,e=!0){var n,v;let t=e&&(v=(n=Lt)==null?void 0:n[h])!=null?v:h,l=e?Lt.code:Ns;return new Bs(t,l)}var Bs=class{constructor(e,t=(l=>(l=Lt.code)!=null?l:Ns)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,l)=>{var n;return(n=e[l])!=null?n:""})}toString(){return this.message}};function Fs(h){let e="";return Object.entries(h).forEach(([t,l])=>{l!=null&&(e+=`${Lu(t)}: ${l}; `)}),e?e.trim():void 0}function Lu(h){return h.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function js(h){return h.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ar(h){if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}function Br(h){let e=Du(h).toString();return e?"?"+e:""}function Du(h){let e={};for(let t in h)h[t]!=null&&(e[t]=h[t]);return new URLSearchParams(e)}function sr(h){let t=h.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),l=decodeURIComponent(atob(t).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(l)}var $i=(h,e)=>!h||!e?!1:h.contains(e)?!0:$i(h,e.getRootNode().host);var Yi="mux.com",Iu=()=>{try{return"0.1.0-beta.21"}catch{}return"UNKNOWN"},Mu=Iu(),Fr=()=>Mu,zi=(h,{token:e,domain:t=Yi}={})=>`https://stream.${t}/${h}.m3u8${Br(!!e?{token:e}:{redundant_streams:!0})}`,Ks=(h,{token:e,thumbnailTime:t,domain:l=Yi}={})=>{let n=e==null?t:void 0;return`https://image.${l}/${h}/thumbnail.jpg${Br({token:e,time:n})}`},Ws=(h,{token:e,domain:t=Yi}={})=>`https://image.${t}/${h}/storyboard.vtt${Br({token:e})}`,Ru={crossorigin:"crossOrigin",playsinline:"playsInline"};function Hs(h){var e;return(e=Ru[h])!=null?e:js(h)}var jr,Cu=(h="video")=>jr||(typeof window!="undefined"&&(jr=document.createElement(h)),jr),Gs=async(h=Cu())=>{if(!h)return!1;let e=h.volume;return h.volume=e/2+.1,new Promise((t,l)=>{setTimeout(()=>{t(h.volume!==e)},0)})};function Vs(h){var e,t;return Array.from((t=(e=h.media)==null?void 0:e.textTracks)!=null?t:[]).filter(({kind:l})=>l==="subtitles"||l==="captions")}var $s=h=>{var t,l;let{media:e}=h;return(l=(t=e==null?void 0:e._hls)==null?void 0:t.liveSyncPosition)!=null?l:(e==null?void 0:e.seekable.length)?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Xi=h=>{let e=$s(h);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}h.currentTime=e},Ou=1,Pu=5,Ys=3,zs=.5,Xs=h=>{var v;let{streamType:e}=h,t=$s(h),l=(v=h.media)==null?void 0:v.currentTime;if(t==null||l==null)return!1;let n=t-l;return e===ve.LL_LIVE||e===ve.LL_DVR?n<=Ou*(Ys+zs):e===ve.LIVE||e===ve.DVR?n<=Pu*(Ys+zs):!1};var Qs=`[mux-player ${Fr()}]`;function st(...h){console.warn(Qs,...h)}function Dt(...h){console.error(Qs,...h)}function Kr(h){var t;let e=(t=h.message)!=null?t:"";if(h.file){let l="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${pe("Read more: ")}
|
|
1261
|
+
`;var kr,wr,Ur,Hi,Nr,Gi,jt=class extends HTMLElement{constructor(){super();Le(this,Ur),Le(this,Nr),Le(this,kr,void 0),Le(this,wr,void 0),this.attachShadow({mode:"open"}),this.isConnected&&He(this,Ur,Hi).call(this)}static get observedAttributes(){let h=[],e=l=>l.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();Object.getOwnPropertyNames(this.prototype).forEach(l=>{let n=!1;try{typeof this.prototype[l]=="function"&&(n=!0)}catch{}!n&&l!==l.toUpperCase()&&h.push(l.toLowerCase(),e(l))});let t=Object.getPrototypeOf(this).observedAttributes;return t&&(h=h.concat(t)),h}attributeChangedCallback(h,e,t){!ae(this,kr)&&!this.isConnected&&(ze(this,kr,!0),He(this,Ur,Hi).call(this)),He(this,Nr,Gi).call(this,h,e,t)}connectedCallback(){}};kr=new WeakMap,wr=new WeakMap,Ur=new WeakSet,Hi=function(){if(ae(this,wr))return;ze(this,wr,!0),this.shadowRoot.append(Os.content.cloneNode(!0)),this.nativeEl=this.shadowRoot.querySelector("video"),Wi.forEach(e=>{this.nativeEl.addEventListener(e,t=>{this.dispatchEvent(new CustomEvent(t.type,{detail:t.detail}))})});let h=this.shadowRoot.querySelector("slot");h.addEventListener("slotchange",()=>{h.assignedElements().forEach(e=>{!["track","source"].includes(e.localName)||this.nativeEl.append(e)})}),Array.prototype.forEach.call(this.attributes,e=>{He(this,Nr,Gi).call(this,e.name,null,e.value)}),this.nativeEl.defaultMuted&&(this.nativeEl.muted=!0)},Nr=new WeakSet,Gi=function(h,e,t){let l=Object.getOwnPropertyNames(Object.getPrototypeOf(this)),n=bu(l,h),v=Object.getPrototypeOf(this.constructor).toString().indexOf("function HTMLElement")===0;n&&!v?typeof this[n]=="boolean"?t===null?this[n]=!1:this[n]=!0:this[n]=t:t===null?this.nativeEl.removeAttribute(h):["id","class"].indexOf(h)===-1&&this.nativeEl.setAttribute(h,t)};var Ps=[],ks=document.createElement("video",{is:"castable-video"}),Tu=["webkitDisplayingFullscreen","webkitSupportsFullscreen"];for(let h=Object.getPrototypeOf(ks);h&&h!==HTMLElement.prototype;h=Object.getPrototypeOf(h))Object.getOwnPropertyNames(h).forEach(e=>{Tu.indexOf(e)===-1&&Ps.push(e)});Ps.forEach(h=>{if(!(h in jt.prototype))if(typeof ks[h]=="function")jt.prototype[h]=function(){return this.nativeEl[h].apply(this.nativeEl,arguments)};else{let e={get(){return this.nativeEl[h]}};h!==h.toUpperCase()&&(e.set=function(t){this.nativeEl[h]=t}),Object.defineProperty(jt.prototype,h,e)}});function bu(h,e){let t=null;return h.forEach(l=>{l.toLowerCase()==e.toLowerCase()&&(t=l)}),t}globalThis.customElements.get("custom-video")||(globalThis.customElements.define("custom-video",jt),globalThis.CustomVideoElement=jt);var ws=jt,ge={ENV_KEY:"env-key",DEBUG:"debug",PLAYBACK_ID:"playback-id",METADATA_URL:"metadata-url",PREFER_MSE:"prefer-mse",PLAYER_SOFTWARE_VERSION:"player-software-version",PLAYER_SOFTWARE_NAME:"player-software-name",METADATA_VIDEO_ID:"metadata-video-id",METADATA_VIDEO_TITLE:"metadata-video-title",METADATA_VIEWER_USER_ID:"metadata-viewer-user-id",BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",CUSTOM_DOMAIN:"custom-domain",TYPE:"type",STREAM_TYPE:"stream-type",START_TIME:"start-time"},Au=Object.values(ge),Su=Eu(),_u="mux-video",Vi=class extends ws{constructor(){super();this.__metadata={},this.__playerInitTime=mn()}static get observedAttributes(){var h;return[...Au,...(h=ws.observedAttributes)!=null?h:[]]}get playerInitTime(){return this.__playerInitTime}get playerSoftwareName(){var h;return(h=this.__playerSoftwareName)!=null?h:_u}set playerSoftwareName(h){this.__playerSoftwareName=h}get playerSoftwareVersion(){var h;return(h=this.__playerSoftwareVersion)!=null?h:Su}set playerSoftwareVersion(h){this.__playerSoftwareVersion=h}get hls(){return console.warn("<mux-video>.hls is deprecated, please use ._hls instead"),this._hls}get _hls(){return this.__hls}get mux(){return this.nativeEl.mux}get error(){var h;return(h=En(this.nativeEl))!=null?h:null}get errorTranslator(){return this.__errorTranslator}set errorTranslator(h){this.__errorTranslator=h}get src(){return this.getAttribute("src")}set src(h){h!==this.src&&(h==null?this.removeAttribute("src"):this.setAttribute("src",h))}get type(){var h;return(h=this.getAttribute(ge.TYPE))!=null?h:void 0}set type(h){h!==this.type&&(h?this.setAttribute(ge.TYPE,h):this.removeAttribute(ge.TYPE))}get autoplay(){let h=this.getAttribute("autoplay");return h===null?!1:h===""?!0:h}set autoplay(h){let e=this.autoplay;h!==e&&(h?this.setAttribute("autoplay",typeof h=="string"?h:""):this.removeAttribute("autoplay"))}get debug(){return this.getAttribute(ge.DEBUG)!=null}set debug(h){h!==this.debug&&(h?this.setAttribute(ge.DEBUG,""):this.removeAttribute(ge.DEBUG))}get startTime(){let h=this.getAttribute(ge.START_TIME);if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}set startTime(h){h!==this.startTime&&(h==null?this.removeAttribute(ge.START_TIME):this.setAttribute(ge.START_TIME,`${h}`))}get playbackId(){var h;return(h=this.getAttribute(ge.PLAYBACK_ID))!=null?h:void 0}set playbackId(h){h!==this.playbackId&&(h?this.setAttribute(ge.PLAYBACK_ID,h):this.removeAttribute(ge.PLAYBACK_ID))}get customDomain(){var h;return(h=this.getAttribute(ge.CUSTOM_DOMAIN))!=null?h:void 0}set customDomain(h){h!==this.customDomain&&(h?this.setAttribute(ge.CUSTOM_DOMAIN,h):this.removeAttribute(ge.CUSTOM_DOMAIN))}get envKey(){var h;return(h=this.getAttribute(ge.ENV_KEY))!=null?h:void 0}set envKey(h){h!==this.envKey&&(h?this.setAttribute(ge.ENV_KEY,h):this.removeAttribute(ge.ENV_KEY))}get beaconCollectionDomain(){var h;return(h=this.getAttribute(ge.BEACON_COLLECTION_DOMAIN))!=null?h:void 0}set beaconCollectionDomain(h){h!==this.beaconCollectionDomain&&(h?this.setAttribute(ge.BEACON_COLLECTION_DOMAIN,h):this.removeAttribute(ge.BEACON_COLLECTION_DOMAIN))}get streamType(){var h;return(h=this.getAttribute(ge.STREAM_TYPE))!=null?h:void 0}set streamType(h){h!==this.streamType&&(h?this.setAttribute(ge.STREAM_TYPE,h):this.removeAttribute(ge.STREAM_TYPE))}get preferMse(){return this.getAttribute(ge.PREFER_MSE)!=null}set preferMse(h){h?this.setAttribute(ge.PREFER_MSE,""):this.removeAttribute(ge.PREFER_MSE)}get metadata(){let h=this.getAttribute(ge.METADATA_VIDEO_ID),e=this.getAttribute(ge.METADATA_VIDEO_TITLE),t=this.getAttribute(ge.METADATA_VIEWER_USER_ID);return{...this.__metadata,...h!=null?{video_id:h}:{},...e!=null?{video_title:e}:{},...t!=null?{viewer_user_id:t}:{}}}set metadata(h){this.__metadata=h!=null?h:{},this.mux&&this.mux.emit("hb",this.__metadata)}load(){let h=Tn(this,this.nativeEl,this.__hls);this.__hls=h;let e=fn(this.nativeEl,this.autoplay,h);this.__updateAutoplay=e}unload(){mi(this.nativeEl,this.__hls),this.__hls=void 0}attributeChangedCallback(h,e,t){var l;switch(h){case ge.PLAYER_SOFTWARE_NAME:this.playerSoftwareName=t!=null?t:void 0;break;case ge.PLAYER_SOFTWARE_VERSION:this.playerSoftwareVersion=t!=null?t:void 0;break;case"src":let n=!!e,v=!!t;!n&&v?this.load():n&&!v?this.unload():n&&v&&(this.unload(),this.load());break;case"autoplay":if(t===e)break;(l=this.__updateAutoplay)==null||l.call(this,this.autoplay);break;case ge.PLAYBACK_ID:this.src=gn(t!=null?t:void 0,{domain:this.customDomain});break;case ge.DEBUG:let R=this.debug;this.mux&&console.info("Cannot toggle debug mode of mux data after initialization. Make sure you set all metadata to override before setting the src."),this._hls&&(this._hls.config.debug=R);break;case ge.METADATA_URL:t&&fetch(t).then(T=>T.json()).then(T=>this.metadata=T).catch(T=>console.error(`Unable to load or parse metadata JSON from metadata-url ${t}!`));break;default:break}super.attributeChangedCallback(h,e,t)}disconnectedCallback(){this.unload()}};globalThis.customElements.get("mux-video")||(globalThis.customElements.define("mux-video",Vi),globalThis.MuxVideoElement=Vi);var Us=Vi;var xu="en",Lt={code:xu};var Ns="en";function pe(h,e=!0){var n,v;let t=e&&(v=(n=Lt)==null?void 0:n[h])!=null?v:h,l=e?Lt.code:Ns;return new Bs(t,l)}var Bs=class{constructor(e,t=(l=>(l=Lt.code)!=null?l:Ns)()){this.message=e,this.locale=t}format(e){return this.message.replace(/\{(\w+)\}/g,(t,l)=>{var n;return(n=e[l])!=null?n:""})}toString(){return this.message}};function Fs(h){let e="";return Object.entries(h).forEach(([t,l])=>{l!=null&&(e+=`${Lu(t)}: ${l}; `)}),e?e.trim():void 0}function Lu(h){return h.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function js(h){return h.replace(/[-_]([a-z])/g,(e,t)=>t.toUpperCase())}function ar(h){if(h==null)return;let e=+h;return Number.isNaN(e)?void 0:e}function Br(h){let e=Du(h).toString();return e?"?"+e:""}function Du(h){let e={};for(let t in h)h[t]!=null&&(e[t]=h[t]);return new URLSearchParams(e)}function sr(h){let t=h.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),l=decodeURIComponent(atob(t).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(l)}var $i=(h,e)=>!h||!e?!1:h.contains(e)?!0:$i(h,e.getRootNode().host);var Yi="mux.com",Iu=()=>{try{return"0.1.0-beta.22"}catch{}return"UNKNOWN"},Mu=Iu(),Fr=()=>Mu,zi=(h,{token:e,domain:t=Yi}={})=>`https://stream.${t}/${h}.m3u8${Br(!!e?{token:e}:{redundant_streams:!0})}`,Ks=(h,{token:e,thumbnailTime:t,domain:l=Yi}={})=>{let n=e==null?t:void 0;return`https://image.${l}/${h}/thumbnail.jpg${Br({token:e,time:n})}`},Ws=(h,{token:e,domain:t=Yi}={})=>`https://image.${t}/${h}/storyboard.vtt${Br({token:e})}`,Ru={crossorigin:"crossOrigin",playsinline:"playsInline"};function Hs(h){var e;return(e=Ru[h])!=null?e:js(h)}var jr,Cu=(h="video")=>jr||(typeof window!="undefined"&&(jr=document.createElement(h)),jr),Gs=async(h=Cu())=>{if(!h)return!1;let e=h.volume;return h.volume=e/2+.1,new Promise((t,l)=>{setTimeout(()=>{t(h.volume!==e)},0)})};function Vs(h){var e,t;return Array.from((t=(e=h.media)==null?void 0:e.textTracks)!=null?t:[]).filter(({kind:l})=>l==="subtitles"||l==="captions")}var $s=h=>{var t,l;let{media:e}=h;return(l=(t=e==null?void 0:e._hls)==null?void 0:t.liveSyncPosition)!=null?l:(e==null?void 0:e.seekable.length)?e==null?void 0:e.seekable.end(e.seekable.length-1):void 0},Xi=h=>{let e=$s(h);if(e==null){console.warn("attempting to seek to live but cannot determine live edge time!");return}h.currentTime=e},Ou=1,Pu=5,Ys=3,zs=.5,Xs=h=>{var v;let{streamType:e}=h,t=$s(h),l=(v=h.media)==null?void 0:v.currentTime;if(t==null||l==null)return!1;let n=t-l;return e===ve.LL_LIVE||e===ve.LL_DVR?n<=Ou*(Ys+zs):e===ve.LIVE||e===ve.DVR?n<=Pu*(Ys+zs):!1};var Qs=`[mux-player ${Fr()}]`;function st(...h){console.warn(Qs,...h)}function Dt(...h){console.error(Qs,...h)}function Kr(h){var t;let e=(t=h.message)!=null?t:"";if(h.file){let l="https://github.com/muxinc/elements/blob/main/errors/";e+=` ${pe("Read more: ")}
|
|
1262
1262
|
${l}${h.file}`}st(e)}var ke={AUTOPLAY:"autoplay",CROSSORIGIN:"crossorigin",LOOP:"loop",MUTED:"muted",PLAYSINLINE:"playsinline",SRC:"src",POSTER:"poster",PRELOAD:"preload"},Wr={VOLUME:"volume",PLAYBACKRATE:"playbackrate",MUTED:"muted"},ku=Wi.filter(h=>h!=="error"),wu=Object.values(ke),Uu=Object.values(Wr);function Js(h){h.querySelectorAll(":scope > track").forEach(e=>{var t;(t=h.media)==null||t.append(e.cloneNode())}),ku.forEach(e=>{var t;(t=h.media)==null||t.addEventListener(e,l=>{h.dispatchEvent(new Event(l.type))})})}var Zs=class extends HTMLElement{static get observedAttributes(){return[...wu,...Uu]}constructor(){super();this.querySelectorAll(":scope > track").forEach(l=>{var n;(n=this.media)==null||n.append(l.cloneNode())});let e=l=>{for(let n of l)n.type==="childList"&&(n.removedNodes.forEach(v=>{var T,L;let R=(T=this.media)==null?void 0:T.querySelector(`track[src="${v.src}"]`);R&&((L=this.media)==null||L.removeChild(R))}),n.addedNodes.forEach(v=>{var R;(R=this.media)==null||R.append(v.cloneNode())}))};new MutationObserver(e).observe(this,{childList:!0,subtree:!0})}attributeChangedCallback(e,t,l){switch(e){case Wr.MUTED:{this.media&&(this.media.muted=l!=null);return}case Wr.VOLUME:{let n=+l;this.media&&!Number.isNaN(n)&&(this.media.volume=n);return}case Wr.PLAYBACKRATE:{let n=+l;this.media&&!Number.isNaN(n)&&(this.media.playbackRate=n);return}}}play(){var e;return(e=this.media)==null?void 0:e.play()}pause(){var e;(e=this.media)==null||e.pause()}requestCast(e){var t;return(t=this.media)==null?void 0:t.requestCast(e)}get media(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("mux-video")}get video(){return st("<mux-player>.video is deprecated, please use .media instead"),this.media}get paused(){var e,t;return(t=(e=this.media)==null?void 0:e.paused)!=null?t:!0}get duration(){var e,t;return(t=(e=this.media)==null?void 0:e.duration)!=null?t:NaN}get ended(){var e,t;return(t=(e=this.media)==null?void 0:e.ended)!=null?t:!1}get buffered(){var e;return(e=this.media)==null?void 0:e.buffered}get readyState(){var e,t;return(t=(e=this.media)==null?void 0:e.readyState)!=null?t:0}get videoWidth(){var e;return(e=this.media)==null?void 0:e.videoWidth}get videoHeight(){var e;return(e=this.media)==null?void 0:e.videoHeight}get currentTime(){var e,t;return(t=(e=this.media)==null?void 0:e.currentTime)!=null?t:0}set currentTime(e){this.media&&(this.media.currentTime=Number(e))}get volume(){var e,t;return(t=(e=this.media)==null?void 0:e.volume)!=null?t:1}set volume(e){this.media&&(this.media.volume=Number(e))}get src(){return gt(this,ke.SRC)}set src(e){this.setAttribute(ke.SRC,`${e}`)}get poster(){var e;return(e=gt(this,ke.POSTER))!=null?e:""}set poster(e){this.setAttribute(ke.POSTER,`${e}`)}get playbackRate(){var e,t;return(t=(e=this.media)==null?void 0:e.playbackRate)!=null?t:1}set playbackRate(e){this.media&&(this.media.playbackRate=Number(e))}get crossOrigin(){return gt(this,ke.CROSSORIGIN)}set crossOrigin(e){this.setAttribute(ke.CROSSORIGIN,`${e}`)}get autoplay(){return gt(this,ke.AUTOPLAY)!=null}set autoplay(e){e?this.setAttribute(ke.AUTOPLAY,typeof e=="string"?e:""):this.removeAttribute(ke.AUTOPLAY)}get loop(){return gt(this,ke.LOOP)!=null}set loop(e){e?this.setAttribute(ke.LOOP,""):this.removeAttribute(ke.LOOP)}get muted(){return gt(this,ke.MUTED)!=null}set muted(e){e?this.setAttribute(ke.MUTED,""):this.removeAttribute(ke.MUTED)}get playsInline(){return gt(this,ke.PLAYSINLINE)!=null}set playsInline(e){e?this.setAttribute(ke.PLAYSINLINE,""):this.removeAttribute(ke.PLAYSINLINE)}get preload(){return gt(this,ke.PRELOAD)}set preload(e){e?this.setAttribute(ke.PRELOAD,e):this.removeAttribute(ke.PRELOAD)}};function gt(h,e){return h.media?h.media.getAttribute(e):h.getAttribute(e)}var Qi=Zs;var qs=`
|
|
1263
1263
|
:host {
|
|
1264
1264
|
z-index: 100;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mux/mux-player",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.22",
|
|
4
4
|
"description": "An open source Mux player web component that Just Works™",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@github/template-parts": "^0.5.3",
|
|
54
|
-
"@mux/mux-video": "0.8.
|
|
54
|
+
"@mux/mux-video": "0.8.1",
|
|
55
55
|
"@mux/playback-core": "0.8.0",
|
|
56
56
|
"media-chrome": "0.6.9"
|
|
57
57
|
},
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"@typescript-eslint/no-explicit-any": 0
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "712cdfba61ad6ae3f58e91881e7d3dc605ebbb4c"
|
|
107
107
|
}
|