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

@mux/mux-video-react

Package Overview
Dependencies
Maintainers
0
Versions
552
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.11.1 to 0.11.2-canary.0-05ed19b

CHANGELOG.md

2

dist/index.cjs.js

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

"use strict";"use client";var k=Object.create;var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var H=(t,r)=>{for(var o in r)p(t,o,{get:r[o],enumerable:!0})},M=(t,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of S(r))!w.call(t,s)&&s!==o&&p(t,s,{get:()=>r[s],enumerable:!(c=j(r,s))||c.enumerable});return t};var O=(t,r,o)=>(o=t!=null?k(L(t)):{},M(r||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),I=t=>M(p({},"__esModule",{value:!0}),t);var W={};H(W,{default:()=>U});module.exports=I(W);var f=require("react"),P=(...t)=>{let r=(0,f.useRef)(null);return(0,f.useEffect)(()=>{t.forEach(o=>{o&&(typeof o=="function"?o(r.current):o.current=r.current)})},[t]),r};var a=O(require("react")),e=O(require("prop-types")),n=require("@mux/playback-core");var h=()=>{try{return"0.11.1"}catch{}return"UNKNOWN"},N=h(),g=()=>N;var A=g(),D="mux-video-react",y=a.default.forwardRef((t,r)=>{var R;let{playbackId:o,src:c,children:s,autoPlay:d,preload:m,...E}=t,x=Object.fromEntries(Object.entries(E).filter(([i])=>!Object.keys(y.propTypes).includes(i))),[C]=(0,a.useState)((0,n.generatePlayerInitTime)()),[b,v]=(0,a.useState)((R=(0,n.toMuxVideoURL)(t))!=null?R:c),l=(0,a.useRef)(void 0),V=(0,a.useRef)(null),T=P(V,r);return(0,a.useEffect)(()=>{var i;v((i=(0,n.toMuxVideoURL)(t))!=null?i:c)},[c,o]),(0,a.useEffect)(()=>{let i={...t,src:b,playerInitTime:C,playerSoftwareName:D,playerSoftwareVersion:A,autoplay:d},u=T.current;return u&&(l.current=(0,n.initialize)(i,u,l.current)),()=>{(0,n.teardown)(u,l.current),u=void 0,l.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=l.current)==null||i.setAutoplay(d)},[d]),(0,a.useEffect)(()=>{var i;(i=l.current)==null||i.setPreload(m)},[m]),a.default.createElement("video",{ref:T,...x},s)});y.propTypes={_hlsConfig:e.default.any,beaconCollectionDomain:e.default.string,customDomain:e.default.string,debug:e.default.bool,disableCookies:e.default.bool,disableTracking:e.default.bool,envKey:e.default.string,errorTranslator:e.default.any,liveEdgeStart:e.default.number,maxResolution:e.default.oneOf(["720p","1080p","1440p","2160p"]),metadata:e.default.any,minResolution:e.default.oneOf(["480p","540p","720p","1080p","1440p","2160p"]),playbackId:e.default.string,playerInitTime:e.default.number,preferCmcd:e.default.oneOf(Object.values(n.CmcdTypes)),preferPlayback:e.default.oneOf(Object.values(n.PlaybackTypes)),programStartTime:e.default.number,programEndTime:e.default.number,renditionOrder:e.default.oneOf(["desc"]),startTime:e.default.number,streamType:e.default.oneOf(Object.values(n.StreamTypes)),targetLiveWindow:e.default.number,tokens:e.default.any,type:e.default.oneOf(n.allMediaTypes)};var U=y;
"use strict";"use client";var k=Object.create;var p=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var H=(t,r)=>{for(var o in r)p(t,o,{get:r[o],enumerable:!0})},M=(t,r,o,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of S(r))!w.call(t,s)&&s!==o&&p(t,s,{get:()=>r[s],enumerable:!(c=j(r,s))||c.enumerable});return t};var O=(t,r,o)=>(o=t!=null?k(L(t)):{},M(r||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),I=t=>M(p({},"__esModule",{value:!0}),t);var W={};H(W,{default:()=>U});module.exports=I(W);var f=require("react"),P=(...t)=>{let r=(0,f.useRef)(null);return(0,f.useEffect)(()=>{t.forEach(o=>{o&&(typeof o=="function"?o(r.current):o.current=r.current)})},[t]),r};var a=O(require("react")),e=O(require("prop-types")),n=require("@mux/playback-core");var h=()=>{try{return"0.11.2"}catch{}return"UNKNOWN"},N=h(),g=()=>N;var A=g(),D="mux-video-react",y=a.default.forwardRef((t,r)=>{var R;let{playbackId:o,src:c,children:s,autoPlay:d,preload:m,...E}=t,x=Object.fromEntries(Object.entries(E).filter(([i])=>!Object.keys(y.propTypes).includes(i))),[C]=(0,a.useState)((0,n.generatePlayerInitTime)()),[b,v]=(0,a.useState)((R=(0,n.toMuxVideoURL)(t))!=null?R:c),l=(0,a.useRef)(void 0),V=(0,a.useRef)(null),T=P(V,r);return(0,a.useEffect)(()=>{var i;v((i=(0,n.toMuxVideoURL)(t))!=null?i:c)},[c,o]),(0,a.useEffect)(()=>{let i={...t,src:b,playerInitTime:C,playerSoftwareName:D,playerSoftwareVersion:A,autoplay:d},u=T.current;return u&&(l.current=(0,n.initialize)(i,u,l.current)),()=>{(0,n.teardown)(u,l.current),u=void 0,l.current=void 0}},[b]),(0,a.useEffect)(()=>{var i;(i=l.current)==null||i.setAutoplay(d)},[d]),(0,a.useEffect)(()=>{var i;(i=l.current)==null||i.setPreload(m)},[m]),a.default.createElement("video",{ref:T,...x},s)});y.propTypes={_hlsConfig:e.default.any,beaconCollectionDomain:e.default.string,customDomain:e.default.string,debug:e.default.bool,disableCookies:e.default.bool,disableTracking:e.default.bool,envKey:e.default.string,errorTranslator:e.default.any,liveEdgeStart:e.default.number,maxResolution:e.default.oneOf(["720p","1080p","1440p","2160p"]),metadata:e.default.any,minResolution:e.default.oneOf(["480p","540p","720p","1080p","1440p","2160p"]),playbackId:e.default.string,playerInitTime:e.default.number,preferCmcd:e.default.oneOf(Object.values(n.CmcdTypes)),preferPlayback:e.default.oneOf(Object.values(n.PlaybackTypes)),programStartTime:e.default.number,programEndTime:e.default.number,renditionOrder:e.default.oneOf(["desc"]),startTime:e.default.number,streamType:e.default.oneOf(Object.values(n.StreamTypes)),targetLiveWindow:e.default.number,tokens:e.default.any,type:e.default.oneOf(n.allMediaTypes)};var U=y;
//# sourceMappingURL=index.cjs.js.map
{
"name": "@mux/mux-video-react",
"version": "0.11.1",
"version": "0.11.2-canary.0-05ed19b",
"description": "A custom mux video element for React that Just Works™",

@@ -59,5 +59,5 @@ "keywords": [

"peerDependencies": {
"@types/react": "^17.0.0 || ^18",
"react": "^17.0.2 || ^18",
"react-dom": "^17.0.2 || ^18"
"@types/react": "^17.0.0 || ^18 || ^19",
"react": "^17.0.2 || ^18 || ^19",
"react-dom": "^17.0.2 || ^18 || ^19"
},

@@ -73,3 +73,3 @@ "peerDependenciesMeta": {

"dependencies": {
"@mux/playback-core": "0.25.0",
"@mux/playback-core": "0.25.1-canary.0-05ed19b",
"prop-types": "^15.7.2"

@@ -91,4 +91,3 @@ },

"typescript": "^4.9.4"
},
"gitHead": "1e6972805459a0bb3a18b5b5a6d0bbf32c900b17"
}
}

@@ -69,3 +69,2 @@ <p align="center">

}}
streamType="on-demand"
controls

@@ -72,0 +71,0 @@ autoPlay

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