@mux/studio-embed
Advanced tools
Comparing version 1.2.2 to 1.2.3-rc.1
@@ -1,1 +0,1 @@ | ||
var _=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var I=(r,e)=>{for(var t in e)_(r,t,{get:e[t],enumerable:!0})},L=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of U(e))!H.call(r,s)&&s!==t&&_(r,s,{get:()=>e[s],enumerable:!(a=b(e,s))||a.enumerable});return r};var w=r=>L(_({},"__esModule",{value:!0}),r);var M=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var n=(r,e,t)=>(M(r,e,"read from private field"),t?t.call(r):e.get(r)),i=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},o=(r,e,t,a)=>(M(r,e,"write to private field"),a?a.call(r,t):e.set(r,t),t);var B={};I(B,{createStudio:()=>G});module.exports=w(B);var T=["BROADCAST_STARTED","BROADCAST_ENDED","PARTICIPANT_JOINED","PARTICIPANT_LEFT","CAMERA_STARTED","CAMERA_STOPPED","MIC_STARTED","MIC_STOPPED","NAME_CHANGED"],k=["HEIGHT_CHANGED","REQUEST_THEME"],q=[...T,...k];var G=async(r,e,t)=>{if(typeof r!="string")throw new Error("Token must be provided and be a string");if(document.querySelector("#mux-studio-embed")!==null)throw new Error("Studio already embedded. Only one studio can be embedded at a time");let a=null;if(e instanceof HTMLElement?a=e:typeof e=="string"&&(a=document.querySelector(e)),!a)throw new Error("Invalid target element supplied");return new C(r,a,t!=null?t:{})},v,c,E,d,m,l,p,u,h,A,N,x,g,f,S,D,C=class{constructor(e,t,a){i(this,v,void 0);i(this,c,void 0);i(this,E,void 0);i(this,d,void 0);i(this,m,void 0);i(this,l,void 0);i(this,p,void 0);i(this,u,!0);i(this,h,void 0);i(this,A,()=>{if(n(this,E)===null)return;let e=n(this,E);e.title="Mux Studio Embed",e.id="mux-studio-embed",e.allow="camera; microphone; fullscreen; display-capture; autoplay",n(this,u)&&(e.style.width="100%",e.style.height="768px"),e.style.display="block",e.style.border="none";let t=`https://1.studio.mux.dev/iframe?token=${n(this,v)}`;n(this,l)&&(t+=`&bg=${encodeURIComponent(n(this,l))}`),n(this,p)&&(t+=`&ov=${encodeURIComponent(n(this,p))}`),t+=`&as=${n(this,u)?"1":"0"}`,e.src=t,e.onload=n(this,N).bind(this),n(this,c).appendChild(e)});i(this,N,()=>{var e;n(this,E)!==null&&((e=n(this,E).contentWindow)==null||e.postMessage("PORT_TRANSFER","*",[n(this,m).port2]),n(this,m).port1.onmessage=n(this,x))});i(this,x,e=>{var a;let{name:t}=e.data;switch(t){case"HEIGHT_CHANGED":let{data:s}=e.data;n(this,g).call(this,s.height);break;case"REQUEST_THEME":n(this,f).call(this);break}(a=n(this,d)[t])==null||a.forEach(s=>{s(e.data)})});i(this,g,e=>{n(this,E)===null||!n(this,u)||(n(this,E).style.height=e.toString(10)+"px")});i(this,f,()=>{n(this,S).call(this,{name:"THEME_UPDATE",data:{theme:n(this,h)}})});i(this,S,e=>{n(this,m).port1.postMessage(e)});i(this,D,e=>{T.forEach(t=>{this.on(t,e)})});this.on=(e,t)=>{n(this,d)[e].has(t)||n(this,d)[e].add(t)};this.off=(e,t)=>{t?n(this,d)[e].delete(t):n(this,d)[e].clear()};this.offAll=()=>{T.forEach(e=>n(this,d)[e].clear())};this.updateTheme=e=>{o(this,h,{...n(this,h),...e}),n(this,f).call(this)};this.updateOverlay=e=>{n(this,S).call(this,{name:"OVERLAY_UPDATE_EVENT",data:{url:e}})};this.updateBackground=e=>{n(this,S).call(this,{name:"BACKGROUND_UPDATE_EVENT",data:{url:e}})};this.remove=()=>{var e;this.offAll(),(e=n(this,E))==null||e.remove(),o(this,E,null)};var y,F,R,O;o(this,v,e),o(this,c,t),o(this,E,document.createElement("iframe")),o(this,m,new MessageChannel),o(this,l,(y=a==null?void 0:a.background)!=null?y:null),o(this,p,(F=a==null?void 0:a.overlay)!=null?F:null),o(this,u,(R=a==null?void 0:a.autoSize)!=null?R:!0),o(this,h,(O=a==null?void 0:a.theme)!=null?O:{});let s=T.map(P=>[P,new Set]);o(this,d,Object.fromEntries(s)),n(this,A).call(this)}};v=new WeakMap,c=new WeakMap,E=new WeakMap,d=new WeakMap,m=new WeakMap,l=new WeakMap,p=new WeakMap,u=new WeakMap,h=new WeakMap,A=new WeakMap,N=new WeakMap,x=new WeakMap,g=new WeakMap,f=new WeakMap,S=new WeakMap,D=new WeakMap; | ||
var _=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var I=(r,e)=>{for(var t in e)_(r,t,{get:e[t],enumerable:!0})},L=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of U(e))!H.call(r,s)&&s!==t&&_(r,s,{get:()=>e[s],enumerable:!(a=b(e,s))||a.enumerable});return r};var w=r=>L(_({},"__esModule",{value:!0}),r);var M=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var n=(r,e,t)=>(M(r,e,"read from private field"),t?t.call(r):e.get(r)),i=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},o=(r,e,t,a)=>(M(r,e,"write to private field"),a?a.call(r,t):e.set(r,t),t);var B={};I(B,{createStudio:()=>G});module.exports=w(B);var T=["BROADCAST_STARTED","BROADCAST_ENDED","PARTICIPANT_JOINED","PARTICIPANT_LEFT","CAMERA_STARTED","CAMERA_STOPPED","MIC_STARTED","MIC_STOPPED","NAME_CHANGED"],k=["HEIGHT_CHANGED","REQUEST_THEME"],q=[...T,...k];var G=async(r,e,t)=>{if(typeof r!="string")throw new Error("Token must be provided and be a string");if(document.querySelector("#mux-studio-embed")!==null)throw new Error("Studio already embedded. Only one studio can be embedded at a time");let a=null;if(e instanceof HTMLElement?a=e:typeof e=="string"&&(a=document.querySelector(e)),!a)throw new Error("Invalid target element supplied");return new C(r,a,t!=null?t:{})},v,c,E,d,m,l,p,u,h,A,N,x,g,f,S,D,C=class{constructor(e,t,a){i(this,v,void 0);i(this,c,void 0);i(this,E,void 0);i(this,d,void 0);i(this,m,void 0);i(this,l,void 0);i(this,p,void 0);i(this,u,!0);i(this,h,void 0);i(this,A,()=>{if(n(this,E)===null)return;let e=n(this,E);e.title="Mux Studio Embed",e.id="mux-studio-embed",e.allow="camera; microphone; fullscreen; display-capture; autoplay",n(this,u)&&(e.style.width="100%",e.style.height="768px"),e.style.display="block",e.style.border="none";let t=`https://1-2-3-rc-1.studio.mux.dev/iframe?token=${n(this,v)}`;n(this,l)&&(t+=`&bg=${encodeURIComponent(n(this,l))}`),n(this,p)&&(t+=`&ov=${encodeURIComponent(n(this,p))}`),t+=`&as=${n(this,u)?"1":"0"}`,e.src=t,e.onload=n(this,N).bind(this),n(this,c).appendChild(e)});i(this,N,()=>{var e;n(this,E)!==null&&((e=n(this,E).contentWindow)==null||e.postMessage("PORT_TRANSFER","*",[n(this,m).port2]),n(this,m).port1.onmessage=n(this,x))});i(this,x,e=>{var a;let{name:t}=e.data;switch(t){case"HEIGHT_CHANGED":let{data:s}=e.data;n(this,g).call(this,s.height);break;case"REQUEST_THEME":n(this,f).call(this);break}(a=n(this,d)[t])==null||a.forEach(s=>{s(e.data)})});i(this,g,e=>{n(this,E)===null||!n(this,u)||(n(this,E).style.height=e.toString(10)+"px")});i(this,f,()=>{n(this,S).call(this,{name:"THEME_UPDATE",data:{theme:n(this,h)}})});i(this,S,e=>{n(this,m).port1.postMessage(e)});i(this,D,e=>{T.forEach(t=>{this.on(t,e)})});this.on=(e,t)=>{n(this,d)[e].has(t)||n(this,d)[e].add(t)};this.off=(e,t)=>{t?n(this,d)[e].delete(t):n(this,d)[e].clear()};this.offAll=()=>{T.forEach(e=>n(this,d)[e].clear())};this.updateTheme=e=>{o(this,h,{...n(this,h),...e}),n(this,f).call(this)};this.updateOverlay=e=>{n(this,S).call(this,{name:"OVERLAY_UPDATE_EVENT",data:{url:e}})};this.updateBackground=e=>{n(this,S).call(this,{name:"BACKGROUND_UPDATE_EVENT",data:{url:e}})};this.remove=()=>{var e;this.offAll(),(e=n(this,E))==null||e.remove(),o(this,E,null)};var y,F,R,O;o(this,v,e),o(this,c,t),o(this,E,document.createElement("iframe")),o(this,m,new MessageChannel),o(this,l,(y=a==null?void 0:a.background)!=null?y:null),o(this,p,(F=a==null?void 0:a.overlay)!=null?F:null),o(this,u,(R=a==null?void 0:a.autoSize)!=null?R:!0),o(this,h,(O=a==null?void 0:a.theme)!=null?O:{});let s=T.map(P=>[P,new Set]);o(this,d,Object.fromEntries(s)),n(this,A).call(this)}};v=new WeakMap,c=new WeakMap,E=new WeakMap,d=new WeakMap,m=new WeakMap,l=new WeakMap,p=new WeakMap,u=new WeakMap,h=new WeakMap,A=new WeakMap,N=new WeakMap,x=new WeakMap,g=new WeakMap,f=new WeakMap,S=new WeakMap,D=new WeakMap; |
@@ -1,1 +0,1 @@ | ||
var muxStudioEmbed=(()=>{var _=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var I=(r,e)=>{for(var t in e)_(r,t,{get:e[t],enumerable:!0})},L=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of U(e))!H.call(r,s)&&s!==t&&_(r,s,{get:()=>e[s],enumerable:!(a=b(e,s))||a.enumerable});return r};var w=r=>L(_({},"__esModule",{value:!0}),r);var M=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var n=(r,e,t)=>(M(r,e,"read from private field"),t?t.call(r):e.get(r)),i=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},o=(r,e,t,a)=>(M(r,e,"write to private field"),a?a.call(r,t):e.set(r,t),t);var B={};I(B,{createStudio:()=>G});var T=["BROADCAST_STARTED","BROADCAST_ENDED","PARTICIPANT_JOINED","PARTICIPANT_LEFT","CAMERA_STARTED","CAMERA_STOPPED","MIC_STARTED","MIC_STOPPED","NAME_CHANGED"],k=["HEIGHT_CHANGED","REQUEST_THEME"],q=[...T,...k];var G=async(r,e,t)=>{if(typeof r!="string")throw new Error("Token must be provided and be a string");if(document.querySelector("#mux-studio-embed")!==null)throw new Error("Studio already embedded. Only one studio can be embedded at a time");let a=null;if(e instanceof HTMLElement?a=e:typeof e=="string"&&(a=document.querySelector(e)),!a)throw new Error("Invalid target element supplied");return new C(r,a,t!=null?t:{})},v,c,E,d,m,l,p,u,h,A,N,x,g,f,S,D,C=class{constructor(e,t,a){i(this,v,void 0);i(this,c,void 0);i(this,E,void 0);i(this,d,void 0);i(this,m,void 0);i(this,l,void 0);i(this,p,void 0);i(this,u,!0);i(this,h,void 0);i(this,A,()=>{if(n(this,E)===null)return;let e=n(this,E);e.title="Mux Studio Embed",e.id="mux-studio-embed",e.allow="camera; microphone; fullscreen; display-capture; autoplay",n(this,u)&&(e.style.width="100%",e.style.height="768px"),e.style.display="block",e.style.border="none";let t=`https://1.studio.mux.dev/iframe?token=${n(this,v)}`;n(this,l)&&(t+=`&bg=${encodeURIComponent(n(this,l))}`),n(this,p)&&(t+=`&ov=${encodeURIComponent(n(this,p))}`),t+=`&as=${n(this,u)?"1":"0"}`,e.src=t,e.onload=n(this,N).bind(this),n(this,c).appendChild(e)});i(this,N,()=>{var e;n(this,E)!==null&&((e=n(this,E).contentWindow)==null||e.postMessage("PORT_TRANSFER","*",[n(this,m).port2]),n(this,m).port1.onmessage=n(this,x))});i(this,x,e=>{var a;let{name:t}=e.data;switch(t){case"HEIGHT_CHANGED":let{data:s}=e.data;n(this,g).call(this,s.height);break;case"REQUEST_THEME":n(this,f).call(this);break}(a=n(this,d)[t])==null||a.forEach(s=>{s(e.data)})});i(this,g,e=>{n(this,E)===null||!n(this,u)||(n(this,E).style.height=e.toString(10)+"px")});i(this,f,()=>{n(this,S).call(this,{name:"THEME_UPDATE",data:{theme:n(this,h)}})});i(this,S,e=>{n(this,m).port1.postMessage(e)});i(this,D,e=>{T.forEach(t=>{this.on(t,e)})});this.on=(e,t)=>{n(this,d)[e].has(t)||n(this,d)[e].add(t)};this.off=(e,t)=>{t?n(this,d)[e].delete(t):n(this,d)[e].clear()};this.offAll=()=>{T.forEach(e=>n(this,d)[e].clear())};this.updateTheme=e=>{o(this,h,{...n(this,h),...e}),n(this,f).call(this)};this.updateOverlay=e=>{n(this,S).call(this,{name:"OVERLAY_UPDATE_EVENT",data:{url:e}})};this.updateBackground=e=>{n(this,S).call(this,{name:"BACKGROUND_UPDATE_EVENT",data:{url:e}})};this.remove=()=>{var e;this.offAll(),(e=n(this,E))==null||e.remove(),o(this,E,null)};var y,F,R,O;o(this,v,e),o(this,c,t),o(this,E,document.createElement("iframe")),o(this,m,new MessageChannel),o(this,l,(y=a==null?void 0:a.background)!=null?y:null),o(this,p,(F=a==null?void 0:a.overlay)!=null?F:null),o(this,u,(R=a==null?void 0:a.autoSize)!=null?R:!0),o(this,h,(O=a==null?void 0:a.theme)!=null?O:{});let s=T.map(P=>[P,new Set]);o(this,d,Object.fromEntries(s)),n(this,A).call(this)}};v=new WeakMap,c=new WeakMap,E=new WeakMap,d=new WeakMap,m=new WeakMap,l=new WeakMap,p=new WeakMap,u=new WeakMap,h=new WeakMap,A=new WeakMap,N=new WeakMap,x=new WeakMap,g=new WeakMap,f=new WeakMap,S=new WeakMap,D=new WeakMap;return w(B);})(); | ||
var muxStudioEmbed=(()=>{var _=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var I=(r,e)=>{for(var t in e)_(r,t,{get:e[t],enumerable:!0})},L=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of U(e))!H.call(r,s)&&s!==t&&_(r,s,{get:()=>e[s],enumerable:!(a=b(e,s))||a.enumerable});return r};var w=r=>L(_({},"__esModule",{value:!0}),r);var M=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var n=(r,e,t)=>(M(r,e,"read from private field"),t?t.call(r):e.get(r)),i=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)},o=(r,e,t,a)=>(M(r,e,"write to private field"),a?a.call(r,t):e.set(r,t),t);var B={};I(B,{createStudio:()=>G});var T=["BROADCAST_STARTED","BROADCAST_ENDED","PARTICIPANT_JOINED","PARTICIPANT_LEFT","CAMERA_STARTED","CAMERA_STOPPED","MIC_STARTED","MIC_STOPPED","NAME_CHANGED"],k=["HEIGHT_CHANGED","REQUEST_THEME"],q=[...T,...k];var G=async(r,e,t)=>{if(typeof r!="string")throw new Error("Token must be provided and be a string");if(document.querySelector("#mux-studio-embed")!==null)throw new Error("Studio already embedded. Only one studio can be embedded at a time");let a=null;if(e instanceof HTMLElement?a=e:typeof e=="string"&&(a=document.querySelector(e)),!a)throw new Error("Invalid target element supplied");return new C(r,a,t!=null?t:{})},v,c,E,d,m,l,p,u,h,A,N,x,g,f,S,D,C=class{constructor(e,t,a){i(this,v,void 0);i(this,c,void 0);i(this,E,void 0);i(this,d,void 0);i(this,m,void 0);i(this,l,void 0);i(this,p,void 0);i(this,u,!0);i(this,h,void 0);i(this,A,()=>{if(n(this,E)===null)return;let e=n(this,E);e.title="Mux Studio Embed",e.id="mux-studio-embed",e.allow="camera; microphone; fullscreen; display-capture; autoplay",n(this,u)&&(e.style.width="100%",e.style.height="768px"),e.style.display="block",e.style.border="none";let t=`https://1-2-3-rc-1.studio.mux.dev/iframe?token=${n(this,v)}`;n(this,l)&&(t+=`&bg=${encodeURIComponent(n(this,l))}`),n(this,p)&&(t+=`&ov=${encodeURIComponent(n(this,p))}`),t+=`&as=${n(this,u)?"1":"0"}`,e.src=t,e.onload=n(this,N).bind(this),n(this,c).appendChild(e)});i(this,N,()=>{var e;n(this,E)!==null&&((e=n(this,E).contentWindow)==null||e.postMessage("PORT_TRANSFER","*",[n(this,m).port2]),n(this,m).port1.onmessage=n(this,x))});i(this,x,e=>{var a;let{name:t}=e.data;switch(t){case"HEIGHT_CHANGED":let{data:s}=e.data;n(this,g).call(this,s.height);break;case"REQUEST_THEME":n(this,f).call(this);break}(a=n(this,d)[t])==null||a.forEach(s=>{s(e.data)})});i(this,g,e=>{n(this,E)===null||!n(this,u)||(n(this,E).style.height=e.toString(10)+"px")});i(this,f,()=>{n(this,S).call(this,{name:"THEME_UPDATE",data:{theme:n(this,h)}})});i(this,S,e=>{n(this,m).port1.postMessage(e)});i(this,D,e=>{T.forEach(t=>{this.on(t,e)})});this.on=(e,t)=>{n(this,d)[e].has(t)||n(this,d)[e].add(t)};this.off=(e,t)=>{t?n(this,d)[e].delete(t):n(this,d)[e].clear()};this.offAll=()=>{T.forEach(e=>n(this,d)[e].clear())};this.updateTheme=e=>{o(this,h,{...n(this,h),...e}),n(this,f).call(this)};this.updateOverlay=e=>{n(this,S).call(this,{name:"OVERLAY_UPDATE_EVENT",data:{url:e}})};this.updateBackground=e=>{n(this,S).call(this,{name:"BACKGROUND_UPDATE_EVENT",data:{url:e}})};this.remove=()=>{var e;this.offAll(),(e=n(this,E))==null||e.remove(),o(this,E,null)};var y,F,R,O;o(this,v,e),o(this,c,t),o(this,E,document.createElement("iframe")),o(this,m,new MessageChannel),o(this,l,(y=a==null?void 0:a.background)!=null?y:null),o(this,p,(F=a==null?void 0:a.overlay)!=null?F:null),o(this,u,(R=a==null?void 0:a.autoSize)!=null?R:!0),o(this,h,(O=a==null?void 0:a.theme)!=null?O:{});let s=T.map(P=>[P,new Set]);o(this,d,Object.fromEntries(s)),n(this,A).call(this)}};v=new WeakMap,c=new WeakMap,E=new WeakMap,d=new WeakMap,m=new WeakMap,l=new WeakMap,p=new WeakMap,u=new WeakMap,h=new WeakMap,A=new WeakMap,N=new WeakMap,x=new WeakMap,g=new WeakMap,f=new WeakMap,S=new WeakMap,D=new WeakMap;return w(B);})(); |
@@ -1,3 +0,3 @@ | ||
import { EventName } from 'shared'; | ||
import { ThemeOptions } from 'shared'; | ||
import { EventName } from './shared'; | ||
import { ThemeOptions } from './shared'; | ||
interface Options { | ||
@@ -52,7 +52,2 @@ background?: string; | ||
} | ||
/** | ||
* Make importing easier for consumers | ||
* Be specific about which types to export, we don't want to export types | ||
* only used internally that we may want to change at will. | ||
*/ | ||
export type { ThemeOptions, EventName } from 'shared'; | ||
export type { ThemeOptions, EventName } from './shared'; |
{ | ||
"name": "@mux/studio-embed", | ||
"version": "1.2.2", | ||
"version": "1.2.3-rc.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "license": "UNLICENSED", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19896
9
168
2