@mux/mux-video-react 0.7.19 → 0.7.20-canary.0-bc2cd48

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,294 @@
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.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)
7
+
8
+ **Note:** Version bump only for package @mux/mux-video-react
9
+
10
+
11
+
12
+
13
+
14
+ ## [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)
15
+
16
+ **Note:** Version bump only for package @mux/mux-video-react
17
+
18
+
19
+
20
+
21
+
22
+ ## [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)
23
+
24
+ **Note:** Version bump only for package @mux/mux-video-react
25
+
26
+
27
+
28
+
29
+
30
+ ## [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)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * 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))
36
+
37
+
38
+
39
+
40
+
41
+ ## [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)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * **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)
47
+
48
+
49
+
50
+
51
+
52
+ ## [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)
53
+
54
+ **Note:** Version bump only for package @mux/mux-video-react
55
+
56
+
57
+
58
+
59
+
60
+ ## [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)
61
+
62
+ **Note:** Version bump only for package @mux/mux-video-react
63
+
64
+
65
+
66
+
67
+
68
+ ## [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)
69
+
70
+ **Note:** Version bump only for package @mux/mux-video-react
71
+
72
+
73
+
74
+
75
+
76
+ ## [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)
77
+
78
+ **Note:** Version bump only for package @mux/mux-video-react
79
+
80
+
81
+
82
+
83
+
84
+ ## [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)
85
+
86
+ **Note:** Version bump only for package @mux/mux-video-react
87
+
88
+
89
+
90
+
91
+
92
+ ## [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)
93
+
94
+ **Note:** Version bump only for package @mux/mux-video-react
95
+
96
+
97
+
98
+
99
+
100
+ ## [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)
101
+
102
+ **Note:** Version bump only for package @mux/mux-video-react
103
+
104
+
105
+
106
+
107
+
108
+ ## [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)
109
+
110
+
111
+ ### Bug Fixes
112
+
113
+ * update typedefs, disable skipLibChecks in tsconfig ([#601](https://github.com/muxinc/elements/issues/601)) ([1664aec](https://github.com/muxinc/elements/commit/1664aec20e4cf4a59779848b298d4504eef24080))
114
+
115
+
116
+
117
+
118
+
119
+ ## [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)
120
+
121
+ **Note:** Version bump only for package @mux/mux-video-react
122
+
123
+
124
+
125
+
126
+
127
+ ## [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)
128
+
129
+ **Note:** Version bump only for package @mux/mux-video-react
130
+
131
+
132
+
133
+
134
+
135
+ ## [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)
136
+
137
+ **Note:** Version bump only for package @mux/mux-video-react
138
+
139
+
140
+
141
+
142
+
143
+ ## [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)
144
+
145
+ **Note:** Version bump only for package @mux/mux-video-react
146
+
147
+
148
+
149
+
150
+
151
+ ## [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)
152
+
153
+
154
+ ### Bug Fixes
155
+
156
+ * MuxVideoReact memory leak ([c057099](https://github.com/muxinc/elements/commit/c057099bb344212c0afd5f938a92c893245423b4))
157
+
158
+
159
+
160
+
161
+
162
+ ## [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)
163
+
164
+ **Note:** Version bump only for package @mux/mux-video-react
165
+
166
+
167
+
168
+
169
+
170
+ ## [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)
171
+
172
+
173
+ ### Bug Fixes
174
+
175
+ * add async effect for loading media ([#492](https://github.com/muxinc/elements/issues/492)) ([d2b250a](https://github.com/muxinc/elements/commit/d2b250a2d86e4e6a4c17fc34196e6468c4fedf1f))
176
+
177
+
178
+
179
+
180
+
181
+ # [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)
182
+
183
+
184
+ ### Features
185
+
186
+ * **mux-video-react:** Add disable cookies prop. ([777db83](https://github.com/muxinc/elements/commit/777db8301e6bbb97ef542a05251b00e450a04b8d))
187
+
188
+
189
+
190
+
191
+
192
+ # [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)
193
+
194
+ ### Bug Fixes
195
+
196
+ - 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))
197
+ - preload playback core change ([15313ea](https://github.com/muxinc/elements/commit/15313eaad81f748b5853a0fdaabfe141963f885e))
198
+
199
+ ### Features
200
+
201
+ - add `prefer-playback` attribute ([#402](https://github.com/muxinc/elements/issues/402)) ([8da36d6](https://github.com/muxinc/elements/commit/8da36d6b597ddbc4ae006873fee13a971b7ec2f3))
202
+
203
+ ## [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)
204
+
205
+ **Note:** Version bump only for package @mux/mux-video-react
206
+
207
+ ## [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)
208
+
209
+ ### Bug Fixes
210
+
211
+ - cjs main entrypoint for React pkgs ([#360](https://github.com/muxinc/elements/issues/360)) ([473875f](https://github.com/muxinc/elements/commit/473875f4869a6ab9b04b44a90cc52b620a15ac83))
212
+
213
+ ## [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)
214
+
215
+ **Note:** Version bump only for package @mux/mux-video-react
216
+
217
+ ## [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)
218
+
219
+ **Note:** Version bump only for package @mux/mux-video-react
220
+
221
+ # 0.5.0 (2022-07-05)
222
+
223
+ ### Bug Fixes
224
+
225
+ - **mux-video-react:** use generateInitTime() instead of Date.now. ([0f159c2](https://github.com/muxinc/elements/commit/0f159c233244404faec13e61f1dbbd8b7c4adc81))
226
+ - prettier format all elements files ([741d607](https://github.com/muxinc/elements/commit/741d607521ca9578cfad9f0a9216a6565b4c56a1))
227
+ - switch cjs extension to .cjs.js ([30e83c3](https://github.com/muxinc/elements/commit/30e83c3ce0bd9bfda4817c30ffe0921e425619e4))
228
+ - update react peerDependencies to allow ^18 ([1cfb019](https://github.com/muxinc/elements/commit/1cfb019b71cf9aa280abccaf4a7818d585b56d86))
229
+
230
+ ### Features
231
+
232
+ - add beaconCollectionDomain option to replace beaconDomain ([a44b699](https://github.com/muxinc/elements/commit/a44b699ae3138590b9d953f693f95971694658df))
233
+ - Extended autoplay options ([#116](https://github.com/muxinc/elements/issues/116)) ([475e838](https://github.com/muxinc/elements/commit/475e83884f641c578fa601c9501147d485fc1831))
234
+
235
+ ## [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)
236
+
237
+ **Note:** Version bump only for package @mux-elements/mux-video-react
238
+
239
+ ## [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)
240
+
241
+ **Note:** Version bump only for package @mux-elements/mux-video-react
242
+
243
+ ## [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)
244
+
245
+ **Note:** Version bump only for package @mux-elements/mux-video-react
246
+
247
+ ## [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)
248
+
249
+ **Note:** Version bump only for package @mux-elements/mux-video-react
250
+
251
+ ## [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)
252
+
253
+ ### Bug Fixes
254
+
255
+ - switch cjs extension to .cjs.js ([30e83c3](https://github.com/muxinc/elements/commit/30e83c3ce0bd9bfda4817c30ffe0921e425619e4))
256
+
257
+ ## [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)
258
+
259
+ **Note:** Version bump only for package @mux-elements/mux-video-react
260
+
261
+ ## [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)
262
+
263
+ **Note:** Version bump only for package @mux-elements/mux-video-react
264
+
265
+ ## [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)
266
+
267
+ **Note:** Version bump only for package @mux-elements/mux-video-react
268
+
269
+ ## [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)
270
+
271
+ **Note:** Version bump only for package @mux-elements/mux-video-react
272
+
273
+ ## [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)
274
+
275
+ **Note:** Version bump only for package @mux-elements/mux-video-react
276
+
277
+ ## [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)
278
+
279
+ **Note:** Version bump only for package @mux-elements/mux-video-react
280
+
281
+ ## [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)
282
+
283
+ **Note:** Version bump only for package @mux-elements/mux-video-react
284
+
285
+ # [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)
286
+
287
+ ### Bug Fixes
288
+
289
+ - **mux-video-react:** use generateInitTime() instead of Date.now. ([0f159c2](https://github.com/muxinc/elements/commit/0f159c233244404faec13e61f1dbbd8b7c4adc81))
290
+ - prettier format all elements files ([741d607](https://github.com/muxinc/elements/commit/741d607521ca9578cfad9f0a9216a6565b4c56a1))
291
+
292
+ ### Features
293
+
294
+ - add beaconCollectionDomain option to replace beaconDomain ([a44b699](https://github.com/muxinc/elements/commit/a44b699ae3138590b9d953f693f95971694658df))
package/dist/cjs.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "inputs": {
3
+ "src/use-combined-refs.ts": {
4
+ "bytes": 831,
5
+ "imports": []
6
+ },
7
+ "src/env.ts": {
8
+ "bytes": 391,
9
+ "imports": []
10
+ },
11
+ "src/index.tsx": {
12
+ "bytes": 2846,
13
+ "imports": [
14
+ {
15
+ "path": "src/use-combined-refs.ts",
16
+ "kind": "import-statement"
17
+ },
18
+ {
19
+ "path": "src/env.ts",
20
+ "kind": "import-statement"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ "outputs": {
26
+ "dist/index.cjs.js.map": {
27
+ "imports": [],
28
+ "exports": [],
29
+ "inputs": {},
30
+ "bytes": 6822
31
+ },
32
+ "dist/index.cjs.js": {
33
+ "imports": [],
34
+ "exports": [],
35
+ "entryPoint": "src/index.tsx",
36
+ "inputs": {
37
+ "src/index.tsx": {
38
+ "bytesInOutput": 1363
39
+ },
40
+ "src/use-combined-refs.ts": {
41
+ "bytesInOutput": 171
42
+ },
43
+ "src/env.ts": {
44
+ "bytesInOutput": 68
45
+ }
46
+ },
47
+ "bytes": 2211
48
+ }
49
+ }
50
+ }
package/dist/esm.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "inputs": {
3
+ "src/use-combined-refs.ts": {
4
+ "bytes": 831,
5
+ "imports": []
6
+ },
7
+ "src/env.ts": {
8
+ "bytes": 391,
9
+ "imports": []
10
+ },
11
+ "src/index.tsx": {
12
+ "bytes": 2846,
13
+ "imports": [
14
+ {
15
+ "path": "src/use-combined-refs.ts",
16
+ "kind": "import-statement"
17
+ },
18
+ {
19
+ "path": "src/env.ts",
20
+ "kind": "import-statement"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ "outputs": {
26
+ "dist/index.mjs.map": {
27
+ "imports": [],
28
+ "exports": [],
29
+ "inputs": {},
30
+ "bytes": 7080
31
+ },
32
+ "dist/index.mjs": {
33
+ "imports": [],
34
+ "exports": [
35
+ "default"
36
+ ],
37
+ "entryPoint": "src/index.tsx",
38
+ "inputs": {
39
+ "src/use-combined-refs.ts": {
40
+ "bytesInOutput": 174
41
+ },
42
+ "src/index.tsx": {
43
+ "bytesInOutput": 1143
44
+ },
45
+ "src/env.ts": {
46
+ "bytesInOutput": 68
47
+ }
48
+ },
49
+ "bytes": 1442
50
+ }
51
+ }
52
+ }
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var v=Object.create;var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},R=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of S(t))!j.call(e,s)&&s!==r&&l(e,s,{get:()=>t[s],enumerable:!(c=k(t,s))||c.enumerable});return e};var M=(e,t,r)=>(r=e!=null?v(L(e)):{},R(t||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),H=e=>R(l({},"__esModule",{value:!0}),e);var D={};w(D,{default:()=>U});module.exports=H(D);var p=require("react"),P=(...e)=>{let t=(0,p.useRef)(null);return(0,p.useEffect)(()=>{e.forEach(r=>{!r||(typeof r=="function"?r(t.current):r.current=t.current)})},[e]),t};var n=M(require("react")),a=M(require("prop-types")),o=require("@mux/playback-core");var I=()=>{try{return"0.7.19"}catch{}return"UNKNOWN"},N=I(),x=()=>N;var h=x(),A="mux-video-react",E=n.default.forwardRef((e,t)=>{var T;let{playbackId:r,src:c,children:s,autoPlay:d,preload:y,streamType:K,...O}=e,[g]=(0,n.useState)((0,o.generatePlayerInitTime)()),[m,C]=(0,n.useState)((T=(0,o.toMuxVideoURL)(r))!=null?T:c),u=(0,n.useRef)(void 0),V=(0,n.useRef)(null),b=P(V,t);return(0,n.useEffect)(()=>{var i;C((i=(0,o.toMuxVideoURL)(r))!=null?i:c)},[c,r]),(0,n.useEffect)(()=>{let i={...e,src:m,playerInitTime:g,playerSoftwareName:A,playerSoftwareVersion:h,autoplay:d},f=b.current;return f&&(u.current=(0,o.initialize)(i,f,u.current)),()=>{(0,o.teardown)(f,u.current),f=void 0,u.current=void 0}},[m]),(0,n.useEffect)(()=>{var i;(i=u.current)==null||i.setAutoplay(d)},[d]),(0,n.useEffect)(()=>{var i;(i=u.current)==null||i.setPreload(y)},[y]),n.default.createElement("video",{ref:b,...O},s)});E.propTypes={envKey:a.default.string,debug:a.default.bool,disableCookies:a.default.bool,metadata:a.default.any,beaconCollectionDomain:a.default.string,playbackId:a.default.string,playerInitTime:a.default.number,preferPlayback:a.default.oneOf(Object.values(o.PlaybackTypes)),type:a.default.oneOf(o.allMediaTypes),streamType:a.default.oneOf(Object.values(o.StreamTypes)),startTime:a.default.number};var U=E;
1
+ "use strict";var v=Object.create;var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},R=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of S(t))!j.call(e,s)&&s!==r&&l(e,s,{get:()=>t[s],enumerable:!(c=k(t,s))||c.enumerable});return e};var M=(e,t,r)=>(r=e!=null?v(L(e)):{},R(t||!e||!e.__esModule?l(r,"default",{value:e,enumerable:!0}):r,e)),H=e=>R(l({},"__esModule",{value:!0}),e);var D={};w(D,{default:()=>U});module.exports=H(D);var p=require("react"),P=(...e)=>{let t=(0,p.useRef)(null);return(0,p.useEffect)(()=>{e.forEach(r=>{!r||(typeof r=="function"?r(t.current):r.current=t.current)})},[e]),t};var n=M(require("react")),a=M(require("prop-types")),o=require("@mux/playback-core");var I=()=>{try{return"0.7.20"}catch{}return"UNKNOWN"},N=I(),x=()=>N;var h=x(),A="mux-video-react",E=n.default.forwardRef((e,t)=>{var T;let{playbackId:r,src:c,children:s,autoPlay:d,preload:y,streamType:K,...O}=e,[g]=(0,n.useState)((0,o.generatePlayerInitTime)()),[m,C]=(0,n.useState)((T=(0,o.toMuxVideoURL)(r))!=null?T:c),u=(0,n.useRef)(void 0),V=(0,n.useRef)(null),b=P(V,t);return(0,n.useEffect)(()=>{var i;C((i=(0,o.toMuxVideoURL)(r))!=null?i:c)},[c,r]),(0,n.useEffect)(()=>{let i={...e,src:m,playerInitTime:g,playerSoftwareName:A,playerSoftwareVersion:h,autoplay:d},f=b.current;return f&&(u.current=(0,o.initialize)(i,f,u.current)),()=>{(0,o.teardown)(f,u.current),f=void 0,u.current=void 0}},[m]),(0,n.useEffect)(()=>{var i;(i=u.current)==null||i.setAutoplay(d)},[d]),(0,n.useEffect)(()=>{var i;(i=u.current)==null||i.setPreload(y)},[y]),n.default.createElement("video",{ref:b,...O},s)});E.propTypes={envKey:a.default.string,debug:a.default.bool,disableCookies:a.default.bool,metadata:a.default.any,beaconCollectionDomain:a.default.string,playbackId:a.default.string,playerInitTime:a.default.number,preferPlayback:a.default.oneOf(Object.values(o.PlaybackTypes)),type:a.default.oneOf(o.allMediaTypes),streamType:a.default.oneOf(Object.values(o.StreamTypes)),startTime:a.default.number};var U=E;
2
2
  //# sourceMappingURL=index.cjs.js.map
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{useEffect as V,useRef as v}from"react";var y=(...n)=>{let a=v(null);return V(()=>{n.forEach(r=>{!r||(typeof r=="function"?r(a.current):r.current=a.current)})},[n]),a};import b,{useEffect as s,useRef as T,useState as R}from"react";import e from"prop-types";import{allMediaTypes as L,initialize as j,teardown as w,StreamTypes as H,PlaybackTypes as I,toMuxVideoURL as M,generatePlayerInitTime as N}from"@mux/playback-core";var k=()=>{try{return"0.7.19"}catch{}return"UNKNOWN"},S=k(),m=()=>S;var h=m(),A="mux-video-react",P=b.forwardRef((n,a)=>{var d;let{playbackId:r,src:c,children:x,autoPlay:u,preload:f,streamType:U,...E}=n,[O]=R(N()),[l,g]=R((d=M(r))!=null?d:c),o=T(void 0),C=T(null),p=y(C,a);return s(()=>{var t;g((t=M(r))!=null?t:c)},[c,r]),s(()=>{let t={...n,src:l,playerInitTime:O,playerSoftwareName:A,playerSoftwareVersion:h,autoplay:u},i=p.current;return i&&(o.current=j(t,i,o.current)),()=>{w(i,o.current),i=void 0,o.current=void 0}},[l]),s(()=>{var t;(t=o.current)==null||t.setAutoplay(u)},[u]),s(()=>{var t;(t=o.current)==null||t.setPreload(f)},[f]),b.createElement("video",{ref:p,...E},x)});P.propTypes={envKey:e.string,debug:e.bool,disableCookies:e.bool,metadata:e.any,beaconCollectionDomain:e.string,playbackId:e.string,playerInitTime:e.number,preferPlayback:e.oneOf(Object.values(I)),type:e.oneOf(L),streamType:e.oneOf(Object.values(H)),startTime:e.number};var J=P;export{J as default};
1
+ import{useEffect as V,useRef as v}from"react";var y=(...n)=>{let a=v(null);return V(()=>{n.forEach(r=>{!r||(typeof r=="function"?r(a.current):r.current=a.current)})},[n]),a};import b,{useEffect as s,useRef as T,useState as R}from"react";import e from"prop-types";import{allMediaTypes as L,initialize as j,teardown as w,StreamTypes as H,PlaybackTypes as I,toMuxVideoURL as M,generatePlayerInitTime as N}from"@mux/playback-core";var k=()=>{try{return"0.7.20"}catch{}return"UNKNOWN"},S=k(),m=()=>S;var h=m(),A="mux-video-react",P=b.forwardRef((n,a)=>{var d;let{playbackId:r,src:c,children:x,autoPlay:u,preload:f,streamType:U,...E}=n,[O]=R(N()),[l,g]=R((d=M(r))!=null?d:c),o=T(void 0),C=T(null),p=y(C,a);return s(()=>{var t;g((t=M(r))!=null?t:c)},[c,r]),s(()=>{let t={...n,src:l,playerInitTime:O,playerSoftwareName:A,playerSoftwareVersion:h,autoplay:u},i=p.current;return i&&(o.current=j(t,i,o.current)),()=>{w(i,o.current),i=void 0,o.current=void 0}},[l]),s(()=>{var t;(t=o.current)==null||t.setAutoplay(u)},[u]),s(()=>{var t;(t=o.current)==null||t.setPreload(f)},[f]),b.createElement("video",{ref:p,...E},x)});P.propTypes={envKey:e.string,debug:e.bool,disableCookies:e.bool,metadata:e.any,beaconCollectionDomain:e.string,playbackId:e.string,playerInitTime:e.number,preferPlayback:e.oneOf(Object.values(I)),type:e.oneOf(L),streamType:e.oneOf(Object.values(H)),startTime:e.number};var J=P;export{J as default};
2
2
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,7 +1,14 @@
1
1
  {
2
2
  "name": "@mux/mux-video-react",
3
- "version": "0.7.19",
3
+ "version": "0.7.20-canary.0-bc2cd48",
4
4
  "description": "A custom mux video element for React that Just Works™",
5
+ "keywords": [
6
+ "video",
7
+ "mux",
8
+ "player",
9
+ "hls",
10
+ "react"
11
+ ],
5
12
  "main": "./dist/index.cjs.js",
6
13
  "module": "./dist/index.mjs",
7
14
  "typesVersions": {
@@ -62,7 +69,7 @@
62
69
  }
63
70
  },
64
71
  "dependencies": {
65
- "@mux/playback-core": "0.20.1",
72
+ "@mux/playback-core": "0.20.1-canary.0-bc2cd48",
66
73
  "prop-types": "^15.7.2"
67
74
  },
68
75
  "devDependencies": {
@@ -79,6 +86,5 @@
79
86
  "react-dom": "^17.0.2",
80
87
  "shx": "^0.3.4",
81
88
  "typescript": "^4.9.4"
82
- },
83
- "gitHead": "6871b2dbcd375b67a4f0c346504c2fb5c0ca1395"
89
+ }
84
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.