@mux/mux-video-react 0.11.4 → 0.12.0-canary.0-192aa79

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,453 @@
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.12.0](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.11.4...@mux/mux-video-react@0.12.0) (2024-10-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * add updated peer deps to other React pkgs ([#1006](https://github.com/muxinc/elements/issues/1006)) ([e51a7ce](https://github.com/muxinc/elements/commit/e51a7ce412ce7f56610035f412e2f263325ed6ad))
12
+
13
+
14
+ ### Features
15
+
16
+ * **playback-core, mux-video, mux-audio, mux-video-react, mux-audio-react, mux-player, mux-player-react:** Add asset start and end time props and attrs. ([#1002](https://github.com/muxinc/elements/issues/1002)) ([99a0726](https://github.com/muxinc/elements/commit/99a07268cfa78ee026a0ee7b7f9af90fcf3feb4c))
17
+ * **playback-core:** error handling rearchitecture (including more granular and DRM error cases) ([4d0b670](https://github.com/muxinc/elements/commit/4d0b670eacb57f44891fab781941dab6e97e06fe))
18
+
19
+
20
+
21
+
22
+
23
+ ## [0.11.4](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.11.3...@mux/mux-video-react@0.11.4) (2024-09-20)
24
+
25
+ **Note:** Version bump only for package @mux/mux-video-react
26
+
27
+
28
+
29
+
30
+
31
+ ## [0.11.3](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.11.2...@mux/mux-video-react@0.11.3) (2024-08-06)
32
+
33
+ **Note:** Version bump only for package @mux/mux-video-react
34
+
35
+
36
+
37
+
38
+
39
+ ## [0.11.2](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.11.1...@mux/mux-video-react@0.11.2) (2024-08-02)
40
+
41
+
42
+ ### Bug Fixes
43
+
44
+ * mark React 19 as peerdep ([#971](https://github.com/muxinc/elements/issues/971)) ([4f74ea0](https://github.com/muxinc/elements/commit/4f74ea0215407e5c9573d8dd4a91d2a855b864bb))
45
+
46
+
47
+
48
+
49
+
50
+ ## [0.11.1](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.11.0...@mux/mux-video-react@0.11.1) (2024-07-10)
51
+
52
+ **Note:** Version bump only for package @mux/mux-video-react
53
+
54
+
55
+
56
+
57
+
58
+ # [0.11.0](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.10.0...@mux/mux-video-react@0.11.0) (2024-05-28)
59
+
60
+
61
+ ### Features
62
+
63
+ * **mux-player, mux-player-react, mux-video, mux-video-react, mux-audio, mux-audio-react, playback-core:** pdt clipping ([#923](https://github.com/muxinc/elements/issues/923)) ([22e9b06](https://github.com/muxinc/elements/commit/22e9b06e2e0913a6c34ebea53f4bbeded969b5a4))
64
+
65
+
66
+
67
+
68
+
69
+ # [0.10.0](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.9.0...@mux/mux-video-react@0.10.0) (2024-05-03)
70
+
71
+
72
+ ### Bug Fixes
73
+
74
+ * passthrough props to native media els ([#912](https://github.com/muxinc/elements/issues/912)) ([88a63db](https://github.com/muxinc/elements/commit/88a63db7dadc9aa3e09402f7c1be79a278b97c06))
75
+
76
+
77
+ ### Features
78
+
79
+ * **mux-player-react, mux-uploader-react, mux-audio-react, mux-video-react:** add client component directive ([#911](https://github.com/muxinc/elements/issues/911)) ([76aa003](https://github.com/muxinc/elements/commit/76aa003e9ad9488509650970b971edd3ed463592))
80
+
81
+
82
+
83
+
84
+
85
+ # [0.9.0](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.8.5...@mux/mux-video-react@0.9.0) (2024-04-18)
86
+
87
+
88
+ ### Bug Fixes
89
+
90
+ * upgrade media-chrome, upchunk, React types ([#904](https://github.com/muxinc/elements/issues/904)) ([1090ad6](https://github.com/muxinc/elements/commit/1090ad690261acd7ac1ab68b45801c46be1c2d0c))
91
+ * upgrade mux-embed v5.2.0 & media-chrome v3.2.0 ([#897](https://github.com/muxinc/elements/issues/897)) ([fd91d94](https://github.com/muxinc/elements/commit/fd91d946ee2f8e58e05551fcb247422de6fbb761))
92
+
93
+
94
+ ### Features
95
+
96
+ * add `disable-tracking` attribute and prop ([#900](https://github.com/muxinc/elements/issues/900)) ([0f5966e](https://github.com/muxinc/elements/commit/0f5966ec6cdf3cacde017a4ddd9c388bea3168d7))
97
+
98
+
99
+
100
+
101
+
102
+ ## [0.8.5](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.8.4...@mux/mux-video-react@0.8.5) (2024-03-29)
103
+
104
+ **Note:** Version bump only for package @mux/mux-video-react
105
+
106
+
107
+
108
+
109
+
110
+ ## [0.8.4](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.8.3...@mux/mux-video-react@0.8.4) (2024-03-20)
111
+
112
+ **Note:** Version bump only for package @mux/mux-video-react
113
+
114
+
115
+
116
+
117
+
118
+ ## [0.8.3](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.8.2...@mux/mux-video-react@0.8.3) (2024-02-16)
119
+
120
+ **Note:** Version bump only for package @mux/mux-video-react
121
+
122
+
123
+
124
+
125
+
126
+ ## [0.8.2](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.8.1...@mux/mux-video-react@0.8.2) (2024-01-02)
127
+
128
+ **Note:** Version bump only for package @mux/mux-video-react
129
+
130
+
131
+
132
+
133
+
134
+ ## [0.8.1](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.8.0...@mux/mux-video-react@0.8.1) (2023-12-07)
135
+
136
+
137
+ ### Bug Fixes
138
+
139
+ * Adding unofficial _hlsConfig to media elements and playback core. ([#833](https://github.com/muxinc/elements/issues/833)) ([b86f6e6](https://github.com/muxinc/elements/commit/b86f6e6eb2c116d1d676fbaecd46d77a0baa3416)), closes [#792](https://github.com/muxinc/elements/issues/792)
140
+ * **mux-video-react:** Don't spread disableCookies to video to avoid warnings ([#749](https://github.com/muxinc/elements/issues/749)) ([06169be](https://github.com/muxinc/elements/commit/06169bef2c158a02e683839f1bebb8cb1e619c0c)), closes [#602](https://github.com/muxinc/elements/issues/602)
141
+
142
+
143
+
144
+
145
+
146
+ # [0.8.0](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.21...@mux/mux-video-react@0.8.0) (2023-10-24)
147
+
148
+
149
+ ### Features
150
+
151
+ * Manifest manipulation and other media stream query param props. ([954b2c8](https://github.com/muxinc/elements/commit/954b2c80d7df88bb4585c46a15dd1185d56dcf9a))
152
+
153
+
154
+
155
+
156
+
157
+ ## [0.7.21](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.20...@mux/mux-video-react@0.7.21) (2023-10-03)
158
+
159
+ **Note:** Version bump only for package @mux/mux-video-react
160
+
161
+
162
+
163
+
164
+
165
+ ## [0.7.20](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.19...@mux/mux-video-react@0.7.20) (2023-09-05)
166
+
167
+ **Note:** Version bump only for package @mux/mux-video-react
168
+
169
+
170
+
171
+
172
+
173
+ ## [0.7.19](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.18...@mux/mux-video-react@0.7.19) (2023-08-30)
174
+
175
+ **Note:** Version bump only for package @mux/mux-video-react
176
+
177
+
178
+
179
+
180
+
181
+ ## [0.7.18](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.17...@mux/mux-video-react@0.7.18) (2023-08-23)
182
+
183
+ **Note:** Version bump only for package @mux/mux-video-react
184
+
185
+
186
+
187
+
188
+
189
+ ## [0.7.17](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.16...@mux/mux-video-react@0.7.17) (2023-08-15)
190
+
191
+
192
+ ### Bug Fixes
193
+
194
+ * Reverting packages type (defaults to cjs) for accuracy per node … ([#745](https://github.com/muxinc/elements/issues/745)) ([9e7a171](https://github.com/muxinc/elements/commit/9e7a17113e14b711c8da9b1bdafe65ee86454b3b))
195
+
196
+
197
+
198
+
199
+
200
+ ## [0.7.16](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.15...@mux/mux-video-react@0.7.16) (2023-08-14)
201
+
202
+
203
+ ### Bug Fixes
204
+
205
+ * **mux-video-react:** Don't spread streamType to video to avoid React warnings ([#721](https://github.com/muxinc/elements/issues/721)) ([7395fca](https://github.com/muxinc/elements/commit/7395fca1b50dbad4fa04cb37b234523b953a2c78)), closes [#602](https://github.com/muxinc/elements/issues/602)
206
+
207
+
208
+
209
+
210
+
211
+ ## [0.7.15](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.14...@mux/mux-video-react@0.7.15) (2023-07-07)
212
+
213
+ **Note:** Version bump only for package @mux/mux-video-react
214
+
215
+
216
+
217
+
218
+
219
+ ## [0.7.14](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.13...@mux/mux-video-react@0.7.14) (2023-06-29)
220
+
221
+ **Note:** Version bump only for package @mux/mux-video-react
222
+
223
+
224
+
225
+
226
+
227
+ ## [0.7.13](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.12...@mux/mux-video-react@0.7.13) (2023-06-12)
228
+
229
+ **Note:** Version bump only for package @mux/mux-video-react
230
+
231
+
232
+
233
+
234
+
235
+ ## [0.7.12](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.11...@mux/mux-video-react@0.7.12) (2023-06-06)
236
+
237
+ **Note:** Version bump only for package @mux/mux-video-react
238
+
239
+
240
+
241
+
242
+
243
+ ## [0.7.11](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.10...@mux/mux-video-react@0.7.11) (2023-05-08)
244
+
245
+ **Note:** Version bump only for package @mux/mux-video-react
246
+
247
+
248
+
249
+
250
+
251
+ ## [0.7.10](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.9...@mux/mux-video-react@0.7.10) (2023-04-24)
252
+
253
+ **Note:** Version bump only for package @mux/mux-video-react
254
+
255
+
256
+
257
+
258
+
259
+ ## [0.7.9](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.8...@mux/mux-video-react@0.7.9) (2023-04-14)
260
+
261
+ **Note:** Version bump only for package @mux/mux-video-react
262
+
263
+
264
+
265
+
266
+
267
+ ## [0.7.8](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.7...@mux/mux-video-react@0.7.8) (2023-03-31)
268
+
269
+
270
+ ### Bug Fixes
271
+
272
+ * update typedefs, disable skipLibChecks in tsconfig ([#601](https://github.com/muxinc/elements/issues/601)) ([1664aec](https://github.com/muxinc/elements/commit/1664aec20e4cf4a59779848b298d4504eef24080))
273
+
274
+
275
+
276
+
277
+
278
+ ## [0.7.7](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.6...@mux/mux-video-react@0.7.7) (2023-02-15)
279
+
280
+ **Note:** Version bump only for package @mux/mux-video-react
281
+
282
+
283
+
284
+
285
+
286
+ ## [0.7.6](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.5...@mux/mux-video-react@0.7.6) (2023-02-14)
287
+
288
+ **Note:** Version bump only for package @mux/mux-video-react
289
+
290
+
291
+
292
+
293
+
294
+ ## [0.7.5](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.4...@mux/mux-video-react@0.7.5) (2023-02-02)
295
+
296
+ **Note:** Version bump only for package @mux/mux-video-react
297
+
298
+
299
+
300
+
301
+
302
+ ## [0.7.4](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.3...@mux/mux-video-react@0.7.4) (2023-02-01)
303
+
304
+ **Note:** Version bump only for package @mux/mux-video-react
305
+
306
+
307
+
308
+
309
+
310
+ ## [0.7.3](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.2...@mux/mux-video-react@0.7.3) (2023-01-20)
311
+
312
+
313
+ ### Bug Fixes
314
+
315
+ * MuxVideoReact memory leak ([c057099](https://github.com/muxinc/elements/commit/c057099bb344212c0afd5f938a92c893245423b4))
316
+
317
+
318
+
319
+
320
+
321
+ ## [0.7.2](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.1...@mux/mux-video-react@0.7.2) (2022-12-13)
322
+
323
+ **Note:** Version bump only for package @mux/mux-video-react
324
+
325
+
326
+
327
+
328
+
329
+ ## [0.7.1](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.7.0...@mux/mux-video-react@0.7.1) (2022-11-21)
330
+
331
+
332
+ ### Bug Fixes
333
+
334
+ * add async effect for loading media ([#492](https://github.com/muxinc/elements/issues/492)) ([d2b250a](https://github.com/muxinc/elements/commit/d2b250a2d86e4e6a4c17fc34196e6468c4fedf1f))
335
+
336
+
337
+
338
+
339
+
340
+ # [0.7.0](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.6.0...@mux/mux-video-react@0.7.0) (2022-10-25)
341
+
342
+
343
+ ### Features
344
+
345
+ * **mux-video-react:** Add disable cookies prop. ([777db83](https://github.com/muxinc/elements/commit/777db8301e6bbb97ef542a05251b00e450a04b8d))
346
+
347
+
348
+
349
+
350
+
351
+ # [0.6.0](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.5.4...@mux/mux-video-react@0.6.0) (2022-10-05)
352
+
353
+ ### Bug Fixes
354
+
355
+ - allow autoplay to change in mux-video-react, fixes [#396](https://github.com/muxinc/elements/issues/396) ([bf4ceb0](https://github.com/muxinc/elements/commit/bf4ceb051b7f656145826a460652820fce36c1d6))
356
+ - preload playback core change ([15313ea](https://github.com/muxinc/elements/commit/15313eaad81f748b5853a0fdaabfe141963f885e))
357
+
358
+ ### Features
359
+
360
+ - add `prefer-playback` attribute ([#402](https://github.com/muxinc/elements/issues/402)) ([8da36d6](https://github.com/muxinc/elements/commit/8da36d6b597ddbc4ae006873fee13a971b7ec2f3))
361
+
362
+ ## [0.5.4](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.5.3...@mux/mux-video-react@0.5.4) (2022-09-16)
363
+
364
+ **Note:** Version bump only for package @mux/mux-video-react
365
+
366
+ ## [0.5.3](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.5.2...@mux/mux-video-react@0.5.3) (2022-09-01)
367
+
368
+ ### Bug Fixes
369
+
370
+ - cjs main entrypoint for React pkgs ([#360](https://github.com/muxinc/elements/issues/360)) ([473875f](https://github.com/muxinc/elements/commit/473875f4869a6ab9b04b44a90cc52b620a15ac83))
371
+
372
+ ## [0.5.2](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.5.1...@mux/mux-video-react@0.5.2) (2022-08-31)
373
+
374
+ **Note:** Version bump only for package @mux/mux-video-react
375
+
376
+ ## [0.5.1](https://github.com/muxinc/elements/compare/@mux/mux-video-react@0.5.0...@mux/mux-video-react@0.5.1) (2022-07-21)
377
+
378
+ **Note:** Version bump only for package @mux/mux-video-react
379
+
380
+ # 0.5.0 (2022-07-05)
381
+
382
+ ### Bug Fixes
383
+
384
+ - **mux-video-react:** use generateInitTime() instead of Date.now. ([0f159c2](https://github.com/muxinc/elements/commit/0f159c233244404faec13e61f1dbbd8b7c4adc81))
385
+ - prettier format all elements files ([741d607](https://github.com/muxinc/elements/commit/741d607521ca9578cfad9f0a9216a6565b4c56a1))
386
+ - switch cjs extension to .cjs.js ([30e83c3](https://github.com/muxinc/elements/commit/30e83c3ce0bd9bfda4817c30ffe0921e425619e4))
387
+ - update react peerDependencies to allow ^18 ([1cfb019](https://github.com/muxinc/elements/commit/1cfb019b71cf9aa280abccaf4a7818d585b56d86))
388
+
389
+ ### Features
390
+
391
+ - add beaconCollectionDomain option to replace beaconDomain ([a44b699](https://github.com/muxinc/elements/commit/a44b699ae3138590b9d953f693f95971694658df))
392
+ - Extended autoplay options ([#116](https://github.com/muxinc/elements/issues/116)) ([475e838](https://github.com/muxinc/elements/commit/475e83884f641c578fa601c9501147d485fc1831))
393
+
394
+ ## [0.4.12](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.11...@mux-elements/mux-video-react@0.4.12) (2022-06-23)
395
+
396
+ **Note:** Version bump only for package @mux-elements/mux-video-react
397
+
398
+ ## [0.4.11](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.10...@mux-elements/mux-video-react@0.4.11) (2022-06-06)
399
+
400
+ **Note:** Version bump only for package @mux-elements/mux-video-react
401
+
402
+ ## [0.4.10](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.9...@mux-elements/mux-video-react@0.4.10) (2022-05-26)
403
+
404
+ **Note:** Version bump only for package @mux-elements/mux-video-react
405
+
406
+ ## [0.4.9](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.8...@mux-elements/mux-video-react@0.4.9) (2022-05-23)
407
+
408
+ **Note:** Version bump only for package @mux-elements/mux-video-react
409
+
410
+ ## [0.4.8](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.7...@mux-elements/mux-video-react@0.4.8) (2022-05-20)
411
+
412
+ ### Bug Fixes
413
+
414
+ - switch cjs extension to .cjs.js ([30e83c3](https://github.com/muxinc/elements/commit/30e83c3ce0bd9bfda4817c30ffe0921e425619e4))
415
+
416
+ ## [0.4.7](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.6...@mux-elements/mux-video-react@0.4.7) (2022-05-10)
417
+
418
+ **Note:** Version bump only for package @mux-elements/mux-video-react
419
+
420
+ ## [0.4.6](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.5...@mux-elements/mux-video-react@0.4.6) (2022-05-03)
421
+
422
+ **Note:** Version bump only for package @mux-elements/mux-video-react
423
+
424
+ ## [0.4.5](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.4...@mux-elements/mux-video-react@0.4.5) (2022-04-22)
425
+
426
+ **Note:** Version bump only for package @mux-elements/mux-video-react
427
+
428
+ ## [0.4.4](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.3...@mux-elements/mux-video-react@0.4.4) (2022-04-18)
429
+
430
+ **Note:** Version bump only for package @mux-elements/mux-video-react
431
+
432
+ ## [0.4.3](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.2...@mux-elements/mux-video-react@0.4.3) (2022-04-12)
433
+
434
+ **Note:** Version bump only for package @mux-elements/mux-video-react
435
+
436
+ ## [0.4.2](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.1...@mux-elements/mux-video-react@0.4.2) (2022-04-01)
437
+
438
+ **Note:** Version bump only for package @mux-elements/mux-video-react
439
+
440
+ ## [0.4.1](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.4.0...@mux-elements/mux-video-react@0.4.1) (2022-03-29)
441
+
442
+ **Note:** Version bump only for package @mux-elements/mux-video-react
443
+
444
+ # [0.4.0](https://github.com/muxinc/elements/compare/@mux-elements/mux-video-react@0.3.0...@mux-elements/mux-video-react@0.4.0) (2022-03-28)
445
+
446
+ ### Bug Fixes
447
+
448
+ - **mux-video-react:** use generateInitTime() instead of Date.now. ([0f159c2](https://github.com/muxinc/elements/commit/0f159c233244404faec13e61f1dbbd8b7c4adc81))
449
+ - prettier format all elements files ([741d607](https://github.com/muxinc/elements/commit/741d607521ca9578cfad9f0a9216a6565b4c56a1))
450
+
451
+ ### Features
452
+
453
+ - add beaconCollectionDomain option to replace beaconDomain ([a44b699](https://github.com/muxinc/elements/commit/a44b699ae3138590b9d953f693f95971694658df))
package/dist/cjs.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "inputs": {
3
+ "src/use-combined-refs.ts": {
4
+ "bytes": 845,
5
+ "imports": [
6
+ {
7
+ "path": "react",
8
+ "kind": "import-statement",
9
+ "external": true
10
+ }
11
+ ],
12
+ "format": "esm"
13
+ },
14
+ "src/env.ts": {
15
+ "bytes": 391,
16
+ "imports": [],
17
+ "format": "esm"
18
+ },
19
+ "src/index.tsx": {
20
+ "bytes": 3888,
21
+ "imports": [
22
+ {
23
+ "path": "src/use-combined-refs.ts",
24
+ "kind": "import-statement",
25
+ "original": "./use-combined-refs"
26
+ },
27
+ {
28
+ "path": "react",
29
+ "kind": "import-statement",
30
+ "external": true
31
+ },
32
+ {
33
+ "path": "prop-types",
34
+ "kind": "import-statement",
35
+ "external": true
36
+ },
37
+ {
38
+ "path": "@mux/playback-core",
39
+ "kind": "import-statement",
40
+ "external": true
41
+ },
42
+ {
43
+ "path": "src/env.ts",
44
+ "kind": "import-statement",
45
+ "original": "./env"
46
+ }
47
+ ],
48
+ "format": "esm"
49
+ }
50
+ },
51
+ "outputs": {
52
+ "dist/index.cjs.js.map": {
53
+ "imports": [],
54
+ "exports": [],
55
+ "inputs": {},
56
+ "bytes": 8695
57
+ },
58
+ "dist/index.cjs.js": {
59
+ "imports": [
60
+ {
61
+ "path": "react",
62
+ "kind": "require-call",
63
+ "external": true
64
+ },
65
+ {
66
+ "path": "react",
67
+ "kind": "require-call",
68
+ "external": true
69
+ },
70
+ {
71
+ "path": "prop-types",
72
+ "kind": "require-call",
73
+ "external": true
74
+ },
75
+ {
76
+ "path": "@mux/playback-core",
77
+ "kind": "require-call",
78
+ "external": true
79
+ }
80
+ ],
81
+ "exports": [],
82
+ "entryPoint": "src/index.tsx",
83
+ "inputs": {
84
+ "src/index.tsx": {
85
+ "bytesInOutput": 2161
86
+ },
87
+ "src/use-combined-refs.ts": {
88
+ "bytesInOutput": 170
89
+ },
90
+ "src/env.ts": {
91
+ "bytesInOutput": 68
92
+ }
93
+ },
94
+ "bytes": 3021
95
+ }
96
+ }
97
+ }
package/dist/esm.json ADDED
@@ -0,0 +1,101 @@
1
+ {
2
+ "inputs": {
3
+ "src/use-combined-refs.ts": {
4
+ "bytes": 845,
5
+ "imports": [
6
+ {
7
+ "path": "react",
8
+ "kind": "import-statement",
9
+ "external": true
10
+ }
11
+ ],
12
+ "format": "esm"
13
+ },
14
+ "src/env.ts": {
15
+ "bytes": 391,
16
+ "imports": [],
17
+ "format": "esm"
18
+ },
19
+ "src/index.tsx": {
20
+ "bytes": 3888,
21
+ "imports": [
22
+ {
23
+ "path": "src/use-combined-refs.ts",
24
+ "kind": "import-statement",
25
+ "original": "./use-combined-refs"
26
+ },
27
+ {
28
+ "path": "react",
29
+ "kind": "import-statement",
30
+ "external": true
31
+ },
32
+ {
33
+ "path": "prop-types",
34
+ "kind": "import-statement",
35
+ "external": true
36
+ },
37
+ {
38
+ "path": "@mux/playback-core",
39
+ "kind": "import-statement",
40
+ "external": true
41
+ },
42
+ {
43
+ "path": "src/env.ts",
44
+ "kind": "import-statement",
45
+ "original": "./env"
46
+ }
47
+ ],
48
+ "format": "esm"
49
+ }
50
+ },
51
+ "outputs": {
52
+ "dist/index.mjs.map": {
53
+ "imports": [],
54
+ "exports": [],
55
+ "inputs": {},
56
+ "bytes": 8845
57
+ },
58
+ "dist/index.mjs": {
59
+ "imports": [
60
+ {
61
+ "path": "react",
62
+ "kind": "import-statement",
63
+ "external": true
64
+ },
65
+ {
66
+ "path": "react",
67
+ "kind": "import-statement",
68
+ "external": true
69
+ },
70
+ {
71
+ "path": "prop-types",
72
+ "kind": "import-statement",
73
+ "external": true
74
+ },
75
+ {
76
+ "path": "@mux/playback-core",
77
+ "kind": "import-statement",
78
+ "external": true
79
+ }
80
+ ],
81
+ "exports": [
82
+ "default",
83
+ "playerSoftwareName",
84
+ "playerSoftwareVersion"
85
+ ],
86
+ "entryPoint": "src/index.tsx",
87
+ "inputs": {
88
+ "src/use-combined-refs.ts": {
89
+ "bytesInOutput": 173
90
+ },
91
+ "src/index.tsx": {
92
+ "bytesInOutput": 1757
93
+ },
94
+ "src/env.ts": {
95
+ "bytesInOutput": 68
96
+ }
97
+ },
98
+ "bytes": 2119
99
+ }
100
+ }
101
+ }
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var k=Object.create;var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var H=(t,r)=>{for(var o in r)p(t,o,{get:r[o],enumerable:!0})},M=(t,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of S(r))!w.call(t,s)&&s!==o&&p(t,s,{get:()=>r[s],enumerable:!(c=j(r,s))||c.enumerable});return t};var O=(t,r,o)=>(o=t!=null?k(L(t)):{},M(r||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),I=t=>M(p({},"__esModule",{value:!0}),t);var W={};H(W,{default:()=>U});module.exports=I(W);var f=require("react"),P=(...t)=>{let r=(0,f.useRef)(null);return(0,f.useEffect)(()=>{t.forEach(o=>{o&&(typeof o=="function"?o(r.current):o.current=r.current)})},[t]),r};var a=O(require("react")),e=O(require("prop-types")),n=require("@mux/playback-core");var h=()=>{try{return"0.11.4"}catch{}return"UNKNOWN"},N=h(),g=()=>N;var A=g(),D="mux-video-react",y=a.default.forwardRef((t,r)=>{var R;let{playbackId:o,src:c,children:s,autoPlay:d,preload:m,...E}=t,x=Object.fromEntries(Object.entries(E).filter(([i])=>!Object.keys(y.propTypes).includes(i))),[C]=(0,a.useState)((0,n.generatePlayerInitTime)()),[b,v]=(0,a.useState)((R=(0,n.toMuxVideoURL)(t))!=null?R:c),l=(0,a.useRef)(void 0),V=(0,a.useRef)(null),T=P(V,r);return(0,a.useEffect)(()=>{var i;v((i=(0,n.toMuxVideoURL)(t))!=null?i:c)},[c,o]),(0,a.useEffect)(()=>{let i={...t,src:b,playerInitTime:C,playerSoftwareName:D,playerSoftwareVersion:A,autoplay:d},u=T.current;return u&&(l.current=(0,n.initialize)(i,u,l.current)),()=>{(0,n.teardown)(u,l.current),u=void 0,l.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=l.current)==null||i.setAutoplay(d)},[d]),(0,a.useEffect)(()=>{var i;(i=l.current)==null||i.setPreload(m)},[m]),a.default.createElement("video",{ref:T,...x},s)});y.propTypes={_hlsConfig:e.default.any,beaconCollectionDomain:e.default.string,customDomain:e.default.string,debug:e.default.bool,disableCookies:e.default.bool,disableTracking:e.default.bool,envKey:e.default.string,errorTranslator:e.default.any,liveEdgeStart:e.default.number,maxResolution:e.default.oneOf(["720p","1080p","1440p","2160p"]),metadata:e.default.any,minResolution:e.default.oneOf(["480p","540p","720p","1080p","1440p","2160p"]),playbackId:e.default.string,playerInitTime:e.default.number,preferCmcd:e.default.oneOf(Object.values(n.CmcdTypes)),preferPlayback:e.default.oneOf(Object.values(n.PlaybackTypes)),programStartTime:e.default.number,programEndTime:e.default.number,renditionOrder:e.default.oneOf(["desc"]),startTime:e.default.number,streamType:e.default.oneOf(Object.values(n.StreamTypes)),targetLiveWindow:e.default.number,tokens:e.default.any,type:e.default.oneOf(n.allMediaTypes)};var U=y;
1
+ "use strict";"use client";var S=Object.create;var l=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var h=(t,r)=>{for(var o in r)l(t,o,{get:r[o],enumerable:!0})},M=(t,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of w(r))!I.call(t,s)&&s!==o&&l(t,s,{get:()=>r[s],enumerable:!(c=L(r,s))||c.enumerable});return t};var O=(t,r,o)=>(o=t!=null?S(H(t)):{},M(r||!t||!t.__esModule?l(o,"default",{value:t,enumerable:!0}):o,t)),N=t=>M(l({},"__esModule",{value:!0}),t);var W={};h(W,{default:()=>U,playerSoftwareName:()=>E,playerSoftwareVersion:()=>k});module.exports=N(W);var d=require("react"),P=(...t)=>{let r=(0,d.useRef)(null);return(0,d.useEffect)(()=>{t.forEach(o=>{o&&(typeof o=="function"?o(r.current):o.current=r.current)})},[t]),r};var a=O(require("react")),e=O(require("prop-types")),n=require("@mux/playback-core");var A=()=>{try{return"0.12.0"}catch{}return"UNKNOWN"},D=A(),g=()=>D;var k=g(),E="mux-video-react",m=a.default.forwardRef((t,r)=>{var R;let{playbackId:o,src:c,children:s,autoPlay:f,preload:y,tokens:_,playbackToken:K,drmToken:z,...x}=t,C=Object.fromEntries(Object.entries(x).filter(([i])=>!Object.keys(m.propTypes).includes(i))),[v]=(0,a.useState)((0,n.generatePlayerInitTime)()),[b,V]=(0,a.useState)((R=(0,n.toMuxVideoURL)(t))!=null?R:c),p=(0,a.useRef)(void 0),j=(0,a.useRef)(null),T=P(j,r);return(0,a.useEffect)(()=>{var i;V((i=(0,n.toMuxVideoURL)(t))!=null?i:c)},[c,o]),(0,a.useEffect)(()=>{let i={...t,src:b,playerInitTime:v,playerSoftwareName:E,playerSoftwareVersion:k,autoplay:f},u=T.current;return u&&(p.current=(0,n.initialize)(i,u,p.current)),()=>{(0,n.teardown)(u,p.current),u=void 0,p.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=p.current)==null||i.setAutoplay(f)},[f]),(0,a.useEffect)(()=>{var i;(i=p.current)==null||i.setPreload(y)},[y]),a.default.createElement("video",{ref:T,...C},s)});m.propTypes={_hlsConfig:e.default.any,beaconCollectionDomain:e.default.string,customDomain:e.default.string,debug:e.default.bool,disableCookies:e.default.bool,disableTracking:e.default.bool,drmToken:e.default.string,envKey:e.default.string,errorTranslator:e.default.func,liveEdgeStart:e.default.number,maxResolution:e.default.oneOf(["720p","1080p","1440p","2160p"]),metadata:e.default.any,minResolution:e.default.oneOf(["480p","540p","720p","1080p","1440p","2160p"]),playbackId:e.default.string,playbackToken:e.default.string,playerInitTime:e.default.number,preferCmcd:e.default.oneOf(Object.values(n.CmcdTypes)),preferPlayback:e.default.oneOf(Object.values(n.PlaybackTypes)),programStartTime:e.default.number,programEndTime:e.default.number,assetStartTime:e.default.number,assetEndTime:e.default.number,renditionOrder:e.default.oneOf(["desc"]),startTime:e.default.number,streamType:e.default.oneOf(Object.values(n.StreamTypes)),targetLiveWindow:e.default.number,tokens:e.default.object,type:e.default.oneOf(n.allMediaTypes)};var U=m;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.tsx", "../src/use-combined-refs.ts", "../src/env.ts"],
4
- "sourcesContent": ["'use client';\n\nimport { useCombinedRefs } from './use-combined-refs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n allMediaTypes,\n initialize,\n teardown,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n generatePlayerInitTime,\n CmcdTypes,\n} from '@mux/playback-core';\nimport type { PlaybackCore } from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n\nexport type Props = Omit<\n React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-video-react';\n\nconst MuxVideo = React.forwardRef<HTMLVideoElement | undefined, Partial<Props>>((props, ref) => {\n const { playbackId, src: outerSrc, children, autoPlay, preload, ...restProps } = props;\n\n const nativeVideoProps = Object.fromEntries(\n Object.entries(restProps).filter(([key]) => !Object.keys(MuxVideo.propTypes as any).includes(key))\n );\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(props) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLVideoElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(props) ?? outerSrc);\n }, [outerSrc, playbackId]);\n\n useEffect(() => {\n const propsWithState = {\n ...props,\n src,\n playerInitTime,\n playerSoftwareName,\n playerSoftwareVersion,\n autoplay: autoPlay,\n };\n\n // mediaEl required caching here so the ref was not null in the unmount callback.\n let mediaEl = mediaElRef.current;\n if (mediaEl) {\n playbackCoreRef.current = initialize(propsWithState, mediaEl, playbackCoreRef.current);\n }\n\n return () => {\n teardown(mediaEl, playbackCoreRef.current);\n mediaEl = undefined;\n playbackCoreRef.current = undefined;\n };\n }, [src]);\n\n useEffect(() => {\n playbackCoreRef.current?.setAutoplay(autoPlay);\n }, [autoPlay]);\n\n useEffect(() => {\n playbackCoreRef.current?.setPreload(preload);\n }, [preload]);\n\n return (\n /** @TODO Fix types relationships (CJP) */\n <video ref={mediaElRef as typeof innerMediaElRef} {...nativeVideoProps}>\n {children}\n </video>\n );\n});\n\nMuxVideo.propTypes = {\n _hlsConfig: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n customDomain: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n disableTracking: PropTypes.bool,\n envKey: PropTypes.string,\n errorTranslator: PropTypes.any,\n liveEdgeStart: PropTypes.number,\n maxResolution: PropTypes.oneOf(['720p', '1080p', '1440p', '2160p']),\n metadata: PropTypes.any,\n minResolution: PropTypes.oneOf(['480p', '540p', '720p', '1080p', '1440p', '2160p']),\n playbackId: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferCmcd: PropTypes.oneOf(Object.values(CmcdTypes)),\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n programStartTime: PropTypes.number,\n programEndTime: PropTypes.number,\n renditionOrder: PropTypes.oneOf(['desc']),\n startTime: PropTypes.number,\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n targetLiveWindow: PropTypes.number,\n tokens: PropTypes.any,\n type: PropTypes.oneOf(allMediaTypes),\n};\n\nexport default MuxVideo;\n", "'use client';\nimport { useEffect, useRef, MutableRefObject } from 'react';\n\ntype Maybe<T> = T | null | undefined;\ntype RefCb<T> = (instance: Maybe<T>) => void;\ntype RefObj<T> = MutableRefObject<Maybe<T>>;\ntype RefTypes<T> = RefObj<T> | RefCb<T>;\ninterface useCombinedRefs {\n <T>(...refs: Maybe<RefTypes<T>>[]): RefObj<T>;\n}\n\nexport const useCombinedRefs: useCombinedRefs = (...refs) => {\n const targetRef = useRef(null);\n\n useEffect(() => {\n refs.forEach((ref) => {\n if (!ref) return;\n\n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n });\n }, [refs]);\n\n return targetRef;\n};\n\n// TS assumed default export was interface def instead of function value (CJP)\nconst defaultUseCombinedRefs = useCombinedRefs;\nexport default defaultUseCombinedRefs;\n", "export const isMaybeBrowser = () => typeof window != 'undefined';\n// @ts-ignore\nexport const isMaybeServer = () => typeof global != 'undefined';\n\nconst getEnvPlayerVersion = () => {\n try {\n // @ts-ignore\n return PLAYER_VERSION as string;\n } catch {}\n return 'UNKNOWN';\n};\n\nconst player_version: string = getEnvPlayerVersion();\n\nexport const getPlayerVersion = () => player_version;\n"],
5
- "mappings": "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",
6
- "names": ["src_exports", "__export", "src_default", "__toCommonJS", "import_react", "useCombinedRefs", "refs", "targetRef", "ref", "import_react", "import_prop_types", "import_playback_core", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "playerSoftwareVersion", "getPlayerVersion", "playerSoftwareName", "MuxVideo", "React", "props", "ref", "_a", "playbackId", "outerSrc", "children", "autoPlay", "preload", "restProps", "nativeVideoProps", "key", "playerInitTime", "src", "setSrc", "playbackCoreRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "propsWithState", "mediaEl", "PropTypes", "src_default"]
4
+ "sourcesContent": ["'use client';\n\nimport { useCombinedRefs } from './use-combined-refs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n allMediaTypes,\n initialize,\n teardown,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n generatePlayerInitTime,\n CmcdTypes,\n} from '@mux/playback-core';\nimport type { PlaybackCore } from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n\nexport type Props = Omit<\n React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nexport const playerSoftwareVersion = getPlayerVersion();\nexport const playerSoftwareName = 'mux-video-react';\n\nconst MuxVideo = React.forwardRef<HTMLVideoElement | undefined, Partial<Props>>((props, ref) => {\n const {\n playbackId,\n src: outerSrc,\n children,\n autoPlay,\n preload,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n tokens,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n playbackToken,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n drmToken,\n ...restProps\n } = props;\n\n const nativeVideoProps = Object.fromEntries(\n Object.entries(restProps).filter(([key]) => !Object.keys(MuxVideo.propTypes as any).includes(key))\n );\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(props) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLVideoElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(props) ?? outerSrc);\n }, [outerSrc, playbackId]);\n\n useEffect(() => {\n const propsWithState = {\n ...props,\n src,\n playerInitTime,\n playerSoftwareName,\n playerSoftwareVersion,\n autoplay: autoPlay,\n };\n\n // mediaEl required caching here so the ref was not null in the unmount callback.\n let mediaEl = mediaElRef.current;\n if (mediaEl) {\n playbackCoreRef.current = initialize(propsWithState, mediaEl, playbackCoreRef.current);\n }\n\n return () => {\n teardown(mediaEl, playbackCoreRef.current);\n mediaEl = undefined;\n playbackCoreRef.current = undefined;\n };\n }, [src]);\n\n useEffect(() => {\n playbackCoreRef.current?.setAutoplay(autoPlay);\n }, [autoPlay]);\n\n useEffect(() => {\n playbackCoreRef.current?.setPreload(preload);\n }, [preload]);\n\n return (\n /** @TODO Fix types relationships (CJP) */\n <video ref={mediaElRef as typeof innerMediaElRef} {...nativeVideoProps}>\n {children}\n </video>\n );\n});\n\nMuxVideo.propTypes = {\n _hlsConfig: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n customDomain: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n disableTracking: PropTypes.bool,\n drmToken: PropTypes.string,\n envKey: PropTypes.string,\n errorTranslator: PropTypes.func,\n liveEdgeStart: PropTypes.number,\n maxResolution: PropTypes.oneOf(['720p', '1080p', '1440p', '2160p']),\n metadata: PropTypes.any,\n minResolution: PropTypes.oneOf(['480p', '540p', '720p', '1080p', '1440p', '2160p']),\n playbackId: PropTypes.string,\n playbackToken: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferCmcd: PropTypes.oneOf(Object.values(CmcdTypes)),\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n programStartTime: PropTypes.number,\n programEndTime: PropTypes.number,\n assetStartTime: PropTypes.number,\n assetEndTime: PropTypes.number,\n renditionOrder: PropTypes.oneOf(['desc']),\n startTime: PropTypes.number,\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n targetLiveWindow: PropTypes.number,\n tokens: PropTypes.object,\n type: PropTypes.oneOf(allMediaTypes),\n};\n\nexport default MuxVideo;\n", "'use client';\nimport { useEffect, useRef, MutableRefObject } from 'react';\n\ntype Maybe<T> = T | null | undefined;\ntype RefCb<T> = (instance: Maybe<T>) => void;\ntype RefObj<T> = MutableRefObject<Maybe<T>>;\ntype RefTypes<T> = RefObj<T> | RefCb<T>;\ninterface useCombinedRefs {\n <T>(...refs: Maybe<RefTypes<T>>[]): RefObj<T>;\n}\n\nexport const useCombinedRefs: useCombinedRefs = (...refs) => {\n const targetRef = useRef(null);\n\n useEffect(() => {\n refs.forEach((ref) => {\n if (!ref) return;\n\n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n });\n }, [refs]);\n\n return targetRef;\n};\n\n// TS assumed default export was interface def instead of function value (CJP)\nconst defaultUseCombinedRefs = useCombinedRefs;\nexport default defaultUseCombinedRefs;\n", "export const isMaybeBrowser = () => typeof window != 'undefined';\n// @ts-ignore\nexport const isMaybeServer = () => typeof global != 'undefined';\n\nconst getEnvPlayerVersion = () => {\n try {\n // @ts-ignore\n return PLAYER_VERSION as string;\n } catch {}\n return 'UNKNOWN';\n};\n\nconst player_version: string = getEnvPlayerVersion();\n\nexport const getPlayerVersion = () => player_version;\n"],
5
+ "mappings": "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",
6
+ "names": ["src_exports", "__export", "src_default", "playerSoftwareName", "playerSoftwareVersion", "__toCommonJS", "import_react", "useCombinedRefs", "refs", "targetRef", "ref", "import_react", "import_prop_types", "import_playback_core", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "playerSoftwareVersion", "getPlayerVersion", "playerSoftwareName", "MuxVideo", "React", "props", "ref", "_a", "playbackId", "outerSrc", "children", "autoPlay", "preload", "tokens", "playbackToken", "drmToken", "restProps", "nativeVideoProps", "key", "playerInitTime", "src", "setSrc", "playbackCoreRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "propsWithState", "mediaEl", "PropTypes", "src_default"]
7
7
  }
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- "use client";import{useEffect as V,useRef as k}from"react";var m=(...r)=>{let a=k(null);return V(()=>{r.forEach(n=>{n&&(typeof n=="function"?n(a.current):n.current=a.current)})},[r]),a};import T,{useEffect as s,useRef as R,useState as M}from"react";import e from"prop-types";import{allMediaTypes as L,initialize as w,teardown as H,StreamTypes as I,PlaybackTypes as h,toMuxVideoURL as O,generatePlayerInitTime as N,CmcdTypes as A}from"@mux/playback-core";var j=()=>{try{return"0.11.4"}catch{}return"UNKNOWN"},S=j(),b=()=>S;var D=b(),U="mux-video-react",u=T.forwardRef((r,a)=>{var y;let{playbackId:n,src:c,children:P,autoPlay:l,preload:p,...g}=r,E=Object.fromEntries(Object.entries(g).filter(([t])=>!Object.keys(u.propTypes).includes(t))),[x]=M(N()),[f,C]=M((y=O(r))!=null?y:c),o=R(void 0),v=R(null),d=m(v,a);return s(()=>{var t;C((t=O(r))!=null?t:c)},[c,n]),s(()=>{let t={...r,src:f,playerInitTime:x,playerSoftwareName:U,playerSoftwareVersion:D,autoplay:l},i=d.current;return i&&(o.current=w(t,i,o.current)),()=>{H(i,o.current),i=void 0,o.current=void 0}},[f]),s(()=>{var t;(t=o.current)==null||t.setAutoplay(l)},[l]),s(()=>{var t;(t=o.current)==null||t.setPreload(p)},[p]),T.createElement("video",{ref:d,...E},P)});u.propTypes={_hlsConfig:e.any,beaconCollectionDomain:e.string,customDomain:e.string,debug:e.bool,disableCookies:e.bool,disableTracking:e.bool,envKey:e.string,errorTranslator:e.any,liveEdgeStart:e.number,maxResolution:e.oneOf(["720p","1080p","1440p","2160p"]),metadata:e.any,minResolution:e.oneOf(["480p","540p","720p","1080p","1440p","2160p"]),playbackId:e.string,playerInitTime:e.number,preferCmcd:e.oneOf(Object.values(A)),preferPlayback:e.oneOf(Object.values(h)),programStartTime:e.number,programEndTime:e.number,renditionOrder:e.oneOf(["desc"]),startTime:e.number,streamType:e.oneOf(Object.values(I)),targetLiveWindow:e.number,tokens:e.any,type:e.oneOf(L)};var Q=u;export{Q as default};
1
+ "use client";import{useEffect as v,useRef as V}from"react";var y=(...r)=>{let a=V(null);return v(()=>{r.forEach(n=>{n&&(typeof n=="function"?n(a.current):n.current=a.current)})},[r]),a};import T,{useEffect as s,useRef as R,useState as M}from"react";import e from"prop-types";import{allMediaTypes as L,initialize as w,teardown as H,StreamTypes as I,PlaybackTypes as h,toMuxVideoURL as O,generatePlayerInitTime as N,CmcdTypes as A}from"@mux/playback-core";var j=()=>{try{return"0.12.0"}catch{}return"UNKNOWN"},S=j(),b=()=>S;var D=b(),U="mux-video-react",u=T.forwardRef((r,a)=>{var m;let{playbackId:n,src:c,children:P,autoPlay:p,preload:l,tokens:W,playbackToken:_,drmToken:K,...g}=r,k=Object.fromEntries(Object.entries(g).filter(([t])=>!Object.keys(u.propTypes).includes(t))),[E]=M(N()),[d,x]=M((m=O(r))!=null?m:c),o=R(void 0),C=R(null),f=y(C,a);return s(()=>{var t;x((t=O(r))!=null?t:c)},[c,n]),s(()=>{let t={...r,src:d,playerInitTime:E,playerSoftwareName:U,playerSoftwareVersion:D,autoplay:p},i=f.current;return i&&(o.current=w(t,i,o.current)),()=>{H(i,o.current),i=void 0,o.current=void 0}},[d]),s(()=>{var t;(t=o.current)==null||t.setAutoplay(p)},[p]),s(()=>{var t;(t=o.current)==null||t.setPreload(l)},[l]),T.createElement("video",{ref:f,...k},P)});u.propTypes={_hlsConfig:e.any,beaconCollectionDomain:e.string,customDomain:e.string,debug:e.bool,disableCookies:e.bool,disableTracking:e.bool,drmToken:e.string,envKey:e.string,errorTranslator:e.func,liveEdgeStart:e.number,maxResolution:e.oneOf(["720p","1080p","1440p","2160p"]),metadata:e.any,minResolution:e.oneOf(["480p","540p","720p","1080p","1440p","2160p"]),playbackId:e.string,playbackToken:e.string,playerInitTime:e.number,preferCmcd:e.oneOf(Object.values(A)),preferPlayback:e.oneOf(Object.values(h)),programStartTime:e.number,programEndTime:e.number,assetStartTime:e.number,assetEndTime:e.number,renditionOrder:e.oneOf(["desc"]),startTime:e.number,streamType:e.oneOf(Object.values(I)),targetLiveWindow:e.number,tokens:e.object,type:e.oneOf(L)};var $=u;export{$ as default,U as playerSoftwareName,D as playerSoftwareVersion};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/use-combined-refs.ts", "../src/index.tsx", "../src/env.ts"],
4
- "sourcesContent": ["'use client';\nimport { useEffect, useRef, MutableRefObject } from 'react';\n\ntype Maybe<T> = T | null | undefined;\ntype RefCb<T> = (instance: Maybe<T>) => void;\ntype RefObj<T> = MutableRefObject<Maybe<T>>;\ntype RefTypes<T> = RefObj<T> | RefCb<T>;\ninterface useCombinedRefs {\n <T>(...refs: Maybe<RefTypes<T>>[]): RefObj<T>;\n}\n\nexport const useCombinedRefs: useCombinedRefs = (...refs) => {\n const targetRef = useRef(null);\n\n useEffect(() => {\n refs.forEach((ref) => {\n if (!ref) return;\n\n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n });\n }, [refs]);\n\n return targetRef;\n};\n\n// TS assumed default export was interface def instead of function value (CJP)\nconst defaultUseCombinedRefs = useCombinedRefs;\nexport default defaultUseCombinedRefs;\n", "'use client';\n\nimport { useCombinedRefs } from './use-combined-refs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n allMediaTypes,\n initialize,\n teardown,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n generatePlayerInitTime,\n CmcdTypes,\n} from '@mux/playback-core';\nimport type { PlaybackCore } from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n\nexport type Props = Omit<\n React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-video-react';\n\nconst MuxVideo = React.forwardRef<HTMLVideoElement | undefined, Partial<Props>>((props, ref) => {\n const { playbackId, src: outerSrc, children, autoPlay, preload, ...restProps } = props;\n\n const nativeVideoProps = Object.fromEntries(\n Object.entries(restProps).filter(([key]) => !Object.keys(MuxVideo.propTypes as any).includes(key))\n );\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(props) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLVideoElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(props) ?? outerSrc);\n }, [outerSrc, playbackId]);\n\n useEffect(() => {\n const propsWithState = {\n ...props,\n src,\n playerInitTime,\n playerSoftwareName,\n playerSoftwareVersion,\n autoplay: autoPlay,\n };\n\n // mediaEl required caching here so the ref was not null in the unmount callback.\n let mediaEl = mediaElRef.current;\n if (mediaEl) {\n playbackCoreRef.current = initialize(propsWithState, mediaEl, playbackCoreRef.current);\n }\n\n return () => {\n teardown(mediaEl, playbackCoreRef.current);\n mediaEl = undefined;\n playbackCoreRef.current = undefined;\n };\n }, [src]);\n\n useEffect(() => {\n playbackCoreRef.current?.setAutoplay(autoPlay);\n }, [autoPlay]);\n\n useEffect(() => {\n playbackCoreRef.current?.setPreload(preload);\n }, [preload]);\n\n return (\n /** @TODO Fix types relationships (CJP) */\n <video ref={mediaElRef as typeof innerMediaElRef} {...nativeVideoProps}>\n {children}\n </video>\n );\n});\n\nMuxVideo.propTypes = {\n _hlsConfig: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n customDomain: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n disableTracking: PropTypes.bool,\n envKey: PropTypes.string,\n errorTranslator: PropTypes.any,\n liveEdgeStart: PropTypes.number,\n maxResolution: PropTypes.oneOf(['720p', '1080p', '1440p', '2160p']),\n metadata: PropTypes.any,\n minResolution: PropTypes.oneOf(['480p', '540p', '720p', '1080p', '1440p', '2160p']),\n playbackId: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferCmcd: PropTypes.oneOf(Object.values(CmcdTypes)),\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n programStartTime: PropTypes.number,\n programEndTime: PropTypes.number,\n renditionOrder: PropTypes.oneOf(['desc']),\n startTime: PropTypes.number,\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n targetLiveWindow: PropTypes.number,\n tokens: PropTypes.any,\n type: PropTypes.oneOf(allMediaTypes),\n};\n\nexport default MuxVideo;\n", "export const isMaybeBrowser = () => typeof window != 'undefined';\n// @ts-ignore\nexport const isMaybeServer = () => typeof global != 'undefined';\n\nconst getEnvPlayerVersion = () => {\n try {\n // @ts-ignore\n return PLAYER_VERSION as string;\n } catch {}\n return 'UNKNOWN';\n};\n\nconst player_version: string = getEnvPlayerVersion();\n\nexport const getPlayerVersion = () => player_version;\n"],
5
- "mappings": "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",
6
- "names": ["useEffect", "useRef", "useCombinedRefs", "refs", "targetRef", "ref", "React", "useEffect", "useRef", "useState", "PropTypes", "allMediaTypes", "initialize", "teardown", "StreamTypes", "PlaybackTypes", "toMuxVideoURL", "generatePlayerInitTime", "CmcdTypes", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "playerSoftwareVersion", "getPlayerVersion", "playerSoftwareName", "MuxVideo", "React", "props", "ref", "_a", "playbackId", "outerSrc", "children", "autoPlay", "preload", "restProps", "nativeVideoProps", "key", "playerInitTime", "useState", "generatePlayerInitTime", "src", "setSrc", "toMuxVideoURL", "playbackCoreRef", "useRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "useEffect", "propsWithState", "mediaEl", "initialize", "teardown", "PropTypes", "CmcdTypes", "PlaybackTypes", "StreamTypes", "allMediaTypes", "src_default"]
4
+ "sourcesContent": ["'use client';\nimport { useEffect, useRef, MutableRefObject } from 'react';\n\ntype Maybe<T> = T | null | undefined;\ntype RefCb<T> = (instance: Maybe<T>) => void;\ntype RefObj<T> = MutableRefObject<Maybe<T>>;\ntype RefTypes<T> = RefObj<T> | RefCb<T>;\ninterface useCombinedRefs {\n <T>(...refs: Maybe<RefTypes<T>>[]): RefObj<T>;\n}\n\nexport const useCombinedRefs: useCombinedRefs = (...refs) => {\n const targetRef = useRef(null);\n\n useEffect(() => {\n refs.forEach((ref) => {\n if (!ref) return;\n\n if (typeof ref === 'function') {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n });\n }, [refs]);\n\n return targetRef;\n};\n\n// TS assumed default export was interface def instead of function value (CJP)\nconst defaultUseCombinedRefs = useCombinedRefs;\nexport default defaultUseCombinedRefs;\n", "'use client';\n\nimport { useCombinedRefs } from './use-combined-refs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n allMediaTypes,\n initialize,\n teardown,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n generatePlayerInitTime,\n CmcdTypes,\n} from '@mux/playback-core';\nimport type { PlaybackCore } from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n\nexport type Props = Omit<\n React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nexport const playerSoftwareVersion = getPlayerVersion();\nexport const playerSoftwareName = 'mux-video-react';\n\nconst MuxVideo = React.forwardRef<HTMLVideoElement | undefined, Partial<Props>>((props, ref) => {\n const {\n playbackId,\n src: outerSrc,\n children,\n autoPlay,\n preload,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n tokens,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n playbackToken,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n drmToken,\n ...restProps\n } = props;\n\n const nativeVideoProps = Object.fromEntries(\n Object.entries(restProps).filter(([key]) => !Object.keys(MuxVideo.propTypes as any).includes(key))\n );\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(props) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLVideoElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(props) ?? outerSrc);\n }, [outerSrc, playbackId]);\n\n useEffect(() => {\n const propsWithState = {\n ...props,\n src,\n playerInitTime,\n playerSoftwareName,\n playerSoftwareVersion,\n autoplay: autoPlay,\n };\n\n // mediaEl required caching here so the ref was not null in the unmount callback.\n let mediaEl = mediaElRef.current;\n if (mediaEl) {\n playbackCoreRef.current = initialize(propsWithState, mediaEl, playbackCoreRef.current);\n }\n\n return () => {\n teardown(mediaEl, playbackCoreRef.current);\n mediaEl = undefined;\n playbackCoreRef.current = undefined;\n };\n }, [src]);\n\n useEffect(() => {\n playbackCoreRef.current?.setAutoplay(autoPlay);\n }, [autoPlay]);\n\n useEffect(() => {\n playbackCoreRef.current?.setPreload(preload);\n }, [preload]);\n\n return (\n /** @TODO Fix types relationships (CJP) */\n <video ref={mediaElRef as typeof innerMediaElRef} {...nativeVideoProps}>\n {children}\n </video>\n );\n});\n\nMuxVideo.propTypes = {\n _hlsConfig: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n customDomain: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n disableTracking: PropTypes.bool,\n drmToken: PropTypes.string,\n envKey: PropTypes.string,\n errorTranslator: PropTypes.func,\n liveEdgeStart: PropTypes.number,\n maxResolution: PropTypes.oneOf(['720p', '1080p', '1440p', '2160p']),\n metadata: PropTypes.any,\n minResolution: PropTypes.oneOf(['480p', '540p', '720p', '1080p', '1440p', '2160p']),\n playbackId: PropTypes.string,\n playbackToken: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferCmcd: PropTypes.oneOf(Object.values(CmcdTypes)),\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n programStartTime: PropTypes.number,\n programEndTime: PropTypes.number,\n assetStartTime: PropTypes.number,\n assetEndTime: PropTypes.number,\n renditionOrder: PropTypes.oneOf(['desc']),\n startTime: PropTypes.number,\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n targetLiveWindow: PropTypes.number,\n tokens: PropTypes.object,\n type: PropTypes.oneOf(allMediaTypes),\n};\n\nexport default MuxVideo;\n", "export const isMaybeBrowser = () => typeof window != 'undefined';\n// @ts-ignore\nexport const isMaybeServer = () => typeof global != 'undefined';\n\nconst getEnvPlayerVersion = () => {\n try {\n // @ts-ignore\n return PLAYER_VERSION as string;\n } catch {}\n return 'UNKNOWN';\n};\n\nconst player_version: string = getEnvPlayerVersion();\n\nexport const getPlayerVersion = () => player_version;\n"],
5
+ "mappings": "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",
6
+ "names": ["useEffect", "useRef", "useCombinedRefs", "refs", "targetRef", "ref", "React", "useEffect", "useRef", "useState", "PropTypes", "allMediaTypes", "initialize", "teardown", "StreamTypes", "PlaybackTypes", "toMuxVideoURL", "generatePlayerInitTime", "CmcdTypes", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "playerSoftwareVersion", "getPlayerVersion", "playerSoftwareName", "MuxVideo", "React", "props", "ref", "_a", "playbackId", "outerSrc", "children", "autoPlay", "preload", "tokens", "playbackToken", "drmToken", "restProps", "nativeVideoProps", "key", "playerInitTime", "useState", "generatePlayerInitTime", "src", "setSrc", "toMuxVideoURL", "playbackCoreRef", "useRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "useEffect", "propsWithState", "mediaEl", "initialize", "teardown", "PropTypes", "CmcdTypes", "PlaybackTypes", "StreamTypes", "allMediaTypes", "src_default"]
7
7
  }
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.es2019.full.d.ts","../src/env.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../src/use-combined-refs.ts","../../../node_modules/mux-embed/dist/types/mux-embed.d.ts","../../playback-core/dist/types/errors.d.ts","../../../node_modules/hls.js/dist/hls.js.d.ts","../../playback-core/dist/types/types.d.ts","../../playback-core/dist/types/hls.d.ts","../../playback-core/dist/types/text-tracks.d.ts","../../playback-core/dist/types/pdt.d.ts","../../playback-core/dist/types/index.d.ts","../src/index.tsx"],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"4af6b0c727b7a2896463d512fafd23634229adf69ac7c00e2ae15a09cb084fad","affectsGlobalScope":true},{"version":"9c00a480825408b6a24c63c1b71362232927247595d7c97659bc24dc68ae0757","affectsGlobalScope":true},{"version":"0c9e4447ddca10e8097a736ce41bb37ac3389ede46e419ee78c1161a14e9e8ba","affectsGlobalScope":true},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"08f6861df84fba9719c14d5adc3ba40be9f0c687639e6c4df3c05b9301b8ff94",{"version":"1ee6056d39213c8481cc8af4adb2b1dc373e15e8b2b9864739e6c0b2da60cf1d","signature":"28f2af136cd97b7c5011ec7fd601841b37499ab89ecb7f1594b2903a9ce5b2aa"},{"version":"55461596dc873b866911ef4e640fae4c39da7ac1fbc7ef5e649cb2f2fb42c349","affectsGlobalScope":true},"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","247a952efd811d780e5630f8cfd76f495196f5fa74f6f0fee39ac8ba4a3c9800",{"version":"8117d2726c78497306ceef07b4ccd08a863a9bd6e1fd7ff9ed6332f0e49bbb1a","affectsGlobalScope":true},{"version":"e76fee63617bafd828eed3e4d4ae6ef5c4727dc9947ff9c4b5494b06ca9db015","signature":"405e223d3a5021ca1b76c68b32713c6df3bd17980a8474f85fd1bcbd0630268e"},{"version":"5b5c872830a799ebdd42d46b0554ac3ec447dda8e96cbe30e6f55dfabcf224b1","affectsGlobalScope":true},"de64daa4e510abaaf4b4970c6dd37e39c3b8a263cccbeb80a41c69ae5a2a34ba","92361bb81bc685fd927aa2c6131a0a5e5c5e4a4e3c22ea1c25ce0d18d81a0f03","e3c6c9289bac4af918020eb31bf014c424c4a8f20962470b4d60c8275e52cf23","c13fb8c7fdb84f3c59470c672220c380ac26ffb099721ccebba3c53971cb700d","19afd7f4812facaa313356113070795a2fe90fcef4bfe6462db0dcbc503c92f1","dccea7b665fe08ed006acd191a7e68123ba7ec49848ac7c28a164962bf21254e",{"version":"332432f1a8b3197b9fb0cdb22ad957d4b6cb793a6c86295dc5d548042fbff44a","affectsGlobalScope":true},{"version":"49fd87340586ed01a018b0adf0138ccebc2fdbf4097813978e73a5033cfd74e1","signature":"7cb70dfaabead0a4aa55be452af61db15292fef6cb6e430bface1c0853d828e8"}],"root":[42,47,56],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":5,"noImplicitAny":true,"outDir":"./types","rootDir":"../src","skipLibCheck":false,"sourceMap":true,"strict":true,"target":6},"fileIdsList":[[43,44,45],[42,45,46,47,55],[46],[50],[48,49,50,51,52,53,54],[51],[51,52],[48,49,50]],"referencedMap":[[46,1],[56,2],[47,3],[52,4],[55,5],[54,6],[53,7],[51,8]],"latestChangedDtsFile":"./types/index.d.ts"},"version":"5.5.4"}
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/typescript/lib/lib.es2019.full.d.ts","../src/env.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/react/index.d.ts","../src/use-combined-refs.ts","../../../node_modules/mux-embed/dist/types/mux-embed.d.ts","../../playback-core/dist/types/errors.d.ts","../../../node_modules/hls.js/dist/hls.js.d.ts","../../playback-core/dist/types/types.d.ts","../../playback-core/dist/types/hls.d.ts","../../playback-core/dist/types/text-tracks.d.ts","../../playback-core/dist/types/pdt.d.ts","../../playback-core/dist/types/util.d.ts","../../playback-core/dist/types/request-errors.d.ts","../../playback-core/dist/types/index.d.ts","../src/index.tsx"],"fileIdsList":[[43,44,45],[42,45,46,47,57],[46],[50],[48,49,50,51,52,53,54,55,56],[51],[49,50,51],[51,52],[48,49,50]],"fileInfos":[{"version":"44e584d4f6444f58791784f1d530875970993129442a847597db702a073ca68c","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"9e8ca8ed051c2697578c023d9c29d6df689a083561feba5c14aedee895853999","affectsGlobalScope":true,"impliedFormat":1},{"version":"69e65d976bf166ce4a9e6f6c18f94d2424bf116e90837ace179610dbccad9b42","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"6920e1448680767498a0b77c6a00a8e77d14d62c3da8967b171f1ddffa3c18e4","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"45d8ccb3dfd57355eb29749919142d4321a0aa4df6acdfc54e30433d7176600a","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true,"impliedFormat":1},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"08f6861df84fba9719c14d5adc3ba40be9f0c687639e6c4df3c05b9301b8ff94","impliedFormat":1},{"version":"1ee6056d39213c8481cc8af4adb2b1dc373e15e8b2b9864739e6c0b2da60cf1d","signature":"28f2af136cd97b7c5011ec7fd601841b37499ab89ecb7f1594b2903a9ce5b2aa"},{"version":"36a2e4c9a67439aca5f91bb304611d5ae6e20d420503e96c230cf8fcdc948d94","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"ed6b820c54de95b2510bb673490d61c7f2187f532a339d8d04981645a918961f","impliedFormat":1},{"version":"78e9a9dec8fcd712a2a775d8b67bf7d166c2fb06644bba3132f33dbef06db781","affectsGlobalScope":true,"impliedFormat":1},{"version":"e76fee63617bafd828eed3e4d4ae6ef5c4727dc9947ff9c4b5494b06ca9db015","signature":"405e223d3a5021ca1b76c68b32713c6df3bd17980a8474f85fd1bcbd0630268e"},{"version":"5b5c872830a799ebdd42d46b0554ac3ec447dda8e96cbe30e6f55dfabcf224b1","affectsGlobalScope":true,"impliedFormat":1},"e116f0c265fb804d67da5f1360d78edc5cdf37dd9e8ce08c8bd0c3829b7f66bd",{"version":"565754cab3838cf74fc46fc6eb98a76a5ee86396c571f6245f4c04d6575f8631","impliedFormat":1},"a1365a8c16e1c65a39d78bd2f6518368cfb7496b2f1de0832a3aa9165292123b","c13fb8c7fdb84f3c59470c672220c380ac26ffb099721ccebba3c53971cb700d","3be94ff5800bf4567d511f1d716237ef30f753ef916bf855209a7f4c2cd741e1","dccea7b665fe08ed006acd191a7e68123ba7ec49848ac7c28a164962bf21254e","f3b0f40a4bb983dddc80f47f172c8c1bcc5a18f38eae03d14431826f613bcad4","62f761999e69713bd78cc26873c6d17c3cbd43abbe41fbef437bf22d51ca9e4d",{"version":"b64ede7c3a5cba655077bb77692848394dc47530b67cf9e49b449dc4d71b8605","affectsGlobalScope":true},{"version":"141ef3fa057e8ef3811d9ee22ab14a87197c15bcaf4586b91d2029b6571775eb","signature":"fc8b17fe8a4d4910b4f3397dc9b5ae2a886fd156d06d5d766c1b00c50ecd9242"}],"root":[42,47,58],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":5,"noImplicitAny":true,"outDir":"./types","rootDir":"../src","skipLibCheck":false,"sourceMap":true,"strict":true,"target":6},"referencedMap":[[46,1],[58,2],[47,3],[52,4],[57,5],[54,6],[56,7],[53,8],[51,9],[55,6]],"latestChangedDtsFile":"./types/index.d.ts","version":"5.6.2"}
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { MuxMediaProps } from '@mux/playback-core';
3
3
  export type Props = Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'autoPlay'> & MuxMediaProps;
4
+ export declare const playerSoftwareVersion: string;
5
+ export declare const playerSoftwareName = "mux-video-react";
4
6
  declare const MuxVideo: React.ForwardRefExoticComponent<Omit<Partial<Props>, "ref"> & React.RefAttributes<HTMLVideoElement | undefined>>;
5
7
  export default MuxVideo;
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { MuxMediaProps } from '@mux/playback-core';
3
3
  export type Props = Pick<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, Exclude<keyof React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, 'autoPlay'>> & MuxMediaProps;
4
+ export declare const playerSoftwareVersion: string;
5
+ export declare const playerSoftwareName = "mux-video-react";
4
6
  declare const MuxVideo: React.ForwardRefExoticComponent<Pick<Partial<Props>, Exclude<keyof Partial<Props>, "ref">> & React.RefAttributes<HTMLVideoElement | undefined>>;
5
7
  export default MuxVideo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mux/mux-video-react",
3
- "version": "0.11.4",
3
+ "version": "0.12.0-canary.0-192aa79",
4
4
  "description": "A custom mux video element for React that Just Works™",
5
5
  "keywords": [
6
6
  "video",
@@ -27,9 +27,9 @@
27
27
  ".": {
28
28
  "import": "./dist/index.mjs",
29
29
  "require": "./dist/index.cjs.js",
30
- "default": "./dist/index.cjs.js",
31
30
  "types@<4.3.5": "./dist/types-ts3.4/index.d.ts",
32
- "types": "./dist/types/index.d.ts"
31
+ "types": "./dist/types/index.d.ts",
32
+ "default": "./dist/index.cjs.js"
33
33
  }
34
34
  },
35
35
  "types": "./dist/types/index.d.ts",
@@ -56,9 +56,9 @@
56
56
  "publish-release": "../../scripts/publish.sh"
57
57
  },
58
58
  "peerDependencies": {
59
- "@types/react": "^17.0.0 || ^18 || ^19",
60
- "react": "^17.0.2 || ^18 || ^19",
61
- "react-dom": "^17.0.2 || ^18 || ^19"
59
+ "@types/react": "^17.0.0 || ^17.0.0-0 || ^18 || ^18.0.0-0 || ^19 || ^19.0.0-0",
60
+ "react": "^17.0.2 || ^17.0.0-0 || ^18 || ^18.0.0-0 || ^19 || ^19.0.0-0",
61
+ "react-dom": "^17.0.2 || ^17.0.2-0 || ^18 || ^18.0.0-0 || ^19 || ^19.0.0-0"
62
62
  },
63
63
  "peerDependenciesMeta": {
64
64
  "@types/react": {
@@ -69,7 +69,7 @@
69
69
  }
70
70
  },
71
71
  "dependencies": {
72
- "@mux/playback-core": "0.26.0",
72
+ "@mux/playback-core": "0.27.0-canary.0-192aa79",
73
73
  "prop-types": "^15.7.2"
74
74
  },
75
75
  "devDependencies": {
@@ -86,6 +86,5 @@
86
86
  "react-dom": "^18.2.0",
87
87
  "shx": "^0.3.4",
88
88
  "typescript": "^5.5.4"
89
- },
90
- "gitHead": "5ae58b9de16ae2dcd807276bb6539c1f8cfab800"
89
+ }
91
90
  }
package/LICENSE DELETED
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Mux, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.