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

@mux/mux-player-react

Package Overview
Dependencies
Maintainers
1
Versions
562
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 2.9.1 to 3.0.0-canary.0-0f9d0fb

CHANGELOG.md

16

dist/esm.lazy.json

@@ -69,3 +69,3 @@ {

"src/index.tsx": {
"bytes": 10038,
"bytes": 10208,
"imports": [

@@ -177,3 +177,3 @@ {

{
"path": "dist/-M3QGHOZN.mjs",
"path": "dist/-QEWOA6LP.mjs",
"kind": "dynamic-import"

@@ -202,9 +202,9 @@ }

},
"dist/-M3QGHOZN.mjs.map": {
"dist/-QEWOA6LP.mjs.map": {
"imports": [],
"exports": [],
"inputs": {},
"bytes": 22260
"bytes": 22497
},
"dist/-M3QGHOZN.mjs": {
"dist/-QEWOA6LP.mjs": {
"imports": [

@@ -252,6 +252,6 @@ {

"src/index.tsx": {
"bytesInOutput": 1962
"bytesInOutput": 2003
},
"src/common/utils.ts": {
"bytesInOutput": 522
"bytesInOutput": 524
},

@@ -268,5 +268,5 @@ "src/useCombinedRefs.ts": {

},
"bytes": 3487
"bytes": 3530
}
}
}

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

"use strict";"use client";var te=Object.create;var p=Object.defineProperty;var ae=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var oe=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var se=(e,n)=>{for(var t in n)p(e,t,{get:n[t],enumerable:!0})},E=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of re(n))!ie.call(e,r)&&r!==t&&p(e,r,{get:()=>n[r],enumerable:!(o=ae(n,r))||o.enumerable});return e};var le=(e,n,t)=>(t=e!=null?te(oe(e)):{},E(n||!e||!e.__esModule?p(t,"default",{value:e,enumerable:!0}):t,e)),ue=e=>E(p({},"__esModule",{value:!0}),e);var ke={};se(ke,{MaxResolution:()=>c.MaxResolution,MediaError:()=>v.MediaError,MinResolution:()=>c.MinResolution,RenditionOrder:()=>c.RenditionOrder,default:()=>Ce});module.exports=ue(ke);var y=le(require("react")),c=require("@mux/playback-core"),v=require("@mux/mux-player");var g={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},ye=e=>e==null,ce=(e,n)=>ye(n)?!1:e in n,pe=e=>e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),de=(e,n)=>{if(!(typeof n=="boolean"&&!n)){if(ce(e,g))return g[e];if(typeof n!=null)return/[A-Z]/.test(e)?pe(e):e}};var me=(e,n)=>typeof e=="boolean"?"":e,M=(e={})=>Object.entries(e).reduce((n,[t,o])=>{let r=de(t,o);if(!r)return n;let s=me(o,t);return n[r]=s,n},{});var x=require("react");var d=require("react"),P=(...e)=>{let n=(0,d.useRef)(null);return(0,d.useEffect)(()=>{e.forEach(t=>{t&&(typeof t=="function"?t(n.current):t.current=n.current)})},[e]),n};var f=require("react"),Ee=Object.prototype.hasOwnProperty,ge=(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(!Ee.call(n,t[r])||!Object.is(e[t[r]],n[t[r]]))return!1;return!0},m=(e,n,t)=>!ge(n,e[t]),Me=(e,n,t)=>{e[t]=n},Pe=(e,n,t,o=Me,r=m)=>(0,f.useEffect)(()=>{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=Pe;var fe=()=>{try{return"2.9.1"}catch{}return"UNKNOWN"},be=fe(),b=()=>be;var ve=y.default.forwardRef(({children:e,...n},t)=>y.default.createElement("mux-player",M({...n,ref:t}),e)),a=(e,n,t)=>(0,y.useEffect)(()=>{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]),xe=(e,n)=>{let{onAbort:t,onCanPlay:o,onCanPlayThrough:r,onEmptied:s,onLoadStart:h,onLoadedData:T,onLoadedMetadata:R,onProgress:C,onDurationChange:k,onVolumeChange:L,onRateChange:O,onResize:S,onWaiting:G,onPlay:w,onPlaying:V,onTimeUpdate:A,onPause:N,onSeeking:I,onSeeked:K,onStalled:D,onSuspend:U,onEnded:_,onError:H,onCuePointChange:j,onCuePointsChange:z,onChapterChange:F,metadata:W,tokens:Z,paused:q,playbackId:J,playbackRates:Y,currentTime:$,themeProps:Q,extraSourceParams:X,_hlsConfig:B,...ee}=n;return i("playbackRates",Y,e),i("metadata",W,e),i("extraSourceParams",X,e),i("_hlsConfig",B,e),i("themeProps",Q,e),i("tokens",Z,e),i("playbackId",J,e),i("paused",q,e,(l,u)=>{u!=null&&(u?l.pause():l.play())},(l,u,ne)=>l.hasAttribute("autoplay")&&!l.hasPlayed?!1:m(l,u,ne)),i("currentTime",$,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,h),a("loadeddata",e,T),a("loadedmetadata",e,R),a("progress",e,C),a("durationchange",e,k),a("volumechange",e,L),a("ratechange",e,O),a("resize",e,S),a("waiting",e,G),a("play",e,w),a("playing",e,V),a("timeupdate",e,A),a("pause",e,N),a("seeking",e,I),a("seeked",e,K),a("stalled",e,D),a("suspend",e,U),a("ended",e,_),a("error",e,H),a("cuepointchange",e,j),a("cuepointschange",e,z),a("chapterchange",e,F),[ee]},he=b(),Te="mux-player-react",Re=y.default.forwardRef((e,n)=>{let t=(0,x.useRef)(null),o=P(t,n),[r]=xe(t,e);return y.default.createElement(ve,{ref:o,playerSoftwareName:Te,playerSoftwareVersion:he,...r})}),Ce=Re;
"use strict";"use client";var ae=Object.create;var d=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames;var ie=Object.getPrototypeOf,se=Object.prototype.hasOwnProperty;var le=(e,n)=>{for(var t in n)d(e,t,{get:n[t],enumerable:!0})},E=(e,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of oe(n))!se.call(e,r)&&r!==t&&d(e,r,{get:()=>n[r],enumerable:!(o=re(n,r))||o.enumerable});return e};var ue=(e,n,t)=>(t=e!=null?ae(ie(e)):{},E(n||!e||!e.__esModule?d(t,"default",{value:e,enumerable:!0}):t,e)),ye=e=>E(d({},"__esModule",{value:!0}),e);var Le={};le(Le,{MaxResolution:()=>c.MaxResolution,MediaError:()=>v.MediaError,MinResolution:()=>c.MinResolution,RenditionOrder:()=>c.RenditionOrder,default:()=>ke});module.exports=ye(Le);var y=ue(require("react")),c=require("@mux/playback-core"),v=require("@mux/mux-player");var g={className:"class",classname:"class",htmlFor:"for",crossOrigin:"crossorigin",viewBox:"viewBox",playsInline:"playsinline",autoPlay:"autoplay",playbackRate:"playbackrate"},ce=e=>e==null,de=(e,n)=>ce(n)?!1:e in n,pe=e=>e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),me=(e,n)=>{if(!(typeof n=="boolean"&&!n)){if(de(e,g))return g[e];if(typeof n!=null)return/[A-Z]/.test(e)?pe(e):e}};var Ee=(e,n)=>typeof e=="boolean"?"":e,M=(e={})=>Object.entries(e).reduce((n,[t,o])=>{let r=me(t,o);if(!r)return n;let s=Ee(o,t);return n[r]=s,n},{});var x=require("react");var p=require("react"),f=(...e)=>{let n=(0,p.useRef)(null);return(0,p.useEffect)(()=>{e.forEach(t=>{t&&(typeof t=="function"?t(n.current):t.current=n.current)})},[e]),n};var P=require("react"),ge=Object.prototype.hasOwnProperty,Me=(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(!ge.call(n,t[r])||!Object.is(e[t[r]],n[t[r]]))return!1;return!0},m=(e,n,t)=>!Me(n,e[t]),fe=(e,n,t)=>{e[t]=n},Pe=(e,n,t,o=fe,r=m)=>(0,P.useEffect)(()=>{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=Pe;var be=()=>{try{return"3.0.0"}catch{}return"UNKNOWN"},ve=be(),b=()=>ve;var xe=y.default.forwardRef(({children:e,...n},t)=>y.default.createElement("mux-player",M({...n,ref:t}),e)),a=(e,n,t)=>(0,y.useEffect)(()=>{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]),he=(e,n)=>{let{onAbort:t,onCanPlay:o,onCanPlayThrough:r,onEmptied:s,onLoadStart:h,onLoadedData:T,onLoadedMetadata:R,onProgress:C,onDurationChange:k,onVolumeChange:L,onRateChange:O,onResize:S,onWaiting:G,onPlay:w,onPlaying:V,onTimeUpdate:A,onPause:N,onSeeking:D,onSeeked:I,onStalled:K,onSuspend:U,onEnded:_,onError:H,onCuePointChange:j,onCuePointsChange:z,onChapterChange:F,metadata:W,tokens:Z,paused:q,playbackId:J,playbackRates:Y,currentTime:$,themeProps:Q,extraSourceParams:X,castCustomData:B,_hlsConfig:ee,...ne}=n;return i("playbackRates",Y,e),i("metadata",W,e),i("extraSourceParams",X,e),i("_hlsConfig",ee,e),i("themeProps",Q,e),i("tokens",Z,e),i("playbackId",J,e),i("castCustomData",B,e),i("paused",q,e,(l,u)=>{u!=null&&(u?l.pause():l.play())},(l,u,te)=>l.hasAttribute("autoplay")&&!l.hasPlayed?!1:m(l,u,te)),i("currentTime",$,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,h),a("loadeddata",e,T),a("loadedmetadata",e,R),a("progress",e,C),a("durationchange",e,k),a("volumechange",e,L),a("ratechange",e,O),a("resize",e,S),a("waiting",e,G),a("play",e,w),a("playing",e,V),a("timeupdate",e,A),a("pause",e,N),a("seeking",e,D),a("seeked",e,I),a("stalled",e,K),a("suspend",e,U),a("ended",e,_),a("error",e,H),a("cuepointchange",e,j),a("cuepointschange",e,z),a("chapterchange",e,F),[ne]},Te=b(),Re="mux-player-react",Ce=y.default.forwardRef((e,n)=>{let t=(0,x.useRef)(null),o=f(t,n),[r]=he(t,e);return y.default.createElement(xe,{ref:o,playerSoftwareName:Re,playerSoftwareVersion:Te,...r})}),ke=Ce;
//# sourceMappingURL=index.cjs.js.map

@@ -57,2 +57,4 @@ import React from 'react';

nohotkeys?: boolean;
castReceiver?: string | undefined;
castCustomData?: Record<string, any> | undefined;
defaultHiddenCaptions?: boolean;

@@ -59,0 +61,0 @@ playerSoftwareVersion?: string;

export declare const defaultHasChanged: (obj: any, v: any, k: string) => boolean;
export declare const useObjectPropEffect: <T extends {
[k: string]: any;
}, V>(propName: string, propValue: V | null | undefined, ref: import("react").MutableRefObject<T | null> | null | undefined, updateValue?: (obj: any, v: any, k: string) => void, hasChanged?: (obj: any, v: any, k: string) => boolean) => void;
}, V>(propName: string, propValue: V | null | undefined, ref: React.MutableRefObject<T | null> | null | undefined, updateValue?: (obj: any, v: any, k: string) => void, hasChanged?: (obj: any, v: any, k: string) => boolean) => void;
export default useObjectPropEffect;

@@ -57,2 +57,4 @@ import React from 'react';

nohotkeys?: boolean;
castReceiver?: string | undefined;
castCustomData?: Record<string, any> | undefined;
defaultHiddenCaptions?: boolean;

@@ -59,0 +61,0 @@ playerSoftwareVersion?: string;

export declare const defaultHasChanged: (obj: any, v: any, k: string) => boolean;
export declare const useObjectPropEffect: <T extends {
[k: string]: any;
}, V>(propName: string, propValue: V | null | undefined, ref: import("react").MutableRefObject<T | null> | null | undefined, updateValue?: (obj: any, v: any, k: string) => void, hasChanged?: (obj: any, v: any, k: string) => boolean) => void;
}, V>(propName: string, propValue: V | null | undefined, ref: React.MutableRefObject<T | null> | null | undefined, updateValue?: (obj: any, v: any, k: string) => void, hasChanged?: (obj: any, v: any, k: string) => boolean) => void;
export default useObjectPropEffect;
{
"name": "@mux/mux-player-react",
"version": "2.9.1",
"version": "3.0.0-canary.0-0f9d0fb",
"description": "An open source Mux player for React that Just Works™",

@@ -101,4 +101,4 @@ "homepage": "https://mux.com/player",

"dependencies": {
"@mux/mux-player": "2.9.1",
"@mux/playback-core": "0.25.2",
"@mux/mux-player": "3.0.0-canary.0-0f9d0fb",
"@mux/playback-core": "0.26.0",
"prop-types": "^15.7.2"

@@ -116,5 +116,4 @@ },

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

@@ -8,6 +8,10 @@ <p align="center">

# New release: 2.0
# New release: 3.0
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).
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).
## Previous version: 2.0
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).
# Introduction

@@ -14,0 +18,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc