New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mux/mux-player-react

Package Overview
Dependencies
Maintainers
1
Versions
600
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 3.1.0-canary.0-b762184 to 3.1.0-canary.0-d0559f7

dist/-M6R2IWZF.mjs

25

dist/cjs.json
{
"inputs": {
"src/common/utils.ts": {
"bytes": 2048,
"imports": [],
"bytes": 2664,
"imports": [
{
"path": "react",
"kind": "import-statement",
"external": true
}
],
"format": "esm"

@@ -36,3 +42,3 @@ },

"src/index.tsx": {
"bytes": 10274,
"bytes": 10484,
"imports": [

@@ -132,3 +138,3 @@ {

"inputs": {},
"bytes": 22627
"bytes": 23751
},

@@ -166,2 +172,7 @@ "dist/index.cjs.js": {

"external": true
},
{
"path": "react",
"kind": "require-call",
"external": true
}

@@ -173,6 +184,6 @@ ],

"src/index.tsx": {
"bytesInOutput": 2207
"bytesInOutput": 2367
},
"src/common/utils.ts": {
"bytesInOutput": 532
"bytesInOutput": 603
},

@@ -189,3 +200,3 @@ "src/useCombinedRefs.ts": {

},
"bytes": 4214
"bytes": 4444
},

@@ -192,0 +203,0 @@ "dist/themes/classic.cjs.js.map": {

{
"inputs": {
"src/common/utils.ts": {
"bytes": 2048,
"imports": [],
"bytes": 2664,
"imports": [
{
"path": "react",
"kind": "import-statement",
"external": true
}
],
"format": "esm"

@@ -36,3 +42,3 @@ },

"src/index.tsx": {
"bytes": 10274,
"bytes": 10484,
"imports": [

@@ -132,3 +138,3 @@ {

"inputs": {},
"bytes": 22565
"bytes": 23772
},

@@ -166,2 +172,7 @@ "dist/index.mjs": {

"external": true
},
{
"path": "react",
"kind": "import-statement",
"external": true
}

@@ -175,2 +186,3 @@ ],

"default",
"generatePlayerInitTime",
"playerSoftwareName",

@@ -182,6 +194,6 @@ "playerSoftwareVersion"

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

@@ -198,3 +210,3 @@ "src/useCombinedRefs.ts": {

},
"bytes": 3579
"bytes": 3783
},

@@ -201,0 +213,0 @@ "dist/themes/classic.mjs.map": {

@@ -37,4 +37,10 @@ {

"src/common/utils.ts": {
"bytes": 2048,
"imports": [],
"bytes": 2664,
"imports": [
{
"path": "react",
"kind": "import-statement",
"external": true
}
],
"format": "esm"

@@ -70,3 +76,3 @@ },

"src/index.tsx": {
"bytes": 10274,
"bytes": 10484,
"imports": [

@@ -178,3 +184,3 @@ {

{
"path": "dist/-6C2FGIUL.mjs",
"path": "dist/-M6R2IWZF.mjs",
"kind": "dynamic-import"

@@ -203,9 +209,9 @@ }

},
"dist/-6C2FGIUL.mjs.map": {
"dist/-M6R2IWZF.mjs.map": {
"imports": [],
"exports": [],
"inputs": {},
"bytes": 22565
"bytes": 23772
},
"dist/-6C2FGIUL.mjs": {
"dist/-M6R2IWZF.mjs": {
"imports": [

@@ -241,2 +247,7 @@ {

"external": true
},
{
"path": "react",
"kind": "import-statement",
"external": true
}

@@ -250,2 +261,3 @@ ],

"default",
"generatePlayerInitTime",
"playerSoftwareName",

@@ -257,6 +269,6 @@ "playerSoftwareVersion"

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

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

},
"bytes": 3583
"bytes": 3787
}
}
}

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

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

@@ -9,0 +9,0 @@ [k: string]: string;

import React from 'react';
import { CSSProperties } from 'react';
import { StreamTypes, PlaybackTypes, CmcdTypes, MaxResolutionValue, MinResolutionValue, RenditionOrderValue } from '@mux/playback-core';
import { MaxResolution, MinResolution, RenditionOrder } from '@mux/playback-core';
import { MaxResolution, MinResolution, RenditionOrder, generatePlayerInitTime } from '@mux/playback-core';
import { MediaError } from '@mux/mux-player';
import MuxPlayerElement from '@mux/mux-player';
import { Tokens, MuxPlayerElementEventMap } from '@mux/mux-player';
export { MediaError, MaxResolution, MinResolution, RenditionOrder };
export { MediaError, MaxResolution, MinResolution, RenditionOrder, generatePlayerInitTime };
type ValueOf<T> = T[keyof T];

@@ -62,2 +62,3 @@ interface GenericEventListener<T extends Event = CustomEvent> {

playerSoftwareName?: string;
playerInitTime?: number;
forwardSeekOffset?: number;

@@ -64,0 +65,0 @@ backwardSeekOffset?: number;

type KeyTypes = string | number | symbol;
type Maybe<T> = T | null | undefined;
export declare const isNil: (x: unknown) => x is null | undefined;
export declare const isKeyOf: <T extends {} = any>(k: KeyTypes, o: Maybe<T>) => k is keyof T;
export declare const isKeyOf: <T extends object = any>(k: KeyTypes, o: Maybe<T>) => k is keyof T;
export declare const toNativeAttrName: (propName: string, propValue: any) => string | undefined;
export declare const toStyleAttr: <T>(x: T) => T;
export declare const toNativeAttrValue: (propValue: any, propName: string) => any;
export declare const toNativeAttrValue: (propValue: any, _propName: string) => any;
export declare const toNativeProps: (props?: {}) => {

@@ -9,0 +9,0 @@ [k: string]: string;

import React from 'react';
import type { CSSProperties } from 'react';
import type { StreamTypes, PlaybackTypes, CmcdTypes, MaxResolutionValue, MinResolutionValue, RenditionOrderValue } from '@mux/playback-core';
import { MaxResolution, MinResolution, RenditionOrder } from '@mux/playback-core';
import { MaxResolution, MinResolution, RenditionOrder, generatePlayerInitTime } from '@mux/playback-core';
import { MediaError } from '@mux/mux-player';
import type MuxPlayerElement from '@mux/mux-player';
import type { Tokens, MuxPlayerElementEventMap } from '@mux/mux-player';
export { MediaError, MaxResolution, MinResolution, RenditionOrder };
export { MediaError, MaxResolution, MinResolution, RenditionOrder, generatePlayerInitTime };
type ValueOf<T> = T[keyof T];

@@ -62,2 +62,3 @@ interface GenericEventListener<T extends Event = CustomEvent> {

playerSoftwareName?: string;
playerInitTime?: number;
forwardSeekOffset?: number;

@@ -64,0 +65,0 @@ backwardSeekOffset?: number;

{
"name": "@mux/mux-player-react",
"version": "3.1.0-canary.0-b762184",
"version": "3.1.0-canary.0-d0559f7",
"description": "An open source Mux player for React that Just Works™",

@@ -84,3 +84,2 @@ "homepage": "https://mux.com/player",

"build": "npm-run-all --parallel 'build:cjs --minify' 'build:esm --minify' 'build:esm:lazy --minify'",
"create-release-notes": "create-release-notes ./CHANGELOG.md",
"publish-release": "../../scripts/publish.sh"

@@ -102,4 +101,4 @@ },

"dependencies": {
"@mux/mux-player": "3.1.0-canary.0-b762184",
"@mux/playback-core": "0.27.0-canary.0-b762184",
"@mux/mux-player": "3.1.0-canary.0-d0559f7",
"@mux/playback-core": "0.27.0",
"prop-types": "^15.7.2"

@@ -106,0 +105,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

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