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
584
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.13.1-canary.3 to 0.13.1

2

dist/index.cjs.js

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

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

@@ -70,3 +70,3 @@ "keywords": [

"dependencies": {
"@mux/playback-core": "0.28.0",
"@mux/playback-core": "0.28.1",
"prop-types": "^15.7.2"

@@ -73,0 +73,0 @@ },

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