Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mux/mux-audio-react

Package Overview
Dependencies
Maintainers
0
Versions
556
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mux/mux-audio-react - npm Package Compare versions

Comparing version 0.10.3 to 0.10.4-canary.0-2577b78

CHANGELOG.md

2

dist/index.cjs.js

@@ -1,2 +0,2 @@

"use strict";"use client";var v=Object.create;var p=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var A=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,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of A(r))!w.call(t,s)&&s!==o&&p(t,s,{get:()=>r[s],enumerable:!(u=S(r,s))||u.enumerable});return t};var O=(t,r,o)=>(o=t!=null?v(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 V=()=>{try{return"0.10.3"}catch{}return"UNKNOWN"},h=V(),g=()=>h;var N=g(),D="mux-audio-react",y=a.default.forwardRef((t,r)=>{var R;let{playbackId:o,src:u,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,k]=(0,a.useState)((R=(0,n.toMuxVideoURL)(t))!=null?R:u),c=(0,a.useRef)(void 0),j=(0,a.useRef)(null),T=P(j,r);return(0,a.useEffect)(()=>{var i;k((i=(0,n.toMuxVideoURL)(t))!=null?i:u)},[u,o]),(0,a.useEffect)(()=>{let i={...t,src:b,playerInitTime:C,playerSoftwareName:D,playerSoftwareVersion:N,autoplay:d},l=T.current;return l&&(c.current=(0,n.initialize)(i,l,c.current)),()=>{(0,n.teardown)(l,c.current),l=void 0,c.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setAutoplay(d)},[d]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setPreload(m)},[m]),a.default.createElement("audio",{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)),programStartTime:e.default.number,programEndTime:e.default.number,preferPlayback:e.default.oneOf(Object.values(n.PlaybackTypes)),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;
"use strict";"use client";var v=Object.create;var p=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var A=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,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of A(r))!w.call(t,s)&&s!==o&&p(t,s,{get:()=>r[s],enumerable:!(u=S(r,s))||u.enumerable});return t};var O=(t,r,o)=>(o=t!=null?v(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 V=()=>{try{return"0.10.4"}catch{}return"UNKNOWN"},h=V(),g=()=>h;var N=g(),D="mux-audio-react",y=a.default.forwardRef((t,r)=>{var R;let{playbackId:o,src:u,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,k]=(0,a.useState)((R=(0,n.toMuxVideoURL)(t))!=null?R:u),c=(0,a.useRef)(void 0),j=(0,a.useRef)(null),T=P(j,r);return(0,a.useEffect)(()=>{var i;k((i=(0,n.toMuxVideoURL)(t))!=null?i:u)},[u,o]),(0,a.useEffect)(()=>{let i={...t,src:b,playerInitTime:C,playerSoftwareName:D,playerSoftwareVersion:N,autoplay:d},l=T.current;return l&&(c.current=(0,n.initialize)(i,l,c.current)),()=>{(0,n.teardown)(l,c.current),l=void 0,c.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setAutoplay(d)},[d]),(0,a.useEffect)(()=>{var i;(i=c.current)==null||i.setPreload(m)},[m]),a.default.createElement("audio",{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)),programStartTime:e.default.number,programEndTime:e.default.number,preferPlayback:e.default.oneOf(Object.values(n.PlaybackTypes)),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;
//# sourceMappingURL=index.cjs.js.map
{
"name": "@mux/mux-audio-react",
"version": "0.10.3",
"version": "0.10.4-canary.0-2577b78",
"description": "A custom mux audio element for React that Just Works™",

@@ -44,3 +44,3 @@ "keywords": [

"clean": "shx rm -rf dist/",
"lint": "eslint src/ --ext .js,.jsx,.ts,.tsx",
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint src/ --ext .js,.jsx,.ts,.tsx",
"dev:cjs": "yarn build:cjs --watch=forever",

@@ -72,3 +72,3 @@ "dev:esm": "yarn build:esm --watch=forever",

"dependencies": {
"@mux/playback-core": "0.25.2",
"@mux/playback-core": "0.26.0-canary.0-2577b78",
"prop-types": "^15.7.2"

@@ -80,7 +80,7 @@ },

"@types/react-dom": "^18.2.25",
"@typescript-eslint/eslint-plugin": "^5.48.0",
"@typescript-eslint/parser": "^5.48.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"downlevel-dts": "^0.11.0",
"esbuild": "^0.19.8",
"eslint": "^8.24.0",
"eslint": "^9.9.1",
"npm-run-all": "^4.1.5",

@@ -90,5 +90,4 @@ "react": "^18.2.0",

"shx": "^0.3.4",
"typescript": "^4.9.4"
},
"gitHead": "94210d8ddb22e9d15369329ced978781eebf3402"
"typescript": "^5.5.4"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc