@mux/mux-audio-react 0.6.2 → 0.6.3

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/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var v=Object.create;var c=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var I=(e,t)=>{for(var r in t)c(e,r,{get:t[r],enumerable:!0})},M=(e,t,r,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of j(t))!H.call(e,s)&&s!==r&&c(e,s,{get:()=>t[s],enumerable:!(p=L(t,s))||p.enumerable});return e};var P=(e,t,r)=>(r=e!=null?v(w(e)):{},M(t||!e||!e.__esModule?c(r,"default",{value:e,enumerable:!0}):r,e)),V=e=>M(c({},"__esModule",{value:!0}),e);var W={};I(W,{default:()=>U});module.exports=V(W);var l=require("react"),x=(...e)=>{let t=(0,l.useRef)(null);return(0,l.useEffect)(()=>{e.forEach(r=>{!r||(typeof r=="function"?r(t.current):r.current=t.current)})},[e]),t};var o=P(require("react")),a=P(require("prop-types")),n=require("@mux/playback-core");var N=()=>{try{return"0.6.2"}catch{}return"UNKNOWN"},h=N(),g=()=>h;var D=g(),K="mux-audio-react",C=o.default.forwardRef((e,t)=>{var R;let{envKey:r,debug:p,beaconCollectionDomain:s,playbackId:f,preferPlayback:_,type:z,streamType:B,startTime:Y,src:y,children:E,autoPlay:d,preload:m,...O}=e,[k]=(0,o.useState)((0,n.generatePlayerInitTime)()),[T,A]=(0,o.useState)((R=(0,n.toMuxVideoURL)(f))!=null?R:y),u=(0,o.useRef)(void 0),S=(0,o.useRef)(null),b=x(S,t);return(0,o.useEffect)(()=>{var i;A((i=(0,n.toMuxVideoURL)(f))!=null?i:y)},[y,f]),(0,o.useEffect)(()=>{let i={...e,src:T,playerInitTime:k,playerSoftwareName:K,playerSoftwareVersion:D,autoplay:d};b.current&&(u.current=(0,n.initialize)(i,b.current,u.current))},[T]),(0,o.useEffect)(()=>{var i;(i=u.current)==null||i.setAutoplay(d)},[d]),(0,o.useEffect)(()=>{var i;(i=u.current)==null||i.setPreload(m)},[m]),o.default.createElement("audio",{ref:b,...O},E)});C.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(n.PlaybackTypes)),type:a.default.oneOf(n.allMediaTypes),streamType:a.default.oneOf(Object.values(n.StreamTypes)),startTime:a.default.number};var U=C;
1
+ "use strict";var A=Object.create;var l=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},R=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of L(t))!v.call(e,s)&&s!==r&&l(e,s,{get:()=>t[s],enumerable:!(u=S(t,s))||u.enumerable});return e};var M=(e,t,r)=>(r=e!=null?A(j(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.6.3"}catch{}return"UNKNOWN"},V=I(),x=()=>V;var N=x(),h="mux-audio-react",E=n.default.forwardRef((e,t)=>{var T;let{playbackId:r,src:u,children:s,autoPlay:d,preload:y,...O}=e,[g]=(0,n.useState)((0,o.generatePlayerInitTime)()),[b,C]=(0,n.useState)((T=(0,o.toMuxVideoURL)(r))!=null?T:u),c=(0,n.useRef)(void 0),k=(0,n.useRef)(null),m=P(k,t);return(0,n.useEffect)(()=>{var i;C((i=(0,o.toMuxVideoURL)(r))!=null?i:u)},[u,r]),(0,n.useEffect)(()=>{let i={...e,src:b,playerInitTime:g,playerSoftwareName:h,playerSoftwareVersion:N,autoplay:d},f=m.current;return f&&(c.current=(0,o.initialize)(i,f,c.current)),()=>{(0,o.teardown)(f,c.current),f=void 0,c.current=void 0}},[b]),(0,n.useEffect)(()=>{var i;(i=c.current)==null||i.setAutoplay(d)},[d]),(0,n.useEffect)(()=>{var i;(i=c.current)==null||i.setPreload(y)},[y]),n.default.createElement("audio",{ref:m,...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
@@ -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": ["import { useCombinedRefs } from './use-combined-refs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n allMediaTypes,\n initialize,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n generatePlayerInitTime,\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.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-audio-react';\n\nconst MuxAudio = React.forwardRef<HTMLAudioElement | undefined, Partial<Props>>((props, ref) => {\n const {\n envKey,\n debug,\n beaconCollectionDomain,\n playbackId,\n preferPlayback,\n type,\n streamType,\n startTime,\n src: outerSrc,\n children,\n autoPlay,\n preload,\n ...restProps\n } = props;\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(playbackId) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLAudioElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(playbackId) ?? 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 if (mediaElRef.current) {\n playbackCoreRef.current = initialize(propsWithState, mediaElRef.current, playbackCoreRef.current);\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 <audio ref={mediaElRef as typeof innerMediaElRef} {...restProps}>\n {children}\n </audio>\n );\n});\n\nMuxAudio.propTypes = {\n envKey: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n // Improve this by adding a full shape() definition for all metadata props\n // metadata: PropTypes.shape({}),\n metadata: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n playbackId: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n type: PropTypes.oneOf(allMediaTypes),\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n startTime: PropTypes.number,\n};\n\nexport default MuxAudio;\n", "import { 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": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAoD,iBAUvCC,EAAmC,IAAIC,IAAS,CAC3D,IAAMC,KAAY,UAAO,IAAI,EAE7B,sBAAU,IAAM,CACdD,EAAK,QAASE,GAAQ,CAChB,CAACA,IAED,OAAOA,GAAQ,WACjBA,EAAID,EAAU,OAAO,EAErBC,EAAI,QAAUD,EAAU,QAE5B,CAAC,CACH,EAAG,CAACD,CAAI,CAAC,EAEFC,CACT,EDzBA,IAAAE,EAAmD,oBACnDC,EAAsB,yBACtBC,EAQO,8BEPP,IAAMC,EAAsB,IAAM,CAChC,GAAI,CAEF,MAAO,OACT,MAAE,CAAO,CACT,MAAO,SACT,EAEMC,EAAyBD,EAAoB,EAEtCE,EAAmB,IAAMD,EFOtC,IAAME,EAAwBC,EAAiB,EACzCC,EAAqB,kBAErBC,EAAW,EAAAC,QAAM,WAAyD,CAACC,EAAOC,IAAQ,CAxBhG,IAAAC,EAyBE,GAAM,CACJ,OAAAC,EACA,MAAAC,EACA,uBAAAC,EACA,WAAAC,EACA,eAAAC,EACA,KAAAC,EACA,WAAAC,EACA,UAAAC,EACA,IAAKC,EACL,SAAAC,EACA,SAAAC,EACA,QAAAC,KACGC,CACL,EAAIf,EAEE,CAACgB,CAAc,KAAI,eAAS,0BAAuB,CAAC,EACpD,CAACC,EAAKC,CAAM,KAAI,aAA+BhB,KAAA,iBAAcI,CAAU,IAAxB,KAAAJ,EAA6BS,CAAQ,EACpFQ,KAAkB,UAAiC,MAAS,EAC5DC,KAAkB,UAAyB,IAAI,EAC/CC,EAAaC,EAAgBF,EAAiBnB,CAAG,EAEvD,sBAAU,IAAM,CA/ClB,IAAAC,EAgDIgB,GAAOhB,KAAA,iBAAcI,CAAU,IAAxB,KAAAJ,EAA6BS,CAAQ,CAC9C,EAAG,CAACA,EAAUL,CAAU,CAAC,KAEzB,aAAU,IAAM,CACd,IAAMiB,EAAiB,CACrB,GAAGvB,EACH,IAAAiB,EACA,eAAAD,EACA,mBAAAnB,EACA,sBAAAF,EACA,SAAUkB,CACZ,EACIQ,EAAW,UACbF,EAAgB,WAAU,cAAWI,EAAgBF,EAAW,QAASF,EAAgB,OAAO,EAEpG,EAAG,CAACF,CAAG,CAAC,KAER,aAAU,IAAM,CAjElB,IAAAf,GAkEIA,EAAAiB,EAAgB,UAAhB,MAAAjB,EAAyB,YAAYW,EACvC,EAAG,CAACA,CAAQ,CAAC,KAEb,aAAU,IAAM,CArElB,IAAAX,GAsEIA,EAAAiB,EAAgB,UAAhB,MAAAjB,EAAyB,WAAWY,EACtC,EAAG,CAACA,CAAO,CAAC,EAIV,EAAAf,QAAA,cAAC,SAAM,IAAKsB,EAAuC,GAAGN,GACnDH,CACH,CAEJ,CAAC,EAEDd,EAAS,UAAY,CACnB,OAAQ,EAAA0B,QAAU,OAClB,MAAO,EAAAA,QAAU,KACjB,eAAgB,EAAAA,QAAU,KAG1B,SAAU,EAAAA,QAAU,IACpB,uBAAwB,EAAAA,QAAU,OAClC,WAAY,EAAAA,QAAU,OACtB,eAAgB,EAAAA,QAAU,OAC1B,eAAgB,EAAAA,QAAU,MAAM,OAAO,OAAO,eAAa,CAAC,EAC5D,KAAM,EAAAA,QAAU,MAAM,eAAa,EACnC,WAAY,EAAAA,QAAU,MAAM,OAAO,OAAO,aAAW,CAAC,EACtD,UAAW,EAAAA,QAAU,MACvB,EAEA,IAAOC,EAAQ3B",
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", "MuxAudio", "React", "props", "ref", "_a", "envKey", "debug", "beaconCollectionDomain", "playbackId", "preferPlayback", "type", "streamType", "startTime", "outerSrc", "children", "autoPlay", "preload", "restProps", "playerInitTime", "src", "setSrc", "playbackCoreRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "propsWithState", "PropTypes", "src_default"]
4
+ "sourcesContent": ["import { 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} from '@mux/playback-core';\nimport type { PlaybackCore } from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n\nexport type Props = Omit<\n React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-audio-react';\n\nconst MuxAudio = React.forwardRef<HTMLAudioElement | undefined, Partial<Props>>((props, ref) => {\n const { playbackId, src: outerSrc, children, autoPlay, preload, ...restProps } = props;\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(playbackId) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLAudioElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(playbackId) ?? 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 <audio ref={mediaElRef as typeof innerMediaElRef} {...restProps}>\n {children}\n </audio>\n );\n});\n\nMuxAudio.propTypes = {\n envKey: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n // Improve this by adding a full shape() definition for all metadata props\n // metadata: PropTypes.shape({}),\n metadata: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n playbackId: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n type: PropTypes.oneOf(allMediaTypes),\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n startTime: PropTypes.number,\n};\n\nexport default MuxAudio;\n", "import { 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": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAAoD,iBAUvCC,EAAmC,IAAIC,IAAS,CAC3D,IAAMC,KAAY,UAAO,IAAI,EAE7B,sBAAU,IAAM,CACdD,EAAK,QAASE,GAAQ,CAChB,CAACA,IAED,OAAOA,GAAQ,WACjBA,EAAID,EAAU,OAAO,EAErBC,EAAI,QAAUD,EAAU,QAE5B,CAAC,CACH,EAAG,CAACD,CAAI,CAAC,EAEFC,CACT,EDzBA,IAAAE,EAAmD,oBACnDC,EAAsB,yBACtBC,EASO,8BERP,IAAMC,EAAsB,IAAM,CAChC,GAAI,CAEF,MAAO,OACT,MAAE,CAAO,CACT,MAAO,SACT,EAEMC,EAAyBD,EAAoB,EAEtCE,EAAmB,IAAMD,EFQtC,IAAME,EAAwBC,EAAiB,EACzCC,EAAqB,kBAErBC,EAAW,EAAAC,QAAM,WAAyD,CAACC,EAAOC,IAAQ,CAzBhG,IAAAC,EA0BE,GAAM,CAAE,WAAAC,EAAY,IAAKC,EAAU,SAAAC,EAAU,SAAAC,EAAU,QAAAC,KAAYC,CAAU,EAAIR,EAE3E,CAACS,CAAc,KAAI,eAAS,0BAAuB,CAAC,EACpD,CAACC,EAAKC,CAAM,KAAI,aAA+BT,KAAA,iBAAcC,CAAU,IAAxB,KAAAD,EAA6BE,CAAQ,EACpFQ,KAAkB,UAAiC,MAAS,EAC5DC,KAAkB,UAAyB,IAAI,EAC/CC,EAAaC,EAAgBF,EAAiBZ,CAAG,EAEvD,sBAAU,IAAM,CAlClB,IAAAC,EAmCIS,GAAOT,KAAA,iBAAcC,CAAU,IAAxB,KAAAD,EAA6BE,CAAQ,CAC9C,EAAG,CAACA,EAAUD,CAAU,CAAC,KAEzB,aAAU,IAAM,CACd,IAAMa,EAAiB,CACrB,GAAGhB,EACH,IAAAU,EACA,eAAAD,EACA,mBAAAZ,EACA,sBAAAF,EACA,SAAUW,CACZ,EAGIW,EAAUH,EAAW,QACzB,OAAIG,IACFL,EAAgB,WAAU,cAAWI,EAAgBC,EAASL,EAAgB,OAAO,GAGhF,IAAM,IACX,YAASK,EAASL,EAAgB,OAAO,EACzCK,EAAU,OACVL,EAAgB,QAAU,MAC5B,CACF,EAAG,CAACF,CAAG,CAAC,KAER,aAAU,IAAM,CA7DlB,IAAAR,GA8DIA,EAAAU,EAAgB,UAAhB,MAAAV,EAAyB,YAAYI,EACvC,EAAG,CAACA,CAAQ,CAAC,KAEb,aAAU,IAAM,CAjElB,IAAAJ,GAkEIA,EAAAU,EAAgB,UAAhB,MAAAV,EAAyB,WAAWK,EACtC,EAAG,CAACA,CAAO,CAAC,EAIV,EAAAR,QAAA,cAAC,SAAM,IAAKe,EAAuC,GAAGN,GACnDH,CACH,CAEJ,CAAC,EAEDP,EAAS,UAAY,CACnB,OAAQ,EAAAoB,QAAU,OAClB,MAAO,EAAAA,QAAU,KACjB,eAAgB,EAAAA,QAAU,KAG1B,SAAU,EAAAA,QAAU,IACpB,uBAAwB,EAAAA,QAAU,OAClC,WAAY,EAAAA,QAAU,OACtB,eAAgB,EAAAA,QAAU,OAC1B,eAAgB,EAAAA,QAAU,MAAM,OAAO,OAAO,eAAa,CAAC,EAC5D,KAAM,EAAAA,QAAU,MAAM,eAAa,EACnC,WAAY,EAAAA,QAAU,MAAM,OAAO,OAAO,aAAW,CAAC,EACtD,UAAW,EAAAA,QAAU,MACvB,EAEA,IAAOC,EAAQrB",
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", "MuxAudio", "React", "props", "ref", "_a", "playbackId", "outerSrc", "children", "autoPlay", "preload", "restProps", "playerInitTime", "src", "setSrc", "playbackCoreRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "propsWithState", "mediaEl", "PropTypes", "src_default"]
7
7
  }
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{useEffect as k,useRef as A}from"react";var d=(...r)=>{let o=A(null);return k(()=>{r.forEach(n=>{!n||(typeof n=="function"?n(o.current):n.current=o.current)})},[r]),o};import m,{useEffect as i,useRef as T,useState as R}from"react";import e from"prop-types";import{allMediaTypes as L,initialize as j,StreamTypes as w,PlaybackTypes as H,toMuxVideoURL as M,generatePlayerInitTime as I}from"@mux/playback-core";var S=()=>{try{return"0.6.2"}catch{}return"UNKNOWN"},v=S(),b=()=>v;var V=b(),N="mux-audio-react",P=m.forwardRef((r,o)=>{var y;let{envKey:n,debug:h,beaconCollectionDomain:D,playbackId:s,preferPlayback:K,type:U,streamType:W,startTime:_,src:u,children:x,autoPlay:c,preload:p,...g}=r,[C]=R(I()),[f,E]=R((y=M(s))!=null?y:u),a=T(void 0),O=T(null),l=d(O,o);return i(()=>{var t;E((t=M(s))!=null?t:u)},[u,s]),i(()=>{let t={...r,src:f,playerInitTime:C,playerSoftwareName:N,playerSoftwareVersion:V,autoplay:c};l.current&&(a.current=j(t,l.current,a.current))},[f]),i(()=>{var t;(t=a.current)==null||t.setAutoplay(c)},[c]),i(()=>{var t;(t=a.current)==null||t.setPreload(p)},[p]),m.createElement("audio",{ref:l,...g},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(H)),type:e.oneOf(L),streamType:e.oneOf(Object.values(w)),startTime:e.number};var $=P;export{$ as default};
1
+ import{useEffect as k,useRef as A}from"react";var y=(...n)=>{let a=A(null);return k(()=>{n.forEach(r=>{!r||(typeof r=="function"?r(a.current):r.current=a.current)})},[n]),a};import m,{useEffect as s,useRef as T,useState as R}from"react";import e from"prop-types";import{allMediaTypes as j,initialize as v,teardown as w,StreamTypes as H,PlaybackTypes as I,toMuxVideoURL as M,generatePlayerInitTime as V}from"@mux/playback-core";var S=()=>{try{return"0.6.3"}catch{}return"UNKNOWN"},L=S(),b=()=>L;var N=b(),h="mux-audio-react",P=m.forwardRef((n,a)=>{var d;let{playbackId:r,src:u,children:x,autoPlay:c,preload:f,...E}=n,[O]=R(V()),[l,g]=R((d=M(r))!=null?d:u),o=T(void 0),C=T(null),p=y(C,a);return s(()=>{var t;g((t=M(r))!=null?t:u)},[u,r]),s(()=>{let t={...n,src:l,playerInitTime:O,playerSoftwareName:h,playerSoftwareVersion:N,autoplay:c},i=p.current;return i&&(o.current=v(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(c)},[c]),s(()=>{var t;(t=o.current)==null||t.setPreload(f)},[f]),m.createElement("audio",{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(j),streamType:e.oneOf(Object.values(H)),startTime:e.number};var G=P;export{G as default};
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": ["import { 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", "import { useCombinedRefs } from './use-combined-refs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n allMediaTypes,\n initialize,\n MuxMediaProps,\n StreamTypes,\n PlaybackTypes,\n toMuxVideoURL,\n generatePlayerInitTime,\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.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-audio-react';\n\nconst MuxAudio = React.forwardRef<HTMLAudioElement | undefined, Partial<Props>>((props, ref) => {\n const {\n envKey,\n debug,\n beaconCollectionDomain,\n playbackId,\n preferPlayback,\n type,\n streamType,\n startTime,\n src: outerSrc,\n children,\n autoPlay,\n preload,\n ...restProps\n } = props;\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(playbackId) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLAudioElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(playbackId) ?? 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 if (mediaElRef.current) {\n playbackCoreRef.current = initialize(propsWithState, mediaElRef.current, playbackCoreRef.current);\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 <audio ref={mediaElRef as typeof innerMediaElRef} {...restProps}>\n {children}\n </audio>\n );\n});\n\nMuxAudio.propTypes = {\n envKey: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n // Improve this by adding a full shape() definition for all metadata props\n // metadata: PropTypes.shape({}),\n metadata: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n playbackId: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n type: PropTypes.oneOf(allMediaTypes),\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n startTime: PropTypes.number,\n};\n\nexport default MuxAudio;\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": "AAAA,OAAS,aAAAA,EAAW,UAAAC,MAAgC,QAU7C,IAAMC,EAAmC,IAAIC,IAAS,CAC3D,IAAMC,EAAYH,EAAO,IAAI,EAE7B,OAAAD,EAAU,IAAM,CACdG,EAAK,QAASE,GAAQ,CAChB,CAACA,IAED,OAAOA,GAAQ,WACjBA,EAAID,EAAU,OAAO,EAErBC,EAAI,QAAUD,EAAU,QAE5B,CAAC,CACH,EAAG,CAACD,CAAI,CAAC,EAEFC,CACT,ECzBA,OAAOE,GAAS,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QACnD,OAAOC,MAAe,aACtB,OACE,iBAAAC,EACA,cAAAC,EAEA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,0BAAAC,MACK,qBCPP,IAAMC,EAAsB,IAAM,CAChC,GAAI,CAEF,MAAO,OACT,MAAE,CAAO,CACT,MAAO,SACT,EAEMC,EAAyBD,EAAoB,EAEtCE,EAAmB,IAAMD,EDOtC,IAAME,EAAwBC,EAAiB,EACzCC,EAAqB,kBAErBC,EAAWC,EAAM,WAAyD,CAACC,EAAOC,IAAQ,CAxBhG,IAAAC,EAyBE,GAAM,CACJ,OAAAC,EACA,MAAAC,EACA,uBAAAC,EACA,WAAAC,EACA,eAAAC,EACA,KAAAC,EACA,WAAAC,EACA,UAAAC,EACA,IAAKC,EACL,SAAAC,EACA,SAAAC,EACA,QAAAC,KACGC,CACL,EAAIf,EAEE,CAACgB,CAAc,EAAIC,EAASC,EAAuB,CAAC,EACpD,CAACC,EAAKC,CAAM,EAAIH,GAA+Bf,EAAAmB,EAAcf,CAAU,IAAxB,KAAAJ,EAA6BS,CAAQ,EACpFW,EAAkBC,EAAiC,MAAS,EAC5DC,EAAkBD,EAAyB,IAAI,EAC/CE,EAAaC,EAAgBF,EAAiBvB,CAAG,EAEvD,OAAA0B,EAAU,IAAM,CA/ClB,IAAAzB,EAgDIkB,GAAOlB,EAAAmB,EAAcf,CAAU,IAAxB,KAAAJ,EAA6BS,CAAQ,CAC9C,EAAG,CAACA,EAAUL,CAAU,CAAC,EAEzBqB,EAAU,IAAM,CACd,IAAMC,EAAiB,CACrB,GAAG5B,EACH,IAAAmB,EACA,eAAAH,EACA,mBAAAnB,EACA,sBAAAF,EACA,SAAUkB,CACZ,EACIY,EAAW,UACbH,EAAgB,QAAUO,EAAWD,EAAgBH,EAAW,QAASH,EAAgB,OAAO,EAEpG,EAAG,CAACH,CAAG,CAAC,EAERQ,EAAU,IAAM,CAjElB,IAAAzB,GAkEIA,EAAAoB,EAAgB,UAAhB,MAAApB,EAAyB,YAAYW,EACvC,EAAG,CAACA,CAAQ,CAAC,EAEbc,EAAU,IAAM,CArElB,IAAAzB,GAsEIA,EAAAoB,EAAgB,UAAhB,MAAApB,EAAyB,WAAWY,EACtC,EAAG,CAACA,CAAO,CAAC,EAIVf,EAAA,cAAC,SAAM,IAAK0B,EAAuC,GAAGV,GACnDH,CACH,CAEJ,CAAC,EAEDd,EAAS,UAAY,CACnB,OAAQgC,EAAU,OAClB,MAAOA,EAAU,KACjB,eAAgBA,EAAU,KAG1B,SAAUA,EAAU,IACpB,uBAAwBA,EAAU,OAClC,WAAYA,EAAU,OACtB,eAAgBA,EAAU,OAC1B,eAAgBA,EAAU,MAAM,OAAO,OAAOC,CAAa,CAAC,EAC5D,KAAMD,EAAU,MAAME,CAAa,EACnC,WAAYF,EAAU,MAAM,OAAO,OAAOG,CAAW,CAAC,EACtD,UAAWH,EAAU,MACvB,EAEA,IAAOI,EAAQpC",
6
- "names": ["useEffect", "useRef", "useCombinedRefs", "refs", "targetRef", "ref", "React", "useEffect", "useRef", "useState", "PropTypes", "allMediaTypes", "initialize", "StreamTypes", "PlaybackTypes", "toMuxVideoURL", "generatePlayerInitTime", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "playerSoftwareVersion", "getPlayerVersion", "playerSoftwareName", "MuxAudio", "React", "props", "ref", "_a", "envKey", "debug", "beaconCollectionDomain", "playbackId", "preferPlayback", "type", "streamType", "startTime", "outerSrc", "children", "autoPlay", "preload", "restProps", "playerInitTime", "useState", "generatePlayerInitTime", "src", "setSrc", "toMuxVideoURL", "playbackCoreRef", "useRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "useEffect", "propsWithState", "initialize", "PropTypes", "PlaybackTypes", "allMediaTypes", "StreamTypes", "src_default"]
4
+ "sourcesContent": ["import { 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", "import { 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} from '@mux/playback-core';\nimport type { PlaybackCore } from '@mux/playback-core';\nimport { getPlayerVersion } from './env';\n\nexport type Props = Omit<\n React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>,\n 'autoPlay'\n> &\n MuxMediaProps;\n\nconst playerSoftwareVersion = getPlayerVersion();\nconst playerSoftwareName = 'mux-audio-react';\n\nconst MuxAudio = React.forwardRef<HTMLAudioElement | undefined, Partial<Props>>((props, ref) => {\n const { playbackId, src: outerSrc, children, autoPlay, preload, ...restProps } = props;\n\n const [playerInitTime] = useState(generatePlayerInitTime());\n const [src, setSrc] = useState<MuxMediaProps['src']>(toMuxVideoURL(playbackId) ?? outerSrc);\n const playbackCoreRef = useRef<PlaybackCore | undefined>(undefined);\n const innerMediaElRef = useRef<HTMLAudioElement>(null);\n const mediaElRef = useCombinedRefs(innerMediaElRef, ref);\n\n useEffect(() => {\n setSrc(toMuxVideoURL(playbackId) ?? 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 <audio ref={mediaElRef as typeof innerMediaElRef} {...restProps}>\n {children}\n </audio>\n );\n});\n\nMuxAudio.propTypes = {\n envKey: PropTypes.string,\n debug: PropTypes.bool,\n disableCookies: PropTypes.bool,\n // Improve this by adding a full shape() definition for all metadata props\n // metadata: PropTypes.shape({}),\n metadata: PropTypes.any,\n beaconCollectionDomain: PropTypes.string,\n playbackId: PropTypes.string,\n playerInitTime: PropTypes.number,\n preferPlayback: PropTypes.oneOf(Object.values(PlaybackTypes)),\n type: PropTypes.oneOf(allMediaTypes),\n streamType: PropTypes.oneOf(Object.values(StreamTypes)),\n startTime: PropTypes.number,\n};\n\nexport default MuxAudio;\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": "AAAA,OAAS,aAAAA,EAAW,UAAAC,MAAgC,QAU7C,IAAMC,EAAmC,IAAIC,IAAS,CAC3D,IAAMC,EAAYH,EAAO,IAAI,EAE7B,OAAAD,EAAU,IAAM,CACdG,EAAK,QAASE,GAAQ,CAChB,CAACA,IAED,OAAOA,GAAQ,WACjBA,EAAID,EAAU,OAAO,EAErBC,EAAI,QAAUD,EAAU,QAE5B,CAAC,CACH,EAAG,CAACD,CAAI,CAAC,EAEFC,CACT,ECzBA,OAAOE,GAAS,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QACnD,OAAOC,MAAe,aACtB,OACE,iBAAAC,EACA,cAAAC,EACA,YAAAC,EAEA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,0BAAAC,MACK,qBCRP,IAAMC,EAAsB,IAAM,CAChC,GAAI,CAEF,MAAO,OACT,MAAE,CAAO,CACT,MAAO,SACT,EAEMC,EAAyBD,EAAoB,EAEtCE,EAAmB,IAAMD,EDQtC,IAAME,EAAwBC,EAAiB,EACzCC,EAAqB,kBAErBC,EAAWC,EAAM,WAAyD,CAACC,EAAOC,IAAQ,CAzBhG,IAAAC,EA0BE,GAAM,CAAE,WAAAC,EAAY,IAAKC,EAAU,SAAAC,EAAU,SAAAC,EAAU,QAAAC,KAAYC,CAAU,EAAIR,EAE3E,CAACS,CAAc,EAAIC,EAASC,EAAuB,CAAC,EACpD,CAACC,EAAKC,CAAM,EAAIH,GAA+BR,EAAAY,EAAcX,CAAU,IAAxB,KAAAD,EAA6BE,CAAQ,EACpFW,EAAkBC,EAAiC,MAAS,EAC5DC,EAAkBD,EAAyB,IAAI,EAC/CE,EAAaC,EAAgBF,EAAiBhB,CAAG,EAEvD,OAAAmB,EAAU,IAAM,CAlClB,IAAAlB,EAmCIW,GAAOX,EAAAY,EAAcX,CAAU,IAAxB,KAAAD,EAA6BE,CAAQ,CAC9C,EAAG,CAACA,EAAUD,CAAU,CAAC,EAEzBiB,EAAU,IAAM,CACd,IAAMC,EAAiB,CACrB,GAAGrB,EACH,IAAAY,EACA,eAAAH,EACA,mBAAAZ,EACA,sBAAAF,EACA,SAAUW,CACZ,EAGIgB,EAAUJ,EAAW,QACzB,OAAII,IACFP,EAAgB,QAAUQ,EAAWF,EAAgBC,EAASP,EAAgB,OAAO,GAGhF,IAAM,CACXS,EAASF,EAASP,EAAgB,OAAO,EACzCO,EAAU,OACVP,EAAgB,QAAU,MAC5B,CACF,EAAG,CAACH,CAAG,CAAC,EAERQ,EAAU,IAAM,CA7DlB,IAAAlB,GA8DIA,EAAAa,EAAgB,UAAhB,MAAAb,EAAyB,YAAYI,EACvC,EAAG,CAACA,CAAQ,CAAC,EAEbc,EAAU,IAAM,CAjElB,IAAAlB,GAkEIA,EAAAa,EAAgB,UAAhB,MAAAb,EAAyB,WAAWK,EACtC,EAAG,CAACA,CAAO,CAAC,EAIVR,EAAA,cAAC,SAAM,IAAKmB,EAAuC,GAAGV,GACnDH,CACH,CAEJ,CAAC,EAEDP,EAAS,UAAY,CACnB,OAAQ2B,EAAU,OAClB,MAAOA,EAAU,KACjB,eAAgBA,EAAU,KAG1B,SAAUA,EAAU,IACpB,uBAAwBA,EAAU,OAClC,WAAYA,EAAU,OACtB,eAAgBA,EAAU,OAC1B,eAAgBA,EAAU,MAAM,OAAO,OAAOC,CAAa,CAAC,EAC5D,KAAMD,EAAU,MAAME,CAAa,EACnC,WAAYF,EAAU,MAAM,OAAO,OAAOG,CAAW,CAAC,EACtD,UAAWH,EAAU,MACvB,EAEA,IAAOI,EAAQ/B",
6
+ "names": ["useEffect", "useRef", "useCombinedRefs", "refs", "targetRef", "ref", "React", "useEffect", "useRef", "useState", "PropTypes", "allMediaTypes", "initialize", "teardown", "StreamTypes", "PlaybackTypes", "toMuxVideoURL", "generatePlayerInitTime", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "playerSoftwareVersion", "getPlayerVersion", "playerSoftwareName", "MuxAudio", "React", "props", "ref", "_a", "playbackId", "outerSrc", "children", "autoPlay", "preload", "restProps", "playerInitTime", "useState", "generatePlayerInitTime", "src", "setSrc", "toMuxVideoURL", "playbackCoreRef", "useRef", "innerMediaElRef", "mediaElRef", "useCombinedRefs", "useEffect", "propsWithState", "mediaEl", "initialize", "teardown", "PropTypes", "PlaybackTypes", "allMediaTypes", "StreamTypes", "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.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.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.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/scheduler/tracing.d.ts","../../../node_modules/@types/react/index.d.ts","../src/use-combined-refs.ts","../../../node_modules/hls.js/dist/hls.js.d.ts","../../playback-core/dist/types/errors.d.ts","../../playback-core/dist/types/tracks.d.ts","../../playback-core/dist/types/types.d.ts","../../playback-core/dist/types/index.d.ts","../src/index.tsx","../../../types/media-chrome.d.ts","../../../types/mux-embed.d.ts","../../../types/mux.d.ts"],"fileInfos":[{"version":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"dbb73d4d99be496175cb432c74c2615f78c76f4272f1d83cba11ee0ed6dbddf0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},"1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f","1ee6056d39213c8481cc8af4adb2b1dc373e15e8b2b9864739e6c0b2da60cf1d",{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"ea0aa24a32c073b8639aa1f3130ba0add0f0f2f76b314d9ba988a5cb91d7e3c4","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"0bcebfaf66be25c793d0281a8dce761bc078d203f02c573e6ee3b844a5ad7fbc","affectsGlobalScope":true},"6ed9dc3c705f9e967631479b016db394cac15a29de4d6361664a2e98d1d6dfe7","3359566cd3e1d64199b5cc028817490162edcf5aa7954f35133a462a507cdb48","8b1a6692156440f6585937b6b8de1c2692e7cac5c43aeb8893bfbd293f719552","16d89c2619e5c73fe784212aa78a4c3f6581d54e5bb566a942dfd4598c974370","aa9b5fdd9c8600626b93be161dfafd4d499c9f1fb7c5844113680406ce375c97","9e27729cf561fb0950e75cbcf2007aed5c408868c0646f08e03f1326f5ddbbee","6d9a8cb94a189ff591af2d1398388ec0b8008d64cfe8bf008421d588d7aef8a7","3cf4c7825a6c0ef1965e8906b85844aafdcdda9d95c8b4bcfcb3a20811cfd0b1","c5a4764697efe3b6b4eaf19b3dc1880cf3df665d30ec93e212233c29a2fa7207",{"version":"a092979673af6906d766c907c9bf0ae97c7bed1f0d9e69d870ce4d4505a51edd","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":5,"noImplicitAny":true,"outDir":"./types","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":6},"fileIdsList":[[37,38,39,40],[36,39,41,42,47],[41],[43,44,45,46,50],[43],[43,50]],"referencedMap":[[41,1],[48,2],[42,3],[47,4],[45,5],[46,6],[51,5]],"exportedModulesMap":[[41,1],[48,2],[42,3],[47,4],[45,5],[46,6],[51,5]],"semanticDiagnosticsPerFile":[39,37,41,40,38,43,7,8,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,1,10,9,36,48,42,44,47,45,46,49,50,51]},"version":"4.6.4"}
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.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.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.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/scheduler/tracing.d.ts","../../../node_modules/@types/react/index.d.ts","../src/use-combined-refs.ts","../../../node_modules/hls.js/dist/hls.js.d.ts","../../playback-core/dist/types/errors.d.ts","../../playback-core/dist/types/tracks.d.ts","../../playback-core/dist/types/types.d.ts","../../playback-core/dist/types/index.d.ts","../src/index.tsx","../../../types/media-chrome.d.ts","../../../types/mux-embed.d.ts","../../../types/mux.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"f3d4da15233e593eacb3965cde7960f3fddf5878528d882bcedd5cbaba0193c7","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},"1f03b495671c3a1bd24510f38b8947f0991dfd6bf0278c68eca14af15b306e1f",{"version":"1ee6056d39213c8481cc8af4adb2b1dc373e15e8b2b9864739e6c0b2da60cf1d","signature":"28f2af136cd97b7c5011ec7fd601841b37499ab89ecb7f1594b2903a9ce5b2aa"},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"1c29793071152b207c01ea1954e343be9a44d85234447b2b236acae9e709a383","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"facb3daa9cb4215070b5662409638ac826681c208d701e96efe9b731d0ec39ee","affectsGlobalScope":true},{"version":"6ed9dc3c705f9e967631479b016db394cac15a29de4d6361664a2e98d1d6dfe7","signature":"405e223d3a5021ca1b76c68b32713c6df3bd17980a8474f85fd1bcbd0630268e"},"3359566cd3e1d64199b5cc028817490162edcf5aa7954f35133a462a507cdb48","8b1a6692156440f6585937b6b8de1c2692e7cac5c43aeb8893bfbd293f719552","16d89c2619e5c73fe784212aa78a4c3f6581d54e5bb566a942dfd4598c974370","30ac7c296085e45df59108da7c29ace25f9630e7102adce3212fa83d57619dd6","31b4bcf9398edbe06c8ab035e5d22a889791f3dbfe4ea0d905c000fcf42e0306",{"version":"6109ed61d876f20e2251227d8eb39a0cec172ebb0bf65b7b42da1c7583bff2a9","signature":"85e3d26ad4aa5a628d6709d3a6eaa2f979bc59cd0d455532aa4f0b150a05ae2f"},"3cf4c7825a6c0ef1965e8906b85844aafdcdda9d95c8b4bcfcb3a20811cfd0b1","c5a4764697efe3b6b4eaf19b3dc1880cf3df665d30ec93e212233c29a2fa7207",{"version":"a092979673af6906d766c907c9bf0ae97c7bed1f0d9e69d870ce4d4505a51edd","affectsGlobalScope":true}],"options":{"composite":true,"declaration":true,"emitDeclarationOnly":true,"esModuleInterop":true,"jsx":2,"module":5,"noImplicitAny":true,"outDir":"./types","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":6},"fileIdsList":[[38,39,40,41],[37,40,42,43,48],[42],[44,45,46,47,51],[44],[44,51],[42,48]],"referencedMap":[[42,1],[49,2],[43,3],[48,4],[46,5],[47,6],[52,5]],"exportedModulesMap":[[42,1],[49,7],[43,3],[48,4],[46,5],[47,6],[52,5]],"semanticDiagnosticsPerFile":[40,38,42,41,39,44,7,8,12,11,2,13,14,15,16,17,18,19,20,3,4,24,21,22,23,25,26,27,5,28,29,30,31,6,36,35,32,33,34,1,10,9,37,49,43,45,48,46,47,50,51,52],"latestChangedDtsFile":"./types/index.d.ts"},"version":"4.9.4"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { MuxMediaProps } from '@mux/playback-core';
3
- export declare type Props = Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, 'autoPlay'> & MuxMediaProps;
4
- declare const MuxAudio: React.ForwardRefExoticComponent<Pick<Partial<Props>, "controls" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("@mux/playback-core").MuxMediaPropTypes> & React.RefAttributes<HTMLAudioElement | undefined>>;
3
+ export type Props = Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, 'autoPlay'> & MuxMediaProps;
4
+ declare const MuxAudio: React.ForwardRefExoticComponent<Pick<Partial<Props>, "controls" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("@mux/playback-core").MuxMediaPropTypes> & React.RefAttributes<HTMLAudioElement | undefined>>;
5
5
  export default MuxAudio;
@@ -1,8 +1,8 @@
1
1
  import { MutableRefObject } from 'react';
2
- declare type Maybe<T> = T | null | undefined;
3
- declare type RefCb<T> = (instance: Maybe<T>) => void;
4
- declare type RefObj<T> = MutableRefObject<Maybe<T>>;
5
- declare type RefTypes<T> = RefObj<T> | RefCb<T>;
2
+ type Maybe<T> = T | null | undefined;
3
+ type RefCb<T> = (instance: Maybe<T>) => void;
4
+ type RefObj<T> = MutableRefObject<Maybe<T>>;
5
+ type RefTypes<T> = RefObj<T> | RefCb<T>;
6
6
  interface useCombinedRefs {
7
7
  <T>(...refs: Maybe<RefTypes<T>>[]): RefObj<T>;
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { MuxMediaProps } from '@mux/playback-core';
3
- export declare type Props = Pick<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, Exclude<keyof React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, 'autoPlay'>> & MuxMediaProps;
4
- declare const MuxAudio: React.ForwardRefExoticComponent<Pick<Partial<Props>, "controls" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("@mux/playback-core").MuxMediaPropTypes> & React.RefAttributes<HTMLAudioElement | undefined>>;
3
+ export type Props = Pick<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, Exclude<keyof React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, 'autoPlay'>> & MuxMediaProps;
4
+ declare const MuxAudio: React.ForwardRefExoticComponent<Pick<Partial<Props>, "controls" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof import("@mux/playback-core").MuxMediaPropTypes> & React.RefAttributes<HTMLAudioElement | undefined>>;
5
5
  export default MuxAudio;
@@ -1,8 +1,8 @@
1
1
  import { MutableRefObject } from 'react';
2
- declare type Maybe<T> = T | null | undefined;
3
- declare type RefCb<T> = (instance: Maybe<T>) => void;
4
- declare type RefObj<T> = MutableRefObject<Maybe<T>>;
5
- declare type RefTypes<T> = RefObj<T> | RefCb<T>;
2
+ type Maybe<T> = T | null | undefined;
3
+ type RefCb<T> = (instance: Maybe<T>) => void;
4
+ type RefObj<T> = MutableRefObject<Maybe<T>>;
5
+ type RefTypes<T> = RefObj<T> | RefCb<T>;
6
6
  interface useCombinedRefs {
7
7
  <T>(...refs: Maybe<RefTypes<T>>[]): RefObj<T>;
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mux/mux-audio-react",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "A custom mux audio element for React that Just Works™",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.mjs",
@@ -53,22 +53,22 @@
53
53
  }
54
54
  },
55
55
  "dependencies": {
56
- "@mux/playback-core": "0.15.0",
56
+ "@mux/playback-core": "0.15.1",
57
57
  "prop-types": "^15.7.2"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/react": "^17.0.37",
61
61
  "@types/react-dom": "^17.0.11",
62
- "@typescript-eslint/eslint-plugin": "^5.38.1",
63
- "@typescript-eslint/parser": "^5.38.1",
64
- "downlevel-dts": "^0.9.0",
62
+ "@typescript-eslint/eslint-plugin": "^5.48.0",
63
+ "@typescript-eslint/parser": "^5.48.0",
64
+ "downlevel-dts": "^0.11.0",
65
65
  "esbuild": "^0.15.7",
66
66
  "eslint": "^8.24.0",
67
67
  "npm-run-all": "^4.1.5",
68
68
  "react": "^17.0.2",
69
69
  "react-dom": "^17.0.2",
70
70
  "shx": "^0.3.4",
71
- "typescript": "^4.5.2"
71
+ "typescript": "^4.9.4"
72
72
  },
73
- "gitHead": "29f41f33d5bcde0bf0cfeb72b224eb5a80627d99"
73
+ "gitHead": "0b7863a5f730767283737f6c19410d354a230ced"
74
74
  }