@mux/mux-audio-react
Advanced tools
Comparing version 0.3.12-canary.4-935e7ae to 0.3.12-canary.5-1eb2c58
@@ -6,2 +6,16 @@ # Change Log | ||
# 0.4.0 (2022-07-05) | ||
### Bug Fixes | ||
- **mux-audio-react:** use generateInitTime() instead of Date.now. ([d60f98c](https://github.com/muxinc/elements/commit/d60f98c3f9d626c2a0cb656ccafbb21b4802ca13)) | ||
- prettier format all elements files ([741d607](https://github.com/muxinc/elements/commit/741d607521ca9578cfad9f0a9216a6565b4c56a1)) | ||
- switch cjs extension to .cjs.js ([30e83c3](https://github.com/muxinc/elements/commit/30e83c3ce0bd9bfda4817c30ffe0921e425619e4)) | ||
- update react peerDependencies to allow ^18 ([1cfb019](https://github.com/muxinc/elements/commit/1cfb019b71cf9aa280abccaf4a7818d585b56d86)) | ||
### Features | ||
- add beaconCollectionDomain option to replace beaconDomain ([a44b699](https://github.com/muxinc/elements/commit/a44b699ae3138590b9d953f693f95971694658df)) | ||
- Extended autoplay options ([#116](https://github.com/muxinc/elements/issues/116)) ([475e838](https://github.com/muxinc/elements/commit/475e83884f641c578fa601c9501147d485fc1831)) | ||
## [0.3.11](https://github.com/muxinc/elements/compare/@mux-elements/mux-audio-react@0.3.10...@mux-elements/mux-audio-react@0.3.11) (2022-06-23) | ||
@@ -8,0 +22,0 @@ |
@@ -1,2 +0,2 @@ | ||
var k=Object.create;var c=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var M=e=>c(e,"__esModule",{value:!0});var V=(e,t)=>{M(e);for(var o in t)c(e,o,{get:t[o],enumerable:!0})},N=(e,t,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!I.call(e,s)&&s!=="default"&&c(e,s,{get:()=>t[s],enumerable:!(o=j(t,s))||o.enumerable});return e},l=e=>N(M(c(e!=null?k(H(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);V(exports,{default:()=>_});var y=l(require("react")),U=(...e)=>{let t=(0,y.useRef)(null);return(0,y.useEffect)(()=>{e.forEach(o=>{!o||(typeof o=="function"?o(t.current):o.current=t.current)})},[e]),t},P=U;var r=l(require("react")),a=l(require("prop-types")),n=l(require("@mux/playback-core"));var h=()=>{try{return"0.3.12-canary.4-935e7ae"}catch{}return"UNKNOWN"},D=h(),g=()=>D;var K=g(),W="mux-audio-react",x=r.default.forwardRef((e,t)=>{var R;let{envKey:o,debug:s,beaconCollectionDomain:z,playbackId:f,preferMse:B,type:Y,streamType:q,startTime:F,src:d,children:E,autoPlay:i,...A}=e,[O]=(0,r.useState)((0,n.generatePlayerInitTime)()),[T,S]=(0,r.useState)((R=(0,n.toMuxVideoURL)(f))!=null?R:d),m=(0,r.useRef)(void 0),v=(0,r.useRef)(null),b=P(v,t),G=(0,r.useRef)(void 0),[C,L]=(0,r.useState)(()=>u=>{});return(0,r.useEffect)(()=>{var p;let u=(p=(0,n.toMuxVideoURL)(f))!=null?p:d;S(u)},[d,f]),(0,r.useEffect)(()=>{let u={...e,src:T,playerInitTime:O,playerSoftwareName:W,playerSoftwareVersion:K,autoplay:i},p=(0,n.initialize)(u,b.current,m.current);m.current=p,L(()=>(0,n.setupAutoplay)(b.current,i,m.current))},[T]),(0,r.useEffect)(()=>{C(i)},[i]),r.default.createElement("audio",{ref:b,...A},E)});x.propTypes={envKey:a.default.string,debug:a.default.bool,metadata:a.default.any,beaconCollectionDomain:a.default.string,playbackId:a.default.string,playerInitTime:a.default.number,preferMse:a.default.bool,type:a.default.oneOf(n.allMediaTypes),streamType:a.default.oneOf(Object.values(n.StreamTypes)),startTime:a.default.number};var _=x; | ||
var k=Object.create;var c=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty;var M=e=>c(e,"__esModule",{value:!0});var V=(e,t)=>{M(e);for(var o in t)c(e,o,{get:t[o],enumerable:!0})},N=(e,t,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of w(t))!I.call(e,s)&&s!=="default"&&c(e,s,{get:()=>t[s],enumerable:!(o=j(t,s))||o.enumerable});return e},l=e=>N(M(c(e!=null?k(H(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);V(exports,{default:()=>_});var y=l(require("react")),U=(...e)=>{let t=(0,y.useRef)(null);return(0,y.useEffect)(()=>{e.forEach(o=>{!o||(typeof o=="function"?o(t.current):o.current=t.current)})},[e]),t},P=U;var r=l(require("react")),a=l(require("prop-types")),n=l(require("@mux/playback-core"));var h=()=>{try{return"0.3.12-canary.5-1eb2c58"}catch{}return"UNKNOWN"},D=h(),g=()=>D;var K=g(),W="mux-audio-react",x=r.default.forwardRef((e,t)=>{var R;let{envKey:o,debug:s,beaconCollectionDomain:z,playbackId:f,preferMse:B,type:Y,streamType:q,startTime:F,src:d,children:E,autoPlay:i,...A}=e,[O]=(0,r.useState)((0,n.generatePlayerInitTime)()),[T,S]=(0,r.useState)((R=(0,n.toMuxVideoURL)(f))!=null?R:d),m=(0,r.useRef)(void 0),v=(0,r.useRef)(null),b=P(v,t),G=(0,r.useRef)(void 0),[C,L]=(0,r.useState)(()=>u=>{});return(0,r.useEffect)(()=>{var p;let u=(p=(0,n.toMuxVideoURL)(f))!=null?p:d;S(u)},[d,f]),(0,r.useEffect)(()=>{let u={...e,src:T,playerInitTime:O,playerSoftwareName:W,playerSoftwareVersion:K,autoplay:i},p=(0,n.initialize)(u,b.current,m.current);m.current=p,L(()=>(0,n.setupAutoplay)(b.current,i,m.current))},[T]),(0,r.useEffect)(()=>{C(i)},[i]),r.default.createElement("audio",{ref:b,...A},E)});x.propTypes={envKey:a.default.string,debug:a.default.bool,metadata:a.default.any,beaconCollectionDomain:a.default.string,playbackId:a.default.string,playerInitTime:a.default.number,preferMse:a.default.bool,type:a.default.oneOf(n.allMediaTypes),streamType:a.default.oneOf(Object.values(n.StreamTypes)),startTime:a.default.number};var _=x; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@mux/mux-audio-react", | ||
"version": "0.3.12-canary.4-935e7ae", | ||
"version": "0.3.12-canary.5-1eb2c58", | ||
"description": "A custom mux audio element for React that Just Works™", | ||
@@ -48,3 +48,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@mux/playback-core": "0.7.0", | ||
"@mux/playback-core": "0.8.0", | ||
"prop-types": "^15.7.2" | ||
@@ -51,0 +51,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46050
+ Added@mux/playback-core@0.8.0(transitive)
+ Addedhls.js@1.1.5(transitive)
+ Addedmux-embed@4.30.0(transitive)
Updated@mux/playback-core@0.8.0