@mux/mux-audio 0.9.5 → 0.9.6-canary.0-4e45cc0

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 ADDED
@@ -0,0 +1,233 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [0.9.6](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.9.5...@mux/mux-audio@0.9.6) (2023-03-31)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * update typedefs, disable skipLibChecks in tsconfig ([#601](https://github.com/muxinc/elements/issues/601)) ([1664aec](https://github.com/muxinc/elements/commit/1664aec20e4cf4a59779848b298d4504eef24080))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.9.5](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.9.4...@mux/mux-audio@0.9.5) (2023-02-15)
18
+
19
+ **Note:** Version bump only for package @mux/mux-audio
20
+
21
+
22
+
23
+
24
+
25
+ ## [0.9.4](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.9.3...@mux/mux-audio@0.9.4) (2023-02-14)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **playback-core:** Typescript + min acrobatics to make svelte and others happy ([fdf34bb](https://github.com/muxinc/elements/commit/fdf34bb8fd409f0c2b5945802251ed2e6ffafd7e))
31
+
32
+
33
+
34
+
35
+
36
+ ## [0.9.3](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.9.2...@mux/mux-audio@0.9.3) (2023-02-02)
37
+
38
+ **Note:** Version bump only for package @mux/mux-audio
39
+
40
+
41
+
42
+
43
+
44
+ ## [0.9.2](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.9.1...@mux/mux-audio@0.9.2) (2023-02-01)
45
+
46
+ **Note:** Version bump only for package @mux/mux-audio
47
+
48
+
49
+
50
+
51
+
52
+ ## [0.9.1](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.9.0...@mux/mux-audio@0.9.1) (2023-01-20)
53
+
54
+ **Note:** Version bump only for package @mux/mux-audio
55
+
56
+
57
+
58
+
59
+
60
+ # [0.9.0](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.8.1...@mux/mux-audio@0.9.0) (2022-12-13)
61
+
62
+
63
+ ### Features
64
+
65
+ * allow video, audio and player elements to get any metadata-* attrs set ([#501](https://github.com/muxinc/elements/issues/501)) ([8ee139d](https://github.com/muxinc/elements/commit/8ee139d2bbd08e1e3c08d047f870c1dcf01dac7e))
66
+
67
+
68
+
69
+
70
+
71
+ ## [0.8.1](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.8.0...@mux/mux-audio@0.8.1) (2022-11-21)
72
+
73
+
74
+ ### Bug Fixes
75
+
76
+ * add async effect for loading media ([#492](https://github.com/muxinc/elements/issues/492)) ([d2b250a](https://github.com/muxinc/elements/commit/d2b250a2d86e4e6a4c17fc34196e6468c4fedf1f))
77
+
78
+
79
+
80
+
81
+
82
+ # [0.8.0](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.7.0...@mux/mux-audio@0.8.0) (2022-10-25)
83
+
84
+
85
+ ### Features
86
+
87
+ * **mux-audio:** Add disable cookies attr and prop. ([ef453ed](https://github.com/muxinc/elements/commit/ef453edf9cb9696150ae89f995a6af8472161153))
88
+
89
+
90
+
91
+
92
+
93
+ # [0.7.0](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.6.4...@mux/mux-audio@0.7.0) (2022-10-05)
94
+
95
+ ### Bug Fixes
96
+
97
+ - preload for mux-audio, add tests ([e795fe0](https://github.com/muxinc/elements/commit/e795fe047af1feac832786aa03d8f419e57881b5))
98
+ - preload playback core change ([15313ea](https://github.com/muxinc/elements/commit/15313eaad81f748b5853a0fdaabfe141963f885e))
99
+
100
+ ### Features
101
+
102
+ - add `prefer-playback` attribute ([#402](https://github.com/muxinc/elements/issues/402)) ([8da36d6](https://github.com/muxinc/elements/commit/8da36d6b597ddbc4ae006873fee13a971b7ec2f3))
103
+ - remove deprecated .hls and .video props ([#408](https://github.com/muxinc/elements/issues/408)) ([2bd4861](https://github.com/muxinc/elements/commit/2bd48618d1b59d054e470ce9011c5c2f4904f8b6))
104
+
105
+ ### BREAKING CHANGES
106
+
107
+ - remove deprecated .hls and .video props.
108
+
109
+ ## [0.6.4](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.6.3...@mux/mux-audio@0.6.4) (2022-09-16)
110
+
111
+ ### Bug Fixes
112
+
113
+ - mux-video & mux-audio memory leak ([#387](https://github.com/muxinc/elements/issues/387)) ([4a0d921](https://github.com/muxinc/elements/commit/4a0d921c49a3bf730ad86a77e46a085c44ef91ea))
114
+ - update PlaybackEngine types ([1873781](https://github.com/muxinc/elements/commit/187378165a83e70d62bd5ba954b4986d0ae50738))
115
+
116
+ ## [0.6.3](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.6.2...@mux/mux-audio@0.6.3) (2022-08-31)
117
+
118
+ ### Bug Fixes
119
+
120
+ - polyfills mutating global ([#355](https://github.com/muxinc/elements/issues/355)) ([71d18a4](https://github.com/muxinc/elements/commit/71d18a427f0171bb214a0df7c1425d3d1bddc47a))
121
+
122
+ ## [0.6.2](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.6.1...@mux/mux-audio@0.6.2) (2022-08-02)
123
+
124
+ ### Bug Fixes
125
+
126
+ - CustomVideo.nativeEl being null in some cases ([#316](https://github.com/muxinc/elements/issues/316)) ([0563c30](https://github.com/muxinc/elements/commit/0563c3041cccd9b985a9093a8c7c7cc80433147c)), closes [#314](https://github.com/muxinc/elements/issues/314)
127
+
128
+ ## [0.6.1](https://github.com/muxinc/elements/compare/@mux/mux-audio@0.6.0...@mux/mux-audio@0.6.1) (2022-07-21)
129
+
130
+ **Note:** Version bump only for package @mux/mux-audio
131
+
132
+ # 0.6.0 (2022-07-05)
133
+
134
+ ### Bug Fixes
135
+
136
+ - Add catches with error logging if mux-video or mux-audio fails to load or parse metadata from metadata-url. ([c53a9be](https://github.com/muxinc/elements/commit/c53a9be15b7a8ec8e7191ce1136152bf3d046a63))
137
+ - clear some state on playbackId change ([#174](https://github.com/muxinc/elements/issues/174)) ([af0738e](https://github.com/muxinc/elements/commit/af0738ea5ae5a75861f75fc2ae3809ada735f3e2))
138
+ - custom video events handling ([#203](https://github.com/muxinc/elements/issues/203)) ([a909f89](https://github.com/muxinc/elements/commit/a909f89a69ee0d4b67e9d9371ac0f80984016181))
139
+ - error message was not passed back to player ([ade8143](https://github.com/muxinc/elements/commit/ade81438834610a7bddfa158ff20ec671ccd508f))
140
+ - fix 3x init of playback-core if `src` used ([#213](https://github.com/muxinc/elements/issues/213)) ([1d3e465](https://github.com/muxinc/elements/commit/1d3e465f8cc40544f0fb2c17ff4fb435c9e9a807))
141
+ - keep .hls but have it log a warning saying to use .\_hls ([11e6c10](https://github.com/muxinc/elements/commit/11e6c102a7e238bc8104c52ae9b94e7e3c2c7e19))
142
+ - **mux-audio:** Fix mux-audio, add shadow & props ([c74a448](https://github.com/muxinc/elements/commit/c74a448347cf6585944a08c977b138c560229e4e))
143
+ - **mux-audio:** use generateInitTime() instead of Date.now. ([6b67651](https://github.com/muxinc/elements/commit/6b67651245ee32ee864c8c114cdf480c618e2d8a))
144
+ - **mux-audio:** Use window polyfill for CustomAudioElement browser dependencies. ([2afb742](https://github.com/muxinc/elements/commit/2afb742911a29e708283faaca5fc966b9493670a))
145
+ - point pkgjson#browser at mjs build for webpack 4 ([#191](https://github.com/muxinc/elements/issues/191)) ([a73a495](https://github.com/muxinc/elements/commit/a73a4951052bfc77cc24667b9bc0a05efbcbb355))
146
+ - prettier format all elements files ([741d607](https://github.com/muxinc/elements/commit/741d607521ca9578cfad9f0a9216a6565b4c56a1))
147
+ - switch cjs extension to .cjs.js ([30e83c3](https://github.com/muxinc/elements/commit/30e83c3ce0bd9bfda4817c30ffe0921e425619e4))
148
+
149
+ ### Features
150
+
151
+ - add beaconCollectionDomain option to replace beaconDomain ([a44b699](https://github.com/muxinc/elements/commit/a44b699ae3138590b9d953f693f95971694658df))
152
+ - add part=video/audio for mux-video/audio ([49e5b6f](https://github.com/muxinc/elements/commit/49e5b6f14fde14d429afae5c5a46d7595c4e027e)), closes [#125](https://github.com/muxinc/elements/issues/125)
153
+ - Extended autoplay options ([#116](https://github.com/muxinc/elements/issues/116)) ([475e838](https://github.com/muxinc/elements/commit/475e83884f641c578fa601c9501147d485fc1831))
154
+ - Initial immplementation of mux-audio. ([a33b2ea](https://github.com/muxinc/elements/commit/a33b2ea1ba5b0a3c2c684291f98b3071bc4267ba))
155
+ - rename hls to \_hls ([2d53bc2](https://github.com/muxinc/elements/commit/2d53bc2517840d65a8fd5e2bb2d979ce8b491116))
156
+ - support hls audio as first pass impl. Re-add playback-id support. ([d5229d2](https://github.com/muxinc/elements/commit/d5229d26be74338158a4037ff82f23123011cc6c))
157
+ - **support-media-types:** Add support for non hls media. Add (optional) type attribute. (refs [#23](https://github.com/muxinc/elements/issues/23)) ([fe4cdd5](https://github.com/muxinc/elements/commit/fe4cdd59f63188033d737c9166ef0522b6ef74d6))
158
+ - **support-media-types:** ignore case for shorthand types. (fixes [#23](https://github.com/muxinc/elements/issues/23)) ([64eb088](https://github.com/muxinc/elements/commit/64eb0888d3d41880ff26b471db0cb964b61350ad))
159
+ - Updates to make mux-audio and mux-video builds easy to use in next.js (fixes [#15](https://github.com/muxinc/elements/issues/15)) ([99b8ea7](https://github.com/muxinc/elements/commit/99b8ea74785903c5b300007cf8c3bc8a7601ae2d))
160
+
161
+ ## [0.5.6](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.5.5...@mux-elements/mux-audio@0.5.6) (2022-06-23)
162
+
163
+ **Note:** Version bump only for package @mux-elements/mux-audio
164
+
165
+ ## [0.5.5](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.5.4...@mux-elements/mux-audio@0.5.5) (2022-06-06)
166
+
167
+ **Note:** Version bump only for package @mux-elements/mux-audio
168
+
169
+ ## [0.5.4](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.5.3...@mux-elements/mux-audio@0.5.4) (2022-05-26)
170
+
171
+ **Note:** Version bump only for package @mux-elements/mux-audio
172
+
173
+ ## [0.5.3](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.5.2...@mux-elements/mux-audio@0.5.3) (2022-05-23)
174
+
175
+ **Note:** Version bump only for package @mux-elements/mux-audio
176
+
177
+ ## [0.5.2](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.5.1...@mux-elements/mux-audio@0.5.2) (2022-05-20)
178
+
179
+ ### Bug Fixes
180
+
181
+ - switch cjs extension to .cjs.js ([30e83c3](https://github.com/muxinc/elements/commit/30e83c3ce0bd9bfda4817c30ffe0921e425619e4))
182
+
183
+ ## [0.5.1](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.5.0...@mux-elements/mux-audio@0.5.1) (2022-05-10)
184
+
185
+ ### Bug Fixes
186
+
187
+ - error message was not passed back to player ([ade8143](https://github.com/muxinc/elements/commit/ade81438834610a7bddfa158ff20ec671ccd508f))
188
+ - fix 3x init of playback-core if `src` used ([#213](https://github.com/muxinc/elements/issues/213)) ([1d3e465](https://github.com/muxinc/elements/commit/1d3e465f8cc40544f0fb2c17ff4fb435c9e9a807))
189
+
190
+ # [0.5.0](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.4.4...@mux-elements/mux-audio@0.5.0) (2022-05-03)
191
+
192
+ ### Bug Fixes
193
+
194
+ - custom video events handling ([#203](https://github.com/muxinc/elements/issues/203)) ([a909f89](https://github.com/muxinc/elements/commit/a909f89a69ee0d4b67e9d9371ac0f80984016181))
195
+ - keep .hls but have it log a warning saying to use .\_hls ([11e6c10](https://github.com/muxinc/elements/commit/11e6c102a7e238bc8104c52ae9b94e7e3c2c7e19))
196
+
197
+ ### Features
198
+
199
+ - add part=video/audio for mux-video/audio ([49e5b6f](https://github.com/muxinc/elements/commit/49e5b6f14fde14d429afae5c5a46d7595c4e027e)), closes [#125](https://github.com/muxinc/elements/issues/125)
200
+ - rename hls to \_hls ([2d53bc2](https://github.com/muxinc/elements/commit/2d53bc2517840d65a8fd5e2bb2d979ce8b491116))
201
+
202
+ ## [0.4.4](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.4.3...@mux-elements/mux-audio@0.4.4) (2022-04-22)
203
+
204
+ ### Bug Fixes
205
+
206
+ - point pkgjson#browser at mjs build for webpack 4 ([#191](https://github.com/muxinc/elements/issues/191)) ([a73a495](https://github.com/muxinc/elements/commit/a73a4951052bfc77cc24667b9bc0a05efbcbb355))
207
+
208
+ ## [0.4.3](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.4.2...@mux-elements/mux-audio@0.4.3) (2022-04-18)
209
+
210
+ **Note:** Version bump only for package @mux-elements/mux-audio
211
+
212
+ ## [0.4.2](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.4.1...@mux-elements/mux-audio@0.4.2) (2022-04-12)
213
+
214
+ ### Bug Fixes
215
+
216
+ - clear some state on playbackId change ([#174](https://github.com/muxinc/elements/issues/174)) ([af0738e](https://github.com/muxinc/elements/commit/af0738ea5ae5a75861f75fc2ae3809ada735f3e2))
217
+
218
+ ## [0.4.1](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.4.0...@mux-elements/mux-audio@0.4.1) (2022-04-01)
219
+
220
+ **Note:** Version bump only for package @mux-elements/mux-audio
221
+
222
+ # [0.4.0](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio@0.3.0...@mux-elements/mux-audio@0.4.0) (2022-03-28)
223
+
224
+ ### Bug Fixes
225
+
226
+ - **mux-audio:** Fix mux-audio, add shadow & props ([c74a448](https://github.com/muxinc/elements/commit/c74a448347cf6585944a08c977b138c560229e4e))
227
+ - **mux-audio:** use generateInitTime() instead of Date.now. ([6b67651](https://github.com/muxinc/elements/commit/6b67651245ee32ee864c8c114cdf480c618e2d8a))
228
+ - **mux-audio:** Use window polyfill for CustomAudioElement browser dependencies. ([2afb742](https://github.com/muxinc/elements/commit/2afb742911a29e708283faaca5fc966b9493670a))
229
+ - prettier format all elements files ([741d607](https://github.com/muxinc/elements/commit/741d607521ca9578cfad9f0a9216a6565b4c56a1))
230
+
231
+ ### Features
232
+
233
+ - add beaconCollectionDomain option to replace beaconDomain ([a44b699](https://github.com/muxinc/elements/commit/a44b699ae3138590b9d953f693f95971694658df))
package/dist/cjs.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "inputs": {
3
+ "src/polyfills/index.ts": {
4
+ "bytes": 2117,
5
+ "imports": []
6
+ },
7
+ "src/env.ts": {
8
+ "bytes": 391,
9
+ "imports": []
10
+ },
11
+ "src/CustomAudioElement.js": {
12
+ "bytes": 8461,
13
+ "imports": [
14
+ {
15
+ "path": "src/polyfills/index.ts",
16
+ "kind": "import-statement"
17
+ }
18
+ ]
19
+ },
20
+ "src/index.ts": {
21
+ "bytes": 11006,
22
+ "imports": [
23
+ {
24
+ "path": "src/polyfills/index.ts",
25
+ "kind": "import-statement"
26
+ },
27
+ {
28
+ "path": "src/env.ts",
29
+ "kind": "import-statement"
30
+ },
31
+ {
32
+ "path": "src/CustomAudioElement.js",
33
+ "kind": "import-statement"
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ "outputs": {
39
+ "dist/index.cjs.js.map": {
40
+ "imports": [],
41
+ "exports": [],
42
+ "inputs": {},
43
+ "bytes": 33100
44
+ },
45
+ "dist/index.cjs.js": {
46
+ "imports": [],
47
+ "exports": [],
48
+ "entryPoint": "src/index.ts",
49
+ "inputs": {
50
+ "src/index.ts": {
51
+ "bytesInOutput": 4810
52
+ },
53
+ "src/polyfills/index.ts": {
54
+ "bytesInOutput": 734
55
+ },
56
+ "src/env.ts": {
57
+ "bytesInOutput": 67
58
+ },
59
+ "src/CustomAudioElement.js": {
60
+ "bytesInOutput": 2938
61
+ }
62
+ },
63
+ "bytes": 9402
64
+ }
65
+ }
66
+ }
package/dist/esm.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "inputs": {
3
+ "src/polyfills/index.ts": {
4
+ "bytes": 2117,
5
+ "imports": []
6
+ },
7
+ "src/env.ts": {
8
+ "bytes": 391,
9
+ "imports": []
10
+ },
11
+ "src/CustomAudioElement.js": {
12
+ "bytes": 8461,
13
+ "imports": [
14
+ {
15
+ "path": "src/polyfills/index.ts",
16
+ "kind": "import-statement"
17
+ }
18
+ ]
19
+ },
20
+ "src/index.ts": {
21
+ "bytes": 11006,
22
+ "imports": [
23
+ {
24
+ "path": "src/polyfills/index.ts",
25
+ "kind": "import-statement"
26
+ },
27
+ {
28
+ "path": "src/env.ts",
29
+ "kind": "import-statement"
30
+ },
31
+ {
32
+ "path": "src/CustomAudioElement.js",
33
+ "kind": "import-statement"
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ "outputs": {
39
+ "dist/index.mjs.map": {
40
+ "imports": [],
41
+ "exports": [],
42
+ "inputs": {},
43
+ "bytes": 33200
44
+ },
45
+ "dist/index.mjs": {
46
+ "imports": [],
47
+ "exports": [
48
+ "AudioEvents",
49
+ "MediaError",
50
+ "default"
51
+ ],
52
+ "entryPoint": "src/index.ts",
53
+ "inputs": {
54
+ "src/polyfills/index.ts": {
55
+ "bytesInOutput": 734
56
+ },
57
+ "src/index.ts": {
58
+ "bytesInOutput": 4686
59
+ },
60
+ "src/env.ts": {
61
+ "bytesInOutput": 67
62
+ },
63
+ "src/CustomAudioElement.js": {
64
+ "bytesInOutput": 2936
65
+ }
66
+ },
67
+ "bytes": 8904
68
+ }
69
+ }
70
+ }
package/dist/iife.json ADDED
@@ -0,0 +1,100 @@
1
+ {
2
+ "inputs": {
3
+ "src/polyfills/index.ts": {
4
+ "bytes": 2117,
5
+ "imports": []
6
+ },
7
+ "../../node_modules/mux-embed/dist/mux.js": {
8
+ "bytes": 83733,
9
+ "imports": []
10
+ },
11
+ "../../node_modules/hls.js/dist/hls.min.js": {
12
+ "bytes": 371023,
13
+ "imports": []
14
+ },
15
+ "../playback-core/dist/index.mjs": {
16
+ "bytes": 12307,
17
+ "imports": [
18
+ {
19
+ "path": "../../node_modules/mux-embed/dist/mux.js",
20
+ "kind": "import-statement"
21
+ },
22
+ {
23
+ "path": "../../node_modules/hls.js/dist/hls.min.js",
24
+ "kind": "import-statement"
25
+ }
26
+ ]
27
+ },
28
+ "src/env.ts": {
29
+ "bytes": 391,
30
+ "imports": []
31
+ },
32
+ "src/CustomAudioElement.js": {
33
+ "bytes": 8461,
34
+ "imports": [
35
+ {
36
+ "path": "src/polyfills/index.ts",
37
+ "kind": "import-statement"
38
+ }
39
+ ]
40
+ },
41
+ "src/index.ts": {
42
+ "bytes": 11006,
43
+ "imports": [
44
+ {
45
+ "path": "src/polyfills/index.ts",
46
+ "kind": "import-statement"
47
+ },
48
+ {
49
+ "path": "../playback-core/dist/index.mjs",
50
+ "kind": "import-statement"
51
+ },
52
+ {
53
+ "path": "src/env.ts",
54
+ "kind": "import-statement"
55
+ },
56
+ {
57
+ "path": "src/CustomAudioElement.js",
58
+ "kind": "import-statement"
59
+ }
60
+ ]
61
+ }
62
+ },
63
+ "outputs": {
64
+ "dist/mux-audio.js.map": {
65
+ "imports": [],
66
+ "exports": [],
67
+ "inputs": {},
68
+ "bytes": 1947248
69
+ },
70
+ "dist/mux-audio.js": {
71
+ "imports": [],
72
+ "exports": [],
73
+ "entryPoint": "src/index.ts",
74
+ "inputs": {
75
+ "../../node_modules/mux-embed/dist/mux.js": {
76
+ "bytesInOutput": 84643
77
+ },
78
+ "../../node_modules/hls.js/dist/hls.min.js": {
79
+ "bytesInOutput": 371150
80
+ },
81
+ "src/polyfills/index.ts": {
82
+ "bytesInOutput": 767
83
+ },
84
+ "../playback-core/dist/index.mjs": {
85
+ "bytesInOutput": 11640
86
+ },
87
+ "src/env.ts": {
88
+ "bytesInOutput": 72
89
+ },
90
+ "src/CustomAudioElement.js": {
91
+ "bytesInOutput": 2988
92
+ },
93
+ "src/index.ts": {
94
+ "bytesInOutput": 4655
95
+ }
96
+ },
97
+ "bytes": 477147
98
+ }
99
+ }
100
+ }
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var S=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var z=(t,s)=>{for(var e in s)S(t,e,{get:s[e],enumerable:!0})},V=(t,s,e,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of H(s))!q.call(t,i)&&i!==e&&S(t,i,{get:()=>s[i],enumerable:!(r=G(s,i))||r.enumerable});return t};var W=t=>V(S({},"__esModule",{value:!0}),t);var x=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var o=(t,s,e)=>(x(t,s,"read from private field"),e?e.call(t):s.get(t)),d=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},c=(t,s,e,r)=>(x(t,s,"write to private field"),r?r.call(t,e):s.set(t,e),e);var b=(t,s,e)=>(x(t,s,"access private method"),e);var ne={};z(ne,{AudioEvents:()=>D,MediaError:()=>a.MediaError,default:()=>re});module.exports=W(ne);var E=class{addEventListener(){}removeEventListener(){}dispatchEvent(s){return!0}};if(typeof DocumentFragment=="undefined"){class t extends E{}globalThis.DocumentFragment=t}var T=class extends E{},I=class extends E{},$={get(t){},define(t,s,e){},upgrade(t){},whenDefined(t){return Promise.resolve(T)}},P,v=class{constructor(s,e={}){d(this,P,void 0);c(this,P,e==null?void 0:e.detail)}get detail(){return o(this,P)}initCustomEvent(){}};P=new WeakMap;function J(t,s){return new T}var K={document:{createElement:J},DocumentFragment,customElements:$,CustomEvent:v,EventTarget:E,HTMLElement:T,HTMLVideoElement:I},Y=typeof window=="undefined"||typeof globalThis.customElements=="undefined",h=Y?K:globalThis,R=Y?K.document:globalThis.document;var a=require("@mux/playback-core");var Q=()=>{try{return"0.9.5"}catch{}return"UNKNOWN"},X=Q(),w=()=>X;var D=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],U=R.createElement("template");U.innerHTML=`
1
+ "use strict";var S=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var z=(t,s)=>{for(var e in s)S(t,e,{get:s[e],enumerable:!0})},V=(t,s,e,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of H(s))!q.call(t,i)&&i!==e&&S(t,i,{get:()=>s[i],enumerable:!(r=G(s,i))||r.enumerable});return t};var W=t=>V(S({},"__esModule",{value:!0}),t);var x=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var o=(t,s,e)=>(x(t,s,"read from private field"),e?e.call(t):s.get(t)),d=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},c=(t,s,e,r)=>(x(t,s,"write to private field"),r?r.call(t,e):s.set(t,e),e);var b=(t,s,e)=>(x(t,s,"access private method"),e);var ne={};z(ne,{AudioEvents:()=>D,MediaError:()=>a.MediaError,default:()=>re});module.exports=W(ne);var E=class{addEventListener(){}removeEventListener(){}dispatchEvent(s){return!0}};if(typeof DocumentFragment=="undefined"){class t extends E{}globalThis.DocumentFragment=t}var T=class extends E{},v=class extends E{},$={get(t){},define(t,s,e){},upgrade(t){},whenDefined(t){return Promise.resolve(T)}},C,I=class{constructor(s,e={}){d(this,C,void 0);c(this,C,e==null?void 0:e.detail)}get detail(){return o(this,C)}initCustomEvent(){}};C=new WeakMap;function J(t,s){return new T}var K={document:{createElement:J},DocumentFragment,customElements:$,CustomEvent:I,EventTarget:E,HTMLElement:T,HTMLVideoElement:v},Y=typeof window=="undefined"||typeof globalThis.customElements=="undefined",h=Y?K:globalThis,R=Y?K.document:globalThis.document;var a=require("@mux/playback-core");var Q=()=>{try{return"0.9.6"}catch{}return"UNKNOWN"},X=Q(),w=()=>X;var D=["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],U=R.createElement("template");U.innerHTML=`
2
2
  <style>
3
3
  :host {
4
4
  /* display:inline (like the native el) makes it so you can't fill
@@ -21,5 +21,5 @@
21
21
 
22
22
  <audio part="audio" crossorigin></audio>
23
23
  <slot></slot>
24
- `;var _,g,k,p=class extends h.HTMLElement{constructor(){super();d(this,g);d(this,_,void 0);this.attachShadow({mode:"open"}),this.isConnected&&b(this,g,k).call(this)}static get observedAttributes(){let e=[];Object.getOwnPropertyNames(this.prototype).forEach(i=>{let u=!1;try{typeof this.prototype[i]=="function"&&(u=!0)}catch{}!u&&i!==i.toUpperCase()&&e.push(i.toLowerCase())});let r=Object.getPrototypeOf(this).observedAttributes;return r&&(e=e.concat(r)),e}attributeChangedCallback(e,r,i){b(this,g,k).call(this),this.forwardAttribute(e,r,i)}forwardAttribute(e,r,i){let u=Object.getOwnPropertyNames(Object.getPrototypeOf(this)),m=ee(u,e),l=Object.getPrototypeOf(this.constructor).toString().indexOf("function HTMLElement")===0;m&&!l?typeof this[m]=="boolean"?i===null?this[m]=!1:this[m]=!0:this[m]=i:i===null?this.nativeEl.removeAttribute(e):["id","class"].indexOf(e)===-1&&this.nativeEl.setAttribute(e,i)}connectedCallback(){b(this,g,k).call(this)}};_=new WeakMap,g=new WeakSet,k=function(){if(o(this,_))return;c(this,_,!0),this.shadowRoot.append(U.content.cloneNode(!0));let e=this.nativeEl=this.shadowRoot.querySelector("audio");D.forEach(i=>{e.addEventListener(i,u=>{this.dispatchEvent(new CustomEvent(u.type,{detail:u.detail}))})});let r=this.shadowRoot.querySelector("slot");r.addEventListener("slotchange",()=>{r.assignedElements().forEach(i=>{!["track","source"].includes(i.localName)||e.append(i)})}),Array.from(this.attributes).forEach(i=>{this.forwardAttribute(i.name,null,i.value)}),e.defaultMuted&&(e.muted=!0)};var F=[],j=R.createElement("audio"),Z=["webkitDisplayingFullscreen","webkitSupportsFullscreen"];for(let t=Object.getPrototypeOf(j);t&&t!==h.HTMLElement.prototype;t=Object.getPrototypeOf(t))Object.keys(t).forEach(s=>{Z.indexOf(s)===-1&&F.push(s)});F.forEach(t=>{if(typeof j[t]=="function")p.prototype[t]=function(){return this.nativeEl[t].apply(this.nativeEl,arguments)};else{let e={get(){return this.nativeEl[t]}};t!==t.toUpperCase()&&(e.set=function(r){this.nativeEl[t]=r}),Object.defineProperty(p.prototype,t,e)}});function ee(t,s){let e=null;return t.forEach(r=>{r.toLowerCase()==s.toLowerCase()&&(e=r)}),e}h.customElements.get("custom-audio")||(h.customElements.define("custom-audio",p),h.CustomAudioElement=p);var N=p;var n={ENV_KEY:"env-key",DEBUG:"debug",PLAYBACK_ID:"playback-id",METADATA_URL:"metadata-url",PREFER_PLAYBACK:"prefer-playback",BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",DISABLE_COOKIES:"disable-cookies",TYPE:"type",STREAM_TYPE:"stream-type",START_TIME:"start-time"},te=Object.values(n),ie=w(),se="mux-audio",f,A,C,y,M,B,O=class extends N{constructor(){super();d(this,M);d(this,f,void 0);d(this,A,void 0);d(this,C,void 0);d(this,y,{});c(this,C,(0,a.generatePlayerInitTime)())}static get observedAttributes(){var e;return[...te,...(e=N.observedAttributes)!=null?e:[]]}get playerInitTime(){return o(this,C)}get playerSoftwareName(){return se}get playerSoftwareVersion(){return ie}get _hls(){var e;return(e=o(this,f))==null?void 0:e.engine}get mux(){return this.nativeEl.mux}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(e==null?this.removeAttribute("src"):this.setAttribute("src",e))}get preload(){let e=this.getAttribute("preload");return e===""?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return this.getAttribute(n.DEBUG)!=null}set debug(e){e!==this.debug&&(e?this.setAttribute(n.DEBUG,""):this.removeAttribute(n.DEBUG))}get disableCookies(){return this.hasAttribute(n.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(n.DISABLE_COOKIES,""):this.removeAttribute(n.DISABLE_COOKIES))}get startTime(){let e=this.getAttribute(n.START_TIME);if(e==null)return;let r=+e;return Number.isNaN(r)?void 0:r}set startTime(e){e!==this.startTime&&(e==null?this.removeAttribute(n.START_TIME):this.setAttribute(n.START_TIME,`${e}`))}get playbackId(){var e;return(e=this.getAttribute(n.PLAYBACK_ID))!=null?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(n.PLAYBACK_ID,e):this.removeAttribute(n.PLAYBACK_ID))}get envKey(){var e;return(e=this.getAttribute(n.ENV_KEY))!=null?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(n.ENV_KEY,e):this.removeAttribute(n.ENV_KEY))}get beaconCollectionDomain(){var e;return(e=this.getAttribute(n.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(n.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(n.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return(e=this.getAttribute(n.STREAM_TYPE))!=null?e:void 0}set streamType(e){e!==this.streamType&&(e?this.setAttribute(n.STREAM_TYPE,e):this.removeAttribute(n.STREAM_TYPE))}get preferPlayback(){let e=this.getAttribute(n.PREFER_PLAYBACK);if(e===a.PlaybackTypes.MSE||e===a.PlaybackTypes.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===a.PlaybackTypes.MSE||e===a.PlaybackTypes.NATIVE?this.setAttribute(n.PREFER_PLAYBACK,e):this.removeAttribute(n.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(r=>r.startsWith("metadata-")&&![n.METADATA_URL].includes(r)).reduce((r,i)=>{let u=this.getAttribute(i);return u!=null&&(r[i.replace(/^metadata-/,"").replace(/-/g,"_")]=u),r},{}),...o(this,y)}}set metadata(e){c(this,y,e!=null?e:{}),this.mux&&(console.info("Some metadata values may not be overridable at this time. Make sure you set all metadata to override before setting the src."),this.mux.emit("hb",o(this,y)))}load(){c(this,f,(0,a.initialize)(this,this.nativeEl,o(this,f)))}unload(){(0,a.teardown)(this.nativeEl,o(this,f)),c(this,f,void 0)}attributeChangedCallback(e,r,i){var u,m;switch(super.attributeChangedCallback(e,r,i),e){case"src":{let l=!!r,L=!!i;!l&&L?b(this,M,B).call(this):l&&!L?this.unload():l&&L&&(this.unload(),b(this,M,B).call(this));break}case"autoplay":if(i===r)break;(u=o(this,f))==null||u.setAutoplay(this.autoplay);break;case"preload":if(i===r)break;(m=o(this,f))==null||m.setPreload(i);break;case n.PLAYBACK_ID:this.src=(0,a.toMuxVideoURL)(i!=null?i:void 0);break;case n.DEBUG:{let l=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=l);break}case n.METADATA_URL:i&&fetch(i).then(l=>l.json()).then(l=>this.metadata=l).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${i}!`));break;default:break}}disconnectedCallback(){this.unload()}};f=new WeakMap,A=new WeakMap,C=new WeakMap,y=new WeakMap,M=new WeakSet,B=async function(){o(this,A)||(await c(this,A,Promise.resolve()),c(this,A,null),this.load())};h.customElements.get("mux-audio")||(h.customElements.define("mux-audio",O),h.MuxAudioElement=O);var re=O;
24
+ `;var O,g,k,p=class extends h.HTMLElement{constructor(){super();d(this,g);d(this,O,void 0);this.attachShadow({mode:"open"}),this.isConnected&&b(this,g,k).call(this)}static get observedAttributes(){let e=[];Object.getOwnPropertyNames(this.prototype).forEach(i=>{let u=!1;try{typeof this.prototype[i]=="function"&&(u=!0)}catch{}!u&&i!==i.toUpperCase()&&e.push(i.toLowerCase())});let r=Object.getPrototypeOf(this).observedAttributes;return r&&(e=e.concat(r)),e}attributeChangedCallback(e,r,i){b(this,g,k).call(this),this.forwardAttribute(e,r,i)}forwardAttribute(e,r,i){let u=Object.getOwnPropertyNames(Object.getPrototypeOf(this)),m=ee(u,e),l=Object.getPrototypeOf(this.constructor).toString().indexOf("function HTMLElement")===0;m&&!l?typeof this[m]=="boolean"?i===null?this[m]=!1:this[m]=!0:this[m]=i:i===null?this.nativeEl.removeAttribute(e):["id","class"].indexOf(e)===-1&&this.nativeEl.setAttribute(e,i)}connectedCallback(){b(this,g,k).call(this)}};O=new WeakMap,g=new WeakSet,k=function(){if(o(this,O))return;c(this,O,!0),this.shadowRoot.append(U.content.cloneNode(!0));let e=this.nativeEl=this.shadowRoot.querySelector("audio");D.forEach(i=>{e.addEventListener(i,u=>{this.dispatchEvent(new CustomEvent(u.type,{detail:u.detail}))})});let r=this.shadowRoot.querySelector("slot");r.addEventListener("slotchange",()=>{r.assignedElements().forEach(i=>{!["track","source"].includes(i.localName)||e.append(i)})}),Array.from(this.attributes).forEach(i=>{this.forwardAttribute(i.name,null,i.value)}),e.defaultMuted&&(e.muted=!0)};var F=[],j=R.createElement("audio"),Z=["webkitDisplayingFullscreen","webkitSupportsFullscreen"];for(let t=Object.getPrototypeOf(j);t&&t!==h.HTMLElement.prototype;t=Object.getPrototypeOf(t))Object.keys(t).forEach(s=>{Z.indexOf(s)===-1&&F.push(s)});F.forEach(t=>{if(typeof j[t]=="function")p.prototype[t]=function(){return this.nativeEl[t].apply(this.nativeEl,arguments)};else{let e={get(){return this.nativeEl[t]}};t!==t.toUpperCase()&&(e.set=function(r){this.nativeEl[t]=r}),Object.defineProperty(p.prototype,t,e)}});function ee(t,s){let e=null;return t.forEach(r=>{r.toLowerCase()==s.toLowerCase()&&(e=r)}),e}h.customElements.get("custom-audio")||(h.customElements.define("custom-audio",p),h.CustomAudioElement=p);var N=p;var n={ENV_KEY:"env-key",DEBUG:"debug",PLAYBACK_ID:"playback-id",METADATA_URL:"metadata-url",PREFER_PLAYBACK:"prefer-playback",BEACON_COLLECTION_DOMAIN:"beacon-collection-domain",DISABLE_COOKIES:"disable-cookies",TYPE:"type",STREAM_TYPE:"stream-type",START_TIME:"start-time"},te=Object.values(n),ie=w(),se="mux-audio",f,A,_,y,M,B,P=class extends N{constructor(){super();d(this,M);d(this,f,void 0);d(this,A,void 0);d(this,_,void 0);d(this,y,{});c(this,_,(0,a.generatePlayerInitTime)())}static get observedAttributes(){var e;return[...te,...(e=N.observedAttributes)!=null?e:[]]}get playerInitTime(){return o(this,_)}get playerSoftwareName(){return se}get playerSoftwareVersion(){return ie}get _hls(){var e;return(e=o(this,f))==null?void 0:e.engine}get mux(){return this.nativeEl.mux}get src(){return this.getAttribute("src")}set src(e){e!==this.src&&(e==null?this.removeAttribute("src"):this.setAttribute("src",e))}get preload(){let e=this.getAttribute("preload");return e===""?"auto":["none","metadata","auto"].includes(e)?e:super.preload}set preload(e){e!=this.getAttribute("preload")&&(["","none","metadata","auto"].includes(e)?this.setAttribute("preload",e):this.removeAttribute("preload"))}get debug(){return this.getAttribute(n.DEBUG)!=null}set debug(e){e!==this.debug&&(e?this.setAttribute(n.DEBUG,""):this.removeAttribute(n.DEBUG))}get disableCookies(){return this.hasAttribute(n.DISABLE_COOKIES)}set disableCookies(e){e!==this.disableCookies&&(e?this.setAttribute(n.DISABLE_COOKIES,""):this.removeAttribute(n.DISABLE_COOKIES))}get startTime(){let e=this.getAttribute(n.START_TIME);if(e==null)return;let r=+e;return Number.isNaN(r)?void 0:r}set startTime(e){e!==this.startTime&&(e==null?this.removeAttribute(n.START_TIME):this.setAttribute(n.START_TIME,`${e}`))}get playbackId(){var e;return(e=this.getAttribute(n.PLAYBACK_ID))!=null?e:void 0}set playbackId(e){e!==this.playbackId&&(e?this.setAttribute(n.PLAYBACK_ID,e):this.removeAttribute(n.PLAYBACK_ID))}get envKey(){var e;return(e=this.getAttribute(n.ENV_KEY))!=null?e:void 0}set envKey(e){e!==this.envKey&&(e?this.setAttribute(n.ENV_KEY,e):this.removeAttribute(n.ENV_KEY))}get beaconCollectionDomain(){var e;return(e=this.getAttribute(n.BEACON_COLLECTION_DOMAIN))!=null?e:void 0}set beaconCollectionDomain(e){e!==this.beaconCollectionDomain&&(e?this.setAttribute(n.BEACON_COLLECTION_DOMAIN,e):this.removeAttribute(n.BEACON_COLLECTION_DOMAIN))}get streamType(){var e;return(e=this.getAttribute(n.STREAM_TYPE))!=null?e:void 0}set streamType(e){e!==this.streamType&&(e?this.setAttribute(n.STREAM_TYPE,e):this.removeAttribute(n.STREAM_TYPE))}get preferPlayback(){let e=this.getAttribute(n.PREFER_PLAYBACK);if(e===a.PlaybackTypes.MSE||e===a.PlaybackTypes.NATIVE)return e}set preferPlayback(e){e!==this.preferPlayback&&(e===a.PlaybackTypes.MSE||e===a.PlaybackTypes.NATIVE?this.setAttribute(n.PREFER_PLAYBACK,e):this.removeAttribute(n.PREFER_PLAYBACK))}get metadata(){return{...this.getAttributeNames().filter(r=>r.startsWith("metadata-")&&![n.METADATA_URL].includes(r)).reduce((r,i)=>{let u=this.getAttribute(i);return u!=null&&(r[i.replace(/^metadata-/,"").replace(/-/g,"_")]=u),r},{}),...o(this,y)}}set metadata(e){c(this,y,e!=null?e:{}),this.mux&&(console.info("Some metadata values may not be overridable at this time. Make sure you set all metadata to override before setting the src."),this.mux.emit("hb",o(this,y)))}load(){c(this,f,(0,a.initialize)(this,this.nativeEl,o(this,f)))}unload(){(0,a.teardown)(this.nativeEl,o(this,f)),c(this,f,void 0)}attributeChangedCallback(e,r,i){var u,m;switch(super.attributeChangedCallback(e,r,i),e){case"src":{let l=!!r,L=!!i;!l&&L?b(this,M,B).call(this):l&&!L?this.unload():l&&L&&(this.unload(),b(this,M,B).call(this));break}case"autoplay":if(i===r)break;(u=o(this,f))==null||u.setAutoplay(this.autoplay);break;case"preload":if(i===r)break;(m=o(this,f))==null||m.setPreload(i);break;case n.PLAYBACK_ID:this.src=(0,a.toMuxVideoURL)(i!=null?i:void 0);break;case n.DEBUG:{let l=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=l);break}case n.METADATA_URL:i&&fetch(i).then(l=>l.json()).then(l=>this.metadata=l).catch(()=>console.error(`Unable to load or parse metadata JSON from metadata-url ${i}!`));break;default:break}}disconnectedCallback(){this.unload()}};f=new WeakMap,A=new WeakMap,_=new WeakMap,y=new WeakMap,M=new WeakSet,B=async function(){o(this,A)||(await c(this,A,Promise.resolve()),c(this,A,null),this.load())};h.customElements.get("mux-audio")||(h.customElements.define("mux-audio",P),h.MuxAudioElement=P);var re=P;
25
25
  //# sourceMappingURL=index.cjs.js.map