@mux/mux-audio-react
Advanced tools
Comparing version 0.12.2-canary.8 to 0.15.2
@@ -1,2 +0,2 @@ | ||
"use strict";"use client";var L=Object.create;var l=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var h=(t,n)=>{for(var o in n)l(t,o,{get:n[o],enumerable:!0})},O=(t,n,o,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of I(n))!V.call(t,s)&&s!==o&&l(t,s,{get:()=>n[s],enumerable:!(u=w(n,s))||u.enumerable});return t};var P=(t,n,o)=>(o=t!=null?L(H(t)):{},O(n||!t||!t.__esModule?l(o,"default",{value:t,enumerable:!0}):o,t)),N=t=>O(l({},"__esModule",{value:!0}),t);var _={};h(_,{default:()=>W,generatePlayerInitTime:()=>r.generatePlayerInitTime,playerSoftwareName:()=>k,playerSoftwareVersion:()=>E});module.exports=N(_);var d=require("react"),g=(...t)=>{let n=(0,d.useRef)(null);return(0,d.useEffect)(()=>{t.forEach(o=>{o&&(typeof o=="function"?o(n.current):o.current=n.current)})},[t]),n};var a=P(require("react")),e=P(require("prop-types")),r=require("@mux/playback-core");var D=()=>{try{return"0.12.1"}catch{}return"UNKNOWN"},U=D(),x=()=>U;var E=x(),k="mux-audio-react";var m=a.default.forwardRef((t,n)=>{var R,M;let{playbackId:o,src:u,children:s,autoPlay:f,preload:y,tokens:K,playbackToken:z,...C}=t,j=Object.fromEntries(Object.entries(C).filter(([i])=>!Object.keys(m.propTypes).includes(i))),[S]=(0,a.useState)((R=t.playerInitTime)!=null?R:(0,r.generatePlayerInitTime)()),[b,v]=(0,a.useState)((M=(0,r.toMuxVideoURL)(t))!=null?M:u),c=(0,a.useRef)(void 0),A=(0,a.useRef)(null),T=g(A,n);return(0,a.useEffect)(()=>{var i;v((i=(0,r.toMuxVideoURL)(t))!=null?i:u)},[u,o]),(0,a.useEffect)(()=>{let i={playerInitTime:S,...t,src:b,playerSoftwareName:k,playerSoftwareVersion:E,autoplay:f},p=T.current;return p&&(c.current=(0,r.initialize)(i,p,c.current)),()=>{(0,r.teardown)(p,c.current),p=void 0,c.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setAutoplay(f)},[f]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setPreload(y)},[y]),a.default.createElement("audio",{ref:T,...j},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,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,playbackToken:e.default.string,playerInitTime:e.default.number,preferCmcd:e.default.oneOf(Object.values(r.CmcdTypes)),programStartTime:e.default.number,programEndTime:e.default.number,assetStartTime:e.default.number,assetEndTime:e.default.number,preferPlayback:e.default.oneOf(Object.values(r.PlaybackTypes)),renditionOrder:e.default.oneOf(["desc"]),startTime:e.default.number,streamType:e.default.oneOf(Object.values(r.StreamTypes)),targetLiveWindow:e.default.number,tokens:e.default.object,type:e.default.oneOf(r.allMediaTypes)};var W=m; | ||
"use strict";"use client";var L=Object.create;var l=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var h=(t,n)=>{for(var o in n)l(t,o,{get:n[o],enumerable:!0})},O=(t,n,o,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of I(n))!V.call(t,s)&&s!==o&&l(t,s,{get:()=>n[s],enumerable:!(u=w(n,s))||u.enumerable});return t};var P=(t,n,o)=>(o=t!=null?L(H(t)):{},O(n||!t||!t.__esModule?l(o,"default",{value:t,enumerable:!0}):o,t)),N=t=>O(l({},"__esModule",{value:!0}),t);var _={};h(_,{default:()=>W,generatePlayerInitTime:()=>r.generatePlayerInitTime,playerSoftwareName:()=>k,playerSoftwareVersion:()=>E});module.exports=N(_);var d=require("react"),g=(...t)=>{let n=(0,d.useRef)(null);return(0,d.useEffect)(()=>{t.forEach(o=>{o&&(typeof o=="function"?o(n.current):o.current=n.current)})},[t]),n};var a=P(require("react")),e=P(require("prop-types")),r=require("@mux/playback-core");var D=()=>{try{return"0.15.2"}catch{}return"UNKNOWN"},U=D(),x=()=>U;var E=x(),k="mux-audio-react";var m=a.default.forwardRef((t,n)=>{var R,M;let{playbackId:o,src:u,children:s,autoPlay:f,preload:y,tokens:K,playbackToken:z,...C}=t,j=Object.fromEntries(Object.entries(C).filter(([i])=>!Object.keys(m.propTypes).includes(i))),[S]=(0,a.useState)((R=t.playerInitTime)!=null?R:(0,r.generatePlayerInitTime)()),[b,v]=(0,a.useState)((M=(0,r.toMuxVideoURL)(t))!=null?M:u),c=(0,a.useRef)(void 0),A=(0,a.useRef)(null),T=g(A,n);return(0,a.useEffect)(()=>{var i;v((i=(0,r.toMuxVideoURL)(t))!=null?i:u)},[u,o]),(0,a.useEffect)(()=>{let i={playerInitTime:S,...t,src:b,playerSoftwareName:k,playerSoftwareVersion:E,autoplay:f},p=T.current;return p&&(c.current=(0,r.initialize)(i,p,c.current)),()=>{(0,r.teardown)(p,c.current),p=void 0,c.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setAutoplay(f)},[f]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setPreload(y)},[y]),a.default.createElement("audio",{ref:T,...j},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,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,playbackToken:e.default.string,playerInitTime:e.default.number,preferCmcd:e.default.oneOf(Object.values(r.CmcdTypes)),programStartTime:e.default.number,programEndTime:e.default.number,assetStartTime:e.default.number,assetEndTime:e.default.number,preferPlayback:e.default.oneOf(Object.values(r.PlaybackTypes)),renditionOrder:e.default.oneOf(["desc"]),startTime:e.default.number,streamType:e.default.oneOf(Object.values(r.StreamTypes)),targetLiveWindow:e.default.number,tokens:e.default.object,type:e.default.oneOf(r.allMediaTypes)};var W=m; | ||
//# sourceMappingURL=index.cjs.js.map |
{ | ||
"name": "@mux/mux-audio-react", | ||
"version": "0.12.2-canary.8", | ||
"version": "0.15.2", | ||
"description": "A custom mux audio element for React that Just Works™", | ||
@@ -69,3 +69,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@mux/playback-core": "0.28.1", | ||
"@mux/playback-core": "0.28.2", | ||
"prop-types": "^15.7.2" | ||
@@ -72,0 +72,0 @@ }, |
Sorry, the diff of this file is not supported yet
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
47421
+ Added@mux/playback-core@0.28.2(transitive)
- Removed@mux/playback-core@0.28.1(transitive)
Updated@mux/playback-core@0.28.2