@mux/mux-player-react 3.0.0 → 3.1.0-canary.0-192aa79

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/README.md CHANGED
@@ -5,9 +5,13 @@
5
5
  <a href="https://www.npmjs.com/package/@mux/mux-player-react"><img src="https://img.shields.io/npm/l/@mux/mux-player-react.svg?sanitize=true" alt="License"></a>
6
6
  </p>
7
7
 
8
- # New release: 2.0
8
+ # New release: 3.0
9
9
 
10
- Mux Player has recently released 2.0. See the [[https://github.com/muxinc/elements/blob/packages/mux-player/UPGRADING_V1_to_V2.md](https://github.com/muxinc/elements/blob/main/packages/mux-player/UPGRADING_V1_to_V2.md) and the [blog post announcement](https://www.mux.com/blog/mux-player-2-0-for-web-and-coming-soon-for-ios-and-android).
10
+ Mux Player recently released 3.0. The most visible change in this is new tooltips that are enabled by default, as well as [other fixes and changes](https://docs.mux.com/guides/player-releases-web#300).
11
+
12
+ ## Previous version: 2.0
13
+
14
+ For changes relating to the previous major release, 2.0, see the [V1 to V2 upgrade guide](https://github.com/muxinc/elements/blob/main/packages/mux-player/UPGRADING_V1_to_V2.md) and the [blog post announcement](https://www.mux.com/blog/mux-player-2-0-for-web-and-coming-soon-for-ios-and-android).
11
15
 
12
16
  # Introduction
13
17
 
@@ -1,2 +1,2 @@
1
- "use client";import y,{useEffect as ye}from"react";import{MaxResolution as Re,MinResolution as Ce,RenditionOrder as ke}from"@mux/playback-core";import{MediaError as Oe}from"@mux/mux-player";var d={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},$=e=>e==null,Q=(e,n)=>$(n)?!1:e in n,X=e=>e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),B=(e,n)=>{if(!(typeof n=="boolean"&&!n)){if(Q(e,d))return d[e];if(typeof n!=null)return/[A-Z]/.test(e)?X(e):e}};var ee=(e,n)=>typeof e=="boolean"?"":e,p=(e={})=>Object.entries(e).reduce((n,[t,o])=>{let r=B(t,o);if(!r)return n;let s=ee(o,t);return n[r]=s,n},{});import{useRef as ce}from"react";import{useEffect as ne,useRef as te}from"react";var m=(...e)=>{let n=te(null);return ne(()=>{e.forEach(t=>{t&&(typeof t=="function"?t(n.current):t.current=n.current)})},[e]),n};import{useEffect as ae}from"react";var re=Object.prototype.hasOwnProperty,oe=(e,n)=>{if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.some((r,s)=>n[s]===r);let t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;for(let r=0;r<t.length;r++)if(!re.call(n,t[r])||!Object.is(e[t[r]],n[t[r]]))return!1;return!0},c=(e,n,t)=>!oe(n,e[t]),ie=(e,n,t)=>{e[t]=n},se=(e,n,t,o=ie,r=c)=>ae(()=>{let s=t==null?void 0:t.current;s&&r(s,n,e)&&o(s,n,e)},[t==null?void 0:t.current,n]),i=se;var le=()=>{try{return"3.0.0"}catch{}return"UNKNOWN"},ue=le(),E=()=>ue;var de=y.forwardRef(({children:e,...n},t)=>y.createElement("mux-player",p({...n,ref:t}),e)),a=(e,n,t)=>ye(()=>{let o=n==null?void 0:n.current;if(!(!o||!t))return o.addEventListener(e,t),()=>{o.removeEventListener(e,t)}},[n==null?void 0:n.current,t]),pe=(e,n)=>{let{onAbort:t,onCanPlay:o,onCanPlayThrough:r,onEmptied:s,onLoadStart:g,onLoadedData:M,onLoadedMetadata:f,onProgress:P,onDurationChange:b,onVolumeChange:v,onRateChange:x,onResize:h,onWaiting:T,onPlay:R,onPlaying:C,onTimeUpdate:k,onPause:L,onSeeking:O,onSeeked:S,onStalled:G,onSuspend:w,onEnded:V,onError:A,onCuePointChange:N,onCuePointsChange:D,onChapterChange:I,metadata:K,tokens:U,paused:_,playbackId:H,playbackRates:j,currentTime:z,themeProps:F,extraSourceParams:W,castCustomData:Z,_hlsConfig:q,...J}=n;return i("playbackRates",j,e),i("metadata",K,e),i("extraSourceParams",W,e),i("_hlsConfig",q,e),i("themeProps",F,e),i("tokens",U,e),i("playbackId",H,e),i("castCustomData",Z,e),i("paused",_,e,(l,u)=>{u!=null&&(u?l.pause():l.play())},(l,u,Y)=>l.hasAttribute("autoplay")&&!l.hasPlayed?!1:c(l,u,Y)),i("currentTime",z,e,(l,u)=>{u!=null&&(l.currentTime=u)}),a("abort",e,t),a("canplay",e,o),a("canplaythrough",e,r),a("emptied",e,s),a("loadstart",e,g),a("loadeddata",e,M),a("loadedmetadata",e,f),a("progress",e,P),a("durationchange",e,b),a("volumechange",e,v),a("ratechange",e,x),a("resize",e,h),a("waiting",e,T),a("play",e,R),a("playing",e,C),a("timeupdate",e,k),a("pause",e,L),a("seeking",e,O),a("seeked",e,S),a("stalled",e,G),a("suspend",e,w),a("ended",e,V),a("error",e,A),a("cuepointchange",e,N),a("cuepointschange",e,D),a("chapterchange",e,I),[J]},me=E(),Ee="mux-player-react",ge=y.forwardRef((e,n)=>{let t=ce(null),o=m(t,n),[r]=pe(t,e);return y.createElement(de,{ref:o,playerSoftwareName:Ee,playerSoftwareVersion:me,...r})}),Ne=ge;export{Re as MaxResolution,Oe as MediaError,Ce as MinResolution,ke as RenditionOrder,Ne as default};
2
- //# sourceMappingURL=-QEWOA6LP.mjs.map
1
+ "use client";import y,{useEffect as ye}from"react";import{MaxResolution as Re,MinResolution as Ce,RenditionOrder as ke}from"@mux/playback-core";import{MediaError as Oe}from"@mux/mux-player";var d={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},$=e=>e==null,Q=(e,n)=>$(n)?!1:e in n,X=e=>e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),B=(e,n)=>{if(!(typeof n=="boolean"&&!n)){if(Q(e,d))return d[e];if(typeof n!=null)return/[A-Z]/.test(e)?X(e):e}};var ee=(e,n)=>typeof e=="boolean"?"":e,p=(e={})=>Object.entries(e).reduce((n,[t,o])=>{let r=B(t,o);if(!r)return n;let s=ee(o,t);return n[r]=s,n},{});import{useRef as ce}from"react";import{useEffect as ne,useRef as te}from"react";var m=(...e)=>{let n=te(null);return ne(()=>{e.forEach(t=>{t&&(typeof t=="function"?t(n.current):t.current=n.current)})},[e]),n};import{useEffect as ae}from"react";var re=Object.prototype.hasOwnProperty,oe=(e,n)=>{if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(Array.isArray(e))return!Array.isArray(n)||e.length!==n.length?!1:e.some((r,s)=>n[s]===r);let t=Object.keys(e),o=Object.keys(n);if(t.length!==o.length)return!1;for(let r=0;r<t.length;r++)if(!re.call(n,t[r])||!Object.is(e[t[r]],n[t[r]]))return!1;return!0},c=(e,n,t)=>!oe(n,e[t]),ie=(e,n,t)=>{e[t]=n},se=(e,n,t,o=ie,r=c)=>ae(()=>{let s=t==null?void 0:t.current;s&&r(s,n,e)&&o(s,n,e)},[t==null?void 0:t.current,n]),i=se;var le=()=>{try{return"3.1.0"}catch{}return"UNKNOWN"},ue=le(),E=()=>ue;var de=y.forwardRef(({children:e,...n},t)=>y.createElement("mux-player",p({...n,ref:t}),e)),a=(e,n,t)=>ye(()=>{let o=n==null?void 0:n.current;if(!(!o||!t))return o.addEventListener(e,t),()=>{o.removeEventListener(e,t)}},[n==null?void 0:n.current,t]),pe=(e,n)=>{let{onAbort:t,onCanPlay:o,onCanPlayThrough:r,onEmptied:s,onLoadStart:g,onLoadedData:M,onLoadedMetadata:f,onProgress:P,onDurationChange:b,onVolumeChange:v,onRateChange:x,onResize:h,onWaiting:T,onPlay:R,onPlaying:C,onTimeUpdate:k,onPause:L,onSeeking:O,onSeeked:S,onStalled:G,onSuspend:w,onEnded:V,onError:A,onCuePointChange:N,onCuePointsChange:D,onChapterChange:I,metadata:K,tokens:U,paused:_,playbackId:H,playbackRates:j,currentTime:z,themeProps:F,extraSourceParams:W,castCustomData:Z,_hlsConfig:q,...J}=n;return i("playbackRates",j,e),i("metadata",K,e),i("extraSourceParams",W,e),i("_hlsConfig",q,e),i("themeProps",F,e),i("tokens",U,e),i("playbackId",H,e),i("castCustomData",Z,e),i("paused",_,e,(l,u)=>{u!=null&&(u?l.pause():l.play())},(l,u,Y)=>l.hasAttribute("autoplay")&&!l.hasPlayed?!1:c(l,u,Y)),i("currentTime",z,e,(l,u)=>{u!=null&&(l.currentTime=u)}),a("abort",e,t),a("canplay",e,o),a("canplaythrough",e,r),a("emptied",e,s),a("loadstart",e,g),a("loadeddata",e,M),a("loadedmetadata",e,f),a("progress",e,P),a("durationchange",e,b),a("volumechange",e,v),a("ratechange",e,x),a("resize",e,h),a("waiting",e,T),a("play",e,R),a("playing",e,C),a("timeupdate",e,k),a("pause",e,L),a("seeking",e,O),a("seeked",e,S),a("stalled",e,G),a("suspend",e,w),a("ended",e,V),a("error",e,A),a("cuepointchange",e,N),a("cuepointschange",e,D),a("chapterchange",e,I),[J]},me=E(),Ee="mux-player-react",ge=y.forwardRef((e,n)=>{let t=ce(null),o=m(t,n),[r]=pe(t,e);return y.createElement(de,{ref:o,playerSoftwareName:Ee,playerSoftwareVersion:me,...r})}),Ne=ge;export{Re as MaxResolution,Oe as MediaError,Ce as MinResolution,ke as RenditionOrder,Ne as default,Ee as playerSoftwareName,me as playerSoftwareVersion};
2
+ //# sourceMappingURL=-6C2FGIUL.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.tsx", "../src/common/utils.ts", "../src/useCombinedRefs.ts", "../src/useObjectPropEffect.ts", "../src/env.ts"],
4
+ "sourcesContent": ["'use client';\nimport React, { useEffect } from 'react';\nimport type { CSSProperties } from 'react';\nimport type {\n StreamTypes,\n PlaybackTypes,\n CmcdTypes,\n MaxResolutionValue,\n MinResolutionValue,\n RenditionOrderValue,\n} from '@mux/playback-core';\nimport { MaxResolution, MinResolution, RenditionOrder } from '@mux/playback-core';\nimport { MediaError } from '@mux/mux-player';\nimport type MuxPlayerElement from '@mux/mux-player';\nimport type { Tokens, MuxPlayerElementEventMap } from '@mux/mux-player';\nimport { toNativeProps } from './common/utils';\nimport { useRef } from 'react';\nimport { useCombinedRefs } from './useCombinedRefs';\nimport useObjectPropEffect, { defaultHasChanged } from './useObjectPropEffect';\nimport { getPlayerVersion } from './env';\n\nexport { MediaError, MaxResolution, MinResolution, RenditionOrder };\n\ntype ValueOf<T> = T[keyof T];\ninterface GenericEventListener<T extends Event = CustomEvent> {\n (evt: T): void;\n}\n\nexport type MuxPlayerRefAttributes = MuxPlayerElement;\ntype VideoApiAttributes = {\n currentTime: number;\n volume: number;\n paused: boolean;\n src: string | null;\n poster: string;\n playbackRate: number;\n playsInline: boolean;\n preload: string;\n crossOrigin: string;\n autoPlay: boolean | string;\n loop: boolean;\n muted: boolean;\n style: CSSProperties;\n};\n\ntype MuxMediaPropTypes = {\n audio: boolean;\n // envKey: Options[\"data\"][\"env_key\"];\n envKey: string;\n // debug: Options[\"debug\"] & Hls[\"config\"][\"debug\"];\n debug: boolean;\n disableTracking: boolean;\n disableCookies: boolean;\n disablePictureInPicture?: boolean;\n // metadata: Partial<Options[\"data\"]>;\n metadata: { [k: string]: any };\n extraSourceParams: Record<string, any>;\n _hlsConfig: MuxPlayerElement['_hlsConfig'];\n beaconCollectionDomain: string;\n customDomain: string;\n playbackId: string;\n preferPlayback: ValueOf<PlaybackTypes> | undefined;\n // NOTE: Explicitly adding deprecated values here for now to avoid fully breaking changes in TS envs (CJP)\n streamType: ValueOf<StreamTypes> | 'll-live' | 'live:dvr' | 'll-live:dvr';\n defaultStreamType: ValueOf<StreamTypes>;\n targetLiveWindow: number;\n startTime: number;\n storyboardSrc: string;\n preferCmcd: ValueOf<CmcdTypes> | undefined;\n children?: React.ReactNode;\n};\n\nexport type MuxPlayerProps = {\n className?: string;\n hotkeys?: string;\n nohotkeys?: boolean;\n castReceiver?: string | undefined;\n castCustomData?: Record<string, any> | undefined;\n defaultHiddenCaptions?: boolean;\n playerSoftwareVersion?: string;\n playerSoftwareName?: string;\n forwardSeekOffset?: number;\n backwardSeekOffset?: number;\n maxResolution?: MaxResolutionValue;\n minResolution?: MinResolutionValue;\n renditionOrder?: RenditionOrderValue;\n programStartTime?: number;\n programEndTime?: number;\n assetStartTime?: number;\n assetEndTime?: number;\n metadataVideoId?: string;\n metadataVideoTitle?: string;\n metadataViewerUserId?: string;\n primaryColor?: string;\n secondaryColor?: string;\n accentColor?: string;\n placeholder?: string;\n playbackRates?: number[];\n defaultShowRemainingTime?: boolean;\n defaultDuration?: number;\n noVolumePref?: boolean;\n thumbnailTime?: number;\n title?: string;\n tokens?: Tokens;\n theme?: string;\n themeProps?: { [k: string]: any };\n onAbort?: GenericEventListener<MuxPlayerElementEventMap['abort']>;\n onCanPlay?: GenericEventListener<MuxPlayerElementEventMap['canplay']>;\n onCanPlayThrough?: GenericEventListener<MuxPlayerElementEventMap['canplaythrough']>;\n onEmptied?: GenericEventListener<MuxPlayerElementEventMap['emptied']>;\n onLoadStart?: GenericEventListener<MuxPlayerElementEventMap['loadstart']>;\n onLoadedData?: GenericEventListener<MuxPlayerElementEventMap['loadeddata']>;\n onLoadedMetadata?: GenericEventListener<MuxPlayerElementEventMap['loadedmetadata']>;\n onProgress?: GenericEventListener<MuxPlayerElementEventMap['progress']>;\n onDurationChange?: GenericEventListener<MuxPlayerElementEventMap['durationchange']>;\n onVolumeChange?: GenericEventListener<MuxPlayerElementEventMap['volumechange']>;\n onRateChange?: GenericEventListener<MuxPlayerElementEventMap['ratechange']>;\n onResize?: GenericEventListener<MuxPlayerElementEventMap['resize']>;\n onWaiting?: GenericEventListener<MuxPlayerElementEventMap['waiting']>;\n onPlay?: GenericEventListener<MuxPlayerElementEventMap['play']>;\n onPlaying?: GenericEventListener<MuxPlayerElementEventMap['playing']>;\n onTimeUpdate?: GenericEventListener<MuxPlayerElementEventMap['timeupdate']>;\n onPause?: GenericEventListener<MuxPlayerElementEventMap['pause']>;\n onSeeking?: GenericEventListener<MuxPlayerElementEventMap['seeking']>;\n onSeeked?: GenericEventListener<MuxPlayerElementEventMap['seeked']>;\n onStalled?: GenericEventListener<MuxPlayerElementEventMap['stalled']>;\n onSuspend?: GenericEventListener<MuxPlayerElementEventMap['suspend']>;\n onEnded?: GenericEventListener<MuxPlayerElementEventMap['ended']>;\n onError?: GenericEventListener<MuxPlayerElementEventMap['error']>;\n onCuePointChange?: GenericEventListener<MuxPlayerElementEventMap['cuepointchange']>;\n onCuePointsChange?: GenericEventListener<MuxPlayerElementEventMap['cuepointschange']>;\n onChapterChange?: GenericEventListener<MuxPlayerElementEventMap['chapterchange']>;\n} & Partial<MuxMediaPropTypes> &\n Partial<VideoApiAttributes>;\n\nconst MuxPlayerInternal = React.forwardRef<MuxPlayerRefAttributes, MuxPlayerProps>(({ children, ...props }, ref) => {\n return React.createElement('mux-player', toNativeProps({ ...props, ref }), children);\n});\n\nconst useEventCallbackEffect = <K extends keyof MuxPlayerElementEventMap>(\n type: K,\n ref: // | ((instance: EventTarget | null) => void)\n React.MutableRefObject<MuxPlayerElement | null> | null | undefined,\n callback: GenericEventListener<MuxPlayerElementEventMap[K]> | undefined\n) => {\n return useEffect(() => {\n const eventTarget = ref?.current;\n if (!eventTarget || !callback) return;\n eventTarget.addEventListener(type, callback);\n return () => {\n eventTarget.removeEventListener(type, callback);\n };\n }, [ref?.current, callback]);\n};\n\nconst usePlayer = (\n ref: // | ((instance: EventTarget | null) => void)\n React.MutableRefObject<MuxPlayerElement | null> | null | undefined,\n props: MuxPlayerProps\n) => {\n const {\n onAbort,\n onCanPlay,\n onCanPlayThrough,\n onEmptied,\n onLoadStart,\n onLoadedData,\n onLoadedMetadata,\n onProgress,\n onDurationChange,\n onVolumeChange,\n onRateChange,\n onResize,\n onWaiting,\n onPlay,\n onPlaying,\n onTimeUpdate,\n onPause,\n onSeeking,\n onSeeked,\n onStalled,\n onSuspend,\n onEnded,\n onError,\n onCuePointChange,\n onCuePointsChange,\n onChapterChange,\n metadata,\n tokens,\n paused,\n playbackId,\n playbackRates,\n currentTime,\n themeProps,\n extraSourceParams,\n castCustomData,\n _hlsConfig,\n ...remainingProps\n } = props;\n useObjectPropEffect('playbackRates', playbackRates, ref);\n useObjectPropEffect('metadata', metadata, ref);\n useObjectPropEffect('extraSourceParams', extraSourceParams, ref);\n useObjectPropEffect('_hlsConfig', _hlsConfig, ref);\n useObjectPropEffect('themeProps', themeProps, ref);\n useObjectPropEffect('tokens', tokens, ref);\n useObjectPropEffect('playbackId', playbackId, ref);\n useObjectPropEffect('castCustomData', castCustomData, ref);\n useObjectPropEffect(\n 'paused',\n paused,\n ref,\n (playerEl: HTMLMediaElement, pausedVal?: boolean) => {\n if (pausedVal == null) return;\n if (pausedVal) {\n playerEl.pause();\n } else {\n playerEl.play();\n }\n },\n (playerEl, value, propName) => {\n if (playerEl.hasAttribute('autoplay') && !playerEl.hasPlayed) {\n return false;\n }\n return defaultHasChanged(playerEl, value, propName);\n }\n );\n useObjectPropEffect('currentTime', currentTime, ref, (playerEl: HTMLMediaElement, currentTimeVal?: number) => {\n if (currentTimeVal == null) return;\n playerEl.currentTime = currentTimeVal;\n });\n useEventCallbackEffect('abort', ref, onAbort);\n useEventCallbackEffect('canplay', ref, onCanPlay);\n useEventCallbackEffect('canplaythrough', ref, onCanPlayThrough);\n useEventCallbackEffect('emptied', ref, onEmptied);\n useEventCallbackEffect('loadstart', ref, onLoadStart);\n useEventCallbackEffect('loadeddata', ref, onLoadedData);\n useEventCallbackEffect('loadedmetadata', ref, onLoadedMetadata);\n useEventCallbackEffect('progress', ref, onProgress);\n useEventCallbackEffect('durationchange', ref, onDurationChange);\n useEventCallbackEffect('volumechange', ref, onVolumeChange);\n useEventCallbackEffect('ratechange', ref, onRateChange);\n useEventCallbackEffect('resize', ref, onResize);\n useEventCallbackEffect('waiting', ref, onWaiting);\n useEventCallbackEffect('play', ref, onPlay);\n useEventCallbackEffect('playing', ref, onPlaying);\n useEventCallbackEffect('timeupdate', ref, onTimeUpdate);\n useEventCallbackEffect('pause', ref, onPause);\n useEventCallbackEffect('seeking', ref, onSeeking);\n useEventCallbackEffect('seeked', ref, onSeeked);\n useEventCallbackEffect('stalled', ref, onStalled);\n useEventCallbackEffect('suspend', ref, onSuspend);\n useEventCallbackEffect('ended', ref, onEnded);\n useEventCallbackEffect('error', ref, onError);\n useEventCallbackEffect('cuepointchange', ref, onCuePointChange);\n useEventCallbackEffect('cuepointschange', ref, onCuePointsChange);\n useEventCallbackEffect('chapterchange', ref, onChapterChange);\n return [remainingProps];\n};\n\nexport const playerSoftwareVersion = getPlayerVersion();\nexport const playerSoftwareName = 'mux-player-react';\n\nconst MuxPlayer = React.forwardRef<\n MuxPlayerRefAttributes,\n Omit<MuxPlayerProps, 'playerSoftwareVersion' | 'playerSoftwareName'>\n>((props, ref) => {\n const innerPlayerRef = useRef<MuxPlayerElement>(null);\n const playerRef = useCombinedRefs(innerPlayerRef, ref);\n const [remainingProps] = usePlayer(innerPlayerRef, props);\n\n return (\n <MuxPlayerInternal\n /** @TODO Fix types relationships (CJP) */\n ref={playerRef as typeof innerPlayerRef}\n playerSoftwareName={playerSoftwareName}\n playerSoftwareVersion={playerSoftwareVersion}\n {...remainingProps}\n />\n );\n});\n\nexport default MuxPlayer;\n", "// NOTE: As a forward-looking implementation, we may want to assume\n// prop names -> attribute names is always a simple name.toLowerCase()\n// and provide a mechanism for passing in per-component overrides for\n// e.g. kebab cases, as that's the way React/Preact handles these. (CJP)\nconst ReactPropToAttrNameMap = {\n className: 'class',\n classname: 'class',\n htmlFor: 'for',\n crossOrigin: 'crossorigin',\n viewBox: 'viewBox',\n playsInline: 'playsinline',\n autoPlay: 'autoplay',\n playbackRate: 'playbackrate',\n};\n\ntype KeyTypes = string | number | symbol;\ntype Maybe<T> = T | null | undefined;\n\nexport const isNil = (x: unknown): x is null | undefined => x == undefined;\n\n// Type Guard to determine if a given key is actually a key of some object of type T\nexport const isKeyOf = <T extends {} = any>(k: KeyTypes, o: Maybe<T>): k is keyof T => {\n if (isNil(o)) return false;\n return k in o;\n};\n\nconst toKebabCase = (string: string) => string.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);\n\nexport const toNativeAttrName = (propName: string, propValue: any): string | undefined => {\n if (typeof propValue === 'boolean' && !propValue) return undefined;\n if (isKeyOf(propName, ReactPropToAttrNameMap)) return ReactPropToAttrNameMap[propName];\n if (typeof propValue == undefined) return undefined;\n if (/[A-Z]/.test(propName)) return toKebabCase(propName);\n return propName;\n};\nexport const toStyleAttr = <T>(x: T) => x;\n\nexport const toNativeAttrValue = (propValue: any, propName: string) => {\n if (typeof propValue === 'boolean') return '';\n return propValue;\n};\n\nexport const toNativeProps = (props = {}) => {\n return Object.entries(props).reduce<{ [k: string]: string }>((transformedProps, [propName, propValue]) => {\n const attrName = toNativeAttrName(propName, propValue);\n\n // prop was stripped. Don't add.\n if (!attrName) {\n return transformedProps;\n }\n\n const attrValue = toNativeAttrValue(propValue, propName);\n transformedProps[attrName] = attrValue;\n return transformedProps;\n }, {});\n};\n", "import { useEffect, useRef } from 'react';\nimport type { MutableRefObject, ForwardedRef } 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> | ForwardedRef<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 { useEffect } from 'react';\n\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * Slightly modified version of React's shallowEqual, with optimizations for Arrays\n * so we may treat them specifically as unequal if they are not a) both arrays\n * or b) don't contain the same (shallowly compared) elements.\n */\nconst shallowEqual = (objA: any, objB: any): boolean => {\n if (Object.is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n if (Array.isArray(objA)) {\n // Early \"cheap\" array compares\n if (!Array.isArray(objB) || objA.length !== objB.length) return false;\n // Shallow compare for arrays\n return objA.some((vVal, i) => objB[i] === vVal);\n }\n\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (let i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const defaultHasChanged = (obj: any, v: any, k: string) => {\n return !shallowEqual(v, obj[k]);\n};\n\nconst defaultUpdateValue = (obj: any, v: any, k: string) => {\n obj[k] = v;\n};\n\nexport const useObjectPropEffect = <T extends { [k: string]: any }, V>(\n propName: string,\n propValue: V | null | undefined,\n ref: React.MutableRefObject<T | null> | null | undefined,\n updateValue = defaultUpdateValue,\n hasChanged = defaultHasChanged\n) => {\n return useEffect(() => {\n const obj = ref?.current;\n if (!obj) return;\n if (!hasChanged(obj, propValue, propName)) return;\n updateValue(obj, propValue, propName);\n }, [ref?.current, propValue]);\n};\n\nexport default useObjectPropEffect;\n", "const 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": "aACA,OAAOA,GAAS,aAAAC,OAAiB,QAUjC,OAAS,iBAAAC,GAAe,iBAAAC,GAAe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AS,EAChDzB,EAAuB,UAAWF,EAAK4B,CAAS,EAChD1B,EAAuB,QAASF,EAAK6B,CAAO,EAC5C3B,EAAuB,QAASF,EAAK8B,CAAO,EAC5C5B,EAAuB,iBAAkBF,EAAK+B,CAAgB,EAC9D7B,EAAuB,kBAAmBF,EAAKgC,CAAiB,EAChE9B,EAAuB,gBAAiBF,EAAKiC,CAAe,EACrD,CAACW,CAAc,CACxB,EAEaQ,GAAwBC,EAAiB,EACzCC,GAAqB,mBAE5BC,GAAY1D,EAAM,WAGtB,CAACE,EAAOC,IAAQ,CAChB,IAAMwD,EAAiBC,GAAyB,IAAI,EAC9CC,EAAYC,EAAgBH,EAAgBxD,CAAG,EAC/C,CAAC4C,CAAc,EAAIrC,GAAUiD,EAAgBzD,CAAK,EAExD,OACEF,EAAA,cAACD,GAAA,CAEC,IAAK8D,EACL,mBAAoBJ,GACpB,sBAAuBF,GACtB,GAAGR,EACN,CAEJ,CAAC,EAEMgB,GAAQL",
6
+ "names": ["React", "useEffect", "MaxResolution", "MinResolution", "RenditionOrder", "MediaError", "ReactPropToAttrNameMap", "isNil", "x", "isKeyOf", "k", "o", "toKebabCase", "string", "match", "toNativeAttrName", "propName", "propValue", "toNativeAttrValue", "propValue", "propName", "toNativeProps", "props", "transformedProps", "attrName", "toNativeAttrName", "attrValue", "useRef", "useEffect", "useRef", "useCombinedRefs", "refs", "targetRef", "ref", "useEffect", "hasOwnProperty", "shallowEqual", "objA", "objB", "vVal", "i", "keysA", "keysB", "defaultHasChanged", "obj", "v", "k", "defaultUpdateValue", "useObjectPropEffect", "propName", "propValue", "ref", "updateValue", "hasChanged", "useObjectPropEffect_default", "getEnvPlayerVersion", "player_version", "getPlayerVersion", "MuxPlayerInternal", "React", "children", "props", "ref", "toNativeProps", "useEventCallbackEffect", "type", "callback", "useEffect", "eventTarget", "usePlayer", "onAbort", "onCanPlay", "onCanPlayThrough", "onEmptied", "onLoadStart", "onLoadedData", "onLoadedMetadata", "onProgress", "onDurationChange", "onVolumeChange", "onRateChange", "onResize", "onWaiting", "onPlay", "onPlaying", "onTimeUpdate", "onPause", "onSeeking", "onSeeked", "onStalled", "onSuspend", "onEnded", "onError", "onCuePointChange", "onCuePointsChange", "onChapterChange", "metadata", "tokens", "paused", "playbackId", "playbackRates", "currentTime", "themeProps", "extraSourceParams", "castCustomData", "_hlsConfig", "remainingProps", "useObjectPropEffect_default", "playerEl", "pausedVal", "value", "propName", "defaultHasChanged", "currentTimeVal", "playerSoftwareVersion", "getPlayerVersion", "playerSoftwareName", "MuxPlayer", "innerPlayerRef", "useRef", "playerRef", "useCombinedRefs", "src_default"]
7
+ }
package/dist/cjs.json ADDED
@@ -0,0 +1,280 @@
1
+ {
2
+ "inputs": {
3
+ "src/common/utils.ts": {
4
+ "bytes": 2048,
5
+ "imports": [],
6
+ "format": "esm"
7
+ },
8
+ "src/useCombinedRefs.ts": {
9
+ "bytes": 892,
10
+ "imports": [
11
+ {
12
+ "path": "react",
13
+ "kind": "import-statement",
14
+ "external": true
15
+ }
16
+ ],
17
+ "format": "esm"
18
+ },
19
+ "src/useObjectPropEffect.ts": {
20
+ "bytes": 1850,
21
+ "imports": [
22
+ {
23
+ "path": "react",
24
+ "kind": "import-statement",
25
+ "external": true
26
+ }
27
+ ],
28
+ "format": "esm"
29
+ },
30
+ "src/env.ts": {
31
+ "bytes": 245,
32
+ "imports": [],
33
+ "format": "esm"
34
+ },
35
+ "src/index.tsx": {
36
+ "bytes": 10274,
37
+ "imports": [
38
+ {
39
+ "path": "react",
40
+ "kind": "import-statement",
41
+ "external": true
42
+ },
43
+ {
44
+ "path": "@mux/playback-core",
45
+ "kind": "import-statement",
46
+ "external": true
47
+ },
48
+ {
49
+ "path": "@mux/mux-player",
50
+ "kind": "import-statement",
51
+ "external": true
52
+ },
53
+ {
54
+ "path": "src/common/utils.ts",
55
+ "kind": "import-statement",
56
+ "original": "./common/utils"
57
+ },
58
+ {
59
+ "path": "react",
60
+ "kind": "import-statement",
61
+ "external": true
62
+ },
63
+ {
64
+ "path": "src/useCombinedRefs.ts",
65
+ "kind": "import-statement",
66
+ "original": "./useCombinedRefs"
67
+ },
68
+ {
69
+ "path": "src/useObjectPropEffect.ts",
70
+ "kind": "import-statement",
71
+ "original": "./useObjectPropEffect"
72
+ },
73
+ {
74
+ "path": "src/env.ts",
75
+ "kind": "import-statement",
76
+ "original": "./env"
77
+ }
78
+ ],
79
+ "format": "esm"
80
+ },
81
+ "src/themes/classic.ts": {
82
+ "bytes": 81,
83
+ "imports": [
84
+ {
85
+ "path": "@mux/mux-player/themes/classic",
86
+ "kind": "import-statement",
87
+ "external": true
88
+ }
89
+ ],
90
+ "format": "esm"
91
+ },
92
+ "src/themes/gerwig.ts": {
93
+ "bytes": 79,
94
+ "imports": [
95
+ {
96
+ "path": "@mux/mux-player/themes/gerwig",
97
+ "kind": "import-statement",
98
+ "external": true
99
+ }
100
+ ],
101
+ "format": "esm"
102
+ },
103
+ "src/themes/microvideo.ts": {
104
+ "bytes": 87,
105
+ "imports": [
106
+ {
107
+ "path": "@mux/mux-player/themes/microvideo",
108
+ "kind": "import-statement",
109
+ "external": true
110
+ }
111
+ ],
112
+ "format": "esm"
113
+ },
114
+ "src/themes/minimal.ts": {
115
+ "bytes": 81,
116
+ "imports": [
117
+ {
118
+ "path": "@mux/mux-player/themes/minimal",
119
+ "kind": "import-statement",
120
+ "external": true
121
+ }
122
+ ],
123
+ "format": "esm"
124
+ }
125
+ },
126
+ "outputs": {
127
+ "dist/index.cjs.js.map": {
128
+ "imports": [],
129
+ "exports": [],
130
+ "inputs": {},
131
+ "bytes": 22627
132
+ },
133
+ "dist/index.cjs.js": {
134
+ "imports": [
135
+ {
136
+ "path": "react",
137
+ "kind": "require-call",
138
+ "external": true
139
+ },
140
+ {
141
+ "path": "@mux/playback-core",
142
+ "kind": "require-call",
143
+ "external": true
144
+ },
145
+ {
146
+ "path": "@mux/mux-player",
147
+ "kind": "require-call",
148
+ "external": true
149
+ },
150
+ {
151
+ "path": "react",
152
+ "kind": "require-call",
153
+ "external": true
154
+ },
155
+ {
156
+ "path": "react",
157
+ "kind": "require-call",
158
+ "external": true
159
+ },
160
+ {
161
+ "path": "react",
162
+ "kind": "require-call",
163
+ "external": true
164
+ }
165
+ ],
166
+ "exports": [],
167
+ "entryPoint": "src/index.tsx",
168
+ "inputs": {
169
+ "src/index.tsx": {
170
+ "bytesInOutput": 2207
171
+ },
172
+ "src/common/utils.ts": {
173
+ "bytesInOutput": 532
174
+ },
175
+ "src/useCombinedRefs.ts": {
176
+ "bytesInOutput": 170
177
+ },
178
+ "src/useObjectPropEffect.ts": {
179
+ "bytesInOutput": 599
180
+ },
181
+ "src/env.ts": {
182
+ "bytesInOutput": 71
183
+ }
184
+ },
185
+ "bytes": 4214
186
+ },
187
+ "dist/themes/classic.cjs.js.map": {
188
+ "imports": [],
189
+ "exports": [],
190
+ "inputs": {},
191
+ "bytes": 374
192
+ },
193
+ "dist/themes/classic.cjs.js": {
194
+ "imports": [
195
+ {
196
+ "path": "@mux/mux-player/themes/classic",
197
+ "kind": "require-call",
198
+ "external": true
199
+ }
200
+ ],
201
+ "exports": [],
202
+ "entryPoint": "src/themes/classic.ts",
203
+ "inputs": {
204
+ "src/themes/classic.ts": {
205
+ "bytesInOutput": 110
206
+ }
207
+ },
208
+ "bytes": 589
209
+ },
210
+ "dist/themes/gerwig.cjs.js.map": {
211
+ "imports": [],
212
+ "exports": [],
213
+ "inputs": {},
214
+ "bytes": 368
215
+ },
216
+ "dist/themes/gerwig.cjs.js": {
217
+ "imports": [
218
+ {
219
+ "path": "@mux/mux-player/themes/gerwig",
220
+ "kind": "require-call",
221
+ "external": true
222
+ }
223
+ ],
224
+ "exports": [],
225
+ "entryPoint": "src/themes/gerwig.ts",
226
+ "inputs": {
227
+ "src/themes/gerwig.ts": {
228
+ "bytesInOutput": 108
229
+ }
230
+ },
231
+ "bytes": 586
232
+ },
233
+ "dist/themes/microvideo.cjs.js.map": {
234
+ "imports": [],
235
+ "exports": [],
236
+ "inputs": {},
237
+ "bytes": 392
238
+ },
239
+ "dist/themes/microvideo.cjs.js": {
240
+ "imports": [
241
+ {
242
+ "path": "@mux/mux-player/themes/microvideo",
243
+ "kind": "require-call",
244
+ "external": true
245
+ }
246
+ ],
247
+ "exports": [],
248
+ "entryPoint": "src/themes/microvideo.ts",
249
+ "inputs": {
250
+ "src/themes/microvideo.ts": {
251
+ "bytesInOutput": 116
252
+ }
253
+ },
254
+ "bytes": 598
255
+ },
256
+ "dist/themes/minimal.cjs.js.map": {
257
+ "imports": [],
258
+ "exports": [],
259
+ "inputs": {},
260
+ "bytes": 374
261
+ },
262
+ "dist/themes/minimal.cjs.js": {
263
+ "imports": [
264
+ {
265
+ "path": "@mux/mux-player/themes/minimal",
266
+ "kind": "require-call",
267
+ "external": true
268
+ }
269
+ ],
270
+ "exports": [],
271
+ "entryPoint": "src/themes/minimal.ts",
272
+ "inputs": {
273
+ "src/themes/minimal.ts": {
274
+ "bytesInOutput": 110
275
+ }
276
+ },
277
+ "bytes": 589
278
+ }
279
+ }
280
+ }
package/dist/esm.json ADDED
@@ -0,0 +1,296 @@
1
+ {
2
+ "inputs": {
3
+ "src/common/utils.ts": {
4
+ "bytes": 2048,
5
+ "imports": [],
6
+ "format": "esm"
7
+ },
8
+ "src/useCombinedRefs.ts": {
9
+ "bytes": 892,
10
+ "imports": [
11
+ {
12
+ "path": "react",
13
+ "kind": "import-statement",
14
+ "external": true
15
+ }
16
+ ],
17
+ "format": "esm"
18
+ },
19
+ "src/useObjectPropEffect.ts": {
20
+ "bytes": 1850,
21
+ "imports": [
22
+ {
23
+ "path": "react",
24
+ "kind": "import-statement",
25
+ "external": true
26
+ }
27
+ ],
28
+ "format": "esm"
29
+ },
30
+ "src/env.ts": {
31
+ "bytes": 245,
32
+ "imports": [],
33
+ "format": "esm"
34
+ },
35
+ "src/index.tsx": {
36
+ "bytes": 10274,
37
+ "imports": [
38
+ {
39
+ "path": "react",
40
+ "kind": "import-statement",
41
+ "external": true
42
+ },
43
+ {
44
+ "path": "@mux/playback-core",
45
+ "kind": "import-statement",
46
+ "external": true
47
+ },
48
+ {
49
+ "path": "@mux/mux-player",
50
+ "kind": "import-statement",
51
+ "external": true
52
+ },
53
+ {
54
+ "path": "src/common/utils.ts",
55
+ "kind": "import-statement",
56
+ "original": "./common/utils"
57
+ },
58
+ {
59
+ "path": "react",
60
+ "kind": "import-statement",
61
+ "external": true
62
+ },
63
+ {
64
+ "path": "src/useCombinedRefs.ts",
65
+ "kind": "import-statement",
66
+ "original": "./useCombinedRefs"
67
+ },
68
+ {
69
+ "path": "src/useObjectPropEffect.ts",
70
+ "kind": "import-statement",
71
+ "original": "./useObjectPropEffect"
72
+ },
73
+ {
74
+ "path": "src/env.ts",
75
+ "kind": "import-statement",
76
+ "original": "./env"
77
+ }
78
+ ],
79
+ "format": "esm"
80
+ },
81
+ "src/themes/classic.ts": {
82
+ "bytes": 81,
83
+ "imports": [
84
+ {
85
+ "path": "@mux/mux-player/themes/classic",
86
+ "kind": "import-statement",
87
+ "external": true
88
+ }
89
+ ],
90
+ "format": "esm"
91
+ },
92
+ "src/themes/gerwig.ts": {
93
+ "bytes": 79,
94
+ "imports": [
95
+ {
96
+ "path": "@mux/mux-player/themes/gerwig",
97
+ "kind": "import-statement",
98
+ "external": true
99
+ }
100
+ ],
101
+ "format": "esm"
102
+ },
103
+ "src/themes/microvideo.ts": {
104
+ "bytes": 87,
105
+ "imports": [
106
+ {
107
+ "path": "@mux/mux-player/themes/microvideo",
108
+ "kind": "import-statement",
109
+ "external": true
110
+ }
111
+ ],
112
+ "format": "esm"
113
+ },
114
+ "src/themes/minimal.ts": {
115
+ "bytes": 81,
116
+ "imports": [
117
+ {
118
+ "path": "@mux/mux-player/themes/minimal",
119
+ "kind": "import-statement",
120
+ "external": true
121
+ }
122
+ ],
123
+ "format": "esm"
124
+ }
125
+ },
126
+ "outputs": {
127
+ "dist/index.mjs.map": {
128
+ "imports": [],
129
+ "exports": [],
130
+ "inputs": {},
131
+ "bytes": 22565
132
+ },
133
+ "dist/index.mjs": {
134
+ "imports": [
135
+ {
136
+ "path": "react",
137
+ "kind": "import-statement",
138
+ "external": true
139
+ },
140
+ {
141
+ "path": "@mux/playback-core",
142
+ "kind": "import-statement",
143
+ "external": true
144
+ },
145
+ {
146
+ "path": "@mux/mux-player",
147
+ "kind": "import-statement",
148
+ "external": true
149
+ },
150
+ {
151
+ "path": "react",
152
+ "kind": "import-statement",
153
+ "external": true
154
+ },
155
+ {
156
+ "path": "react",
157
+ "kind": "import-statement",
158
+ "external": true
159
+ },
160
+ {
161
+ "path": "react",
162
+ "kind": "import-statement",
163
+ "external": true
164
+ }
165
+ ],
166
+ "exports": [
167
+ "MaxResolution",
168
+ "MediaError",
169
+ "MinResolution",
170
+ "RenditionOrder",
171
+ "default",
172
+ "playerSoftwareName",
173
+ "playerSoftwareVersion"
174
+ ],
175
+ "entryPoint": "src/index.tsx",
176
+ "inputs": {
177
+ "src/index.tsx": {
178
+ "bytesInOutput": 2003
179
+ },
180
+ "src/common/utils.ts": {
181
+ "bytesInOutput": 524
182
+ },
183
+ "src/useCombinedRefs.ts": {
184
+ "bytesInOutput": 177
185
+ },
186
+ "src/useObjectPropEffect.ts": {
187
+ "bytesInOutput": 602
188
+ },
189
+ "src/env.ts": {
190
+ "bytesInOutput": 71
191
+ }
192
+ },
193
+ "bytes": 3579
194
+ },
195
+ "dist/themes/classic.mjs.map": {
196
+ "imports": [],
197
+ "exports": [],
198
+ "inputs": {},
199
+ "bytes": 251
200
+ },
201
+ "dist/themes/classic.mjs": {
202
+ "imports": [
203
+ {
204
+ "path": "@mux/mux-player/themes/classic",
205
+ "kind": "import-statement",
206
+ "external": true
207
+ }
208
+ ],
209
+ "exports": [
210
+ "default"
211
+ ],
212
+ "entryPoint": "src/themes/classic.ts",
213
+ "inputs": {
214
+ "src/themes/classic.ts": {
215
+ "bytesInOutput": 55
216
+ }
217
+ },
218
+ "bytes": 127
219
+ },
220
+ "dist/themes/gerwig.mjs.map": {
221
+ "imports": [],
222
+ "exports": [],
223
+ "inputs": {},
224
+ "bytes": 247
225
+ },
226
+ "dist/themes/gerwig.mjs": {
227
+ "imports": [
228
+ {
229
+ "path": "@mux/mux-player/themes/gerwig",
230
+ "kind": "import-statement",
231
+ "external": true
232
+ }
233
+ ],
234
+ "exports": [
235
+ "default"
236
+ ],
237
+ "entryPoint": "src/themes/gerwig.ts",
238
+ "inputs": {
239
+ "src/themes/gerwig.ts": {
240
+ "bytesInOutput": 53
241
+ }
242
+ },
243
+ "bytes": 124
244
+ },
245
+ "dist/themes/microvideo.mjs.map": {
246
+ "imports": [],
247
+ "exports": [],
248
+ "inputs": {},
249
+ "bytes": 263
250
+ },
251
+ "dist/themes/microvideo.mjs": {
252
+ "imports": [
253
+ {
254
+ "path": "@mux/mux-player/themes/microvideo",
255
+ "kind": "import-statement",
256
+ "external": true
257
+ }
258
+ ],
259
+ "exports": [
260
+ "default"
261
+ ],
262
+ "entryPoint": "src/themes/microvideo.ts",
263
+ "inputs": {
264
+ "src/themes/microvideo.ts": {
265
+ "bytesInOutput": 61
266
+ }
267
+ },
268
+ "bytes": 136
269
+ },
270
+ "dist/themes/minimal.mjs.map": {
271
+ "imports": [],
272
+ "exports": [],
273
+ "inputs": {},
274
+ "bytes": 251
275
+ },
276
+ "dist/themes/minimal.mjs": {
277
+ "imports": [
278
+ {
279
+ "path": "@mux/mux-player/themes/minimal",
280
+ "kind": "import-statement",
281
+ "external": true
282
+ }
283
+ ],
284
+ "exports": [
285
+ "default"
286
+ ],
287
+ "entryPoint": "src/themes/minimal.ts",
288
+ "inputs": {
289
+ "src/themes/minimal.ts": {
290
+ "bytesInOutput": 55
291
+ }
292
+ },
293
+ "bytes": 127
294
+ }
295
+ }
296
+ }