@xcall/sdk 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xcall.min.d.mts +2 -6
- package/dist/xcall.min.d.ts +2 -6
- package/dist/xcall.min.esm.js +1 -1
- package/dist/xcall.min.esm.js.map +1 -1
- package/dist/xcall.min.js +1 -1
- package/dist/xcall.min.js.map +1 -1
- package/package.json +4 -4
package/dist/xcall.min.d.mts
CHANGED
|
@@ -82,21 +82,17 @@ type XCallIncomingMessage = {
|
|
|
82
82
|
declare class XCall {
|
|
83
83
|
private iframe;
|
|
84
84
|
private origin;
|
|
85
|
-
private
|
|
85
|
+
private emitter;
|
|
86
86
|
private messageHandler;
|
|
87
87
|
constructor(options: XCallOptions);
|
|
88
|
-
private _createIframe;
|
|
89
|
-
private _applyStyles;
|
|
90
|
-
private _handleMessage;
|
|
91
88
|
on<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this;
|
|
92
89
|
off<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this;
|
|
93
90
|
muteAudio(muted: boolean): void;
|
|
94
91
|
muteVideo(muted: boolean): void;
|
|
95
92
|
leave(): void;
|
|
96
|
-
/** Remove o iframe e os listeners. Chame quando destruir o componente. */
|
|
97
93
|
destroy(): void;
|
|
94
|
+
private _handleMessage;
|
|
98
95
|
private _send;
|
|
99
|
-
private _emit;
|
|
100
96
|
}
|
|
101
97
|
|
|
102
98
|
export { XCall, type XCallCommand, type XCallEventCallback, type XCallEventMap, type XCallEventName, type XCallIncomingMessage, type XCallOptions };
|
package/dist/xcall.min.d.ts
CHANGED
|
@@ -82,21 +82,17 @@ type XCallIncomingMessage = {
|
|
|
82
82
|
declare class XCall {
|
|
83
83
|
private iframe;
|
|
84
84
|
private origin;
|
|
85
|
-
private
|
|
85
|
+
private emitter;
|
|
86
86
|
private messageHandler;
|
|
87
87
|
constructor(options: XCallOptions);
|
|
88
|
-
private _createIframe;
|
|
89
|
-
private _applyStyles;
|
|
90
|
-
private _handleMessage;
|
|
91
88
|
on<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this;
|
|
92
89
|
off<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this;
|
|
93
90
|
muteAudio(muted: boolean): void;
|
|
94
91
|
muteVideo(muted: boolean): void;
|
|
95
92
|
leave(): void;
|
|
96
|
-
/** Remove o iframe e os listeners. Chame quando destruir o componente. */
|
|
97
93
|
destroy(): void;
|
|
94
|
+
private _handleMessage;
|
|
98
95
|
private _send;
|
|
99
|
-
private _emit;
|
|
100
96
|
}
|
|
101
97
|
|
|
102
98
|
export { XCall, type XCallCommand, type XCallEventCallback, type XCallEventMap, type XCallEventName, type XCallIncomingMessage, type XCallOptions };
|
package/dist/xcall.min.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var c="camera; microphone; display-capture; autoplay; clipboard-write; fullscreen";function o(l,e){let t=document.createElement("iframe");if(t.src=l.replace(/\/$/,""),t.allow=c,t.style.border="none",t.style.width="100%",t.style.height="100%",e)for(let[a,r]of Object.entries(e))t.style[a]=r;return t}function m(l){let e=typeof l=="string"?document.querySelector(l):l;if(!e)throw new Error("[xCall] container not found");return e}var i=class{constructor(){this.listeners={}}on(e,t){return this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),this}off(e,t){var a;return(a=this.listeners[e])==null||a.delete(t),this}emit(e,t){let a=this.listeners[e];a==null||a.forEach(r=>r(t))}};var d="https://room.xcall.com.br",n=class{constructor(e){this.emitter=new i;var r;let t=m(e.container),a=(r=e.roomUrl)!=null?r:d;this.origin=new URL(a).origin,this.iframe=o(a,e.iframeStyle),t.appendChild(this.iframe),this.messageHandler=s=>{s.origin===this.origin&&this._handleMessage(s.data,e.token)},window.addEventListener("message",this.messageHandler)}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}muteAudio(e){this._send({type:"xcall:mute_audio",muted:e})}muteVideo(e){this._send({type:"xcall:mute_video",muted:e})}leave(){this._send({type:"xcall:leave"})}destroy(){window.removeEventListener("message",this.messageHandler),this.iframe.remove()}_handleMessage(e,t){switch(e.type){case"xcall:ready":this._send({type:"xcall:token",token:t}),this.emitter.emit("ready",void 0);break;case"xcall:joined":this.emitter.emit("joined",{roomId:e.roomId,userId:e.userId});break;case"xcall:left":this.emitter.emit("left",{roomId:e.roomId,reason:e.reason});break;case"xcall:participant_joined":this.emitter.emit("participant_joined",{userId:e.userId,displayName:e.displayName});break;case"xcall:participant_left":this.emitter.emit("participant_left",{userId:e.userId});break;case"xcall:error":this.emitter.emit("error",{code:e.code,message:e.message});break}}_send(e){var t;(t=this.iframe.contentWindow)==null||t.postMessage(e,this.origin)}};export{n as XCall};
|
|
2
2
|
//# sourceMappingURL=xcall.min.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/
|
|
1
|
+
{"version":3,"sources":["../src/internal/iframe.ts","../src/internal/events.ts","../src/core/XCall.ts"],"sourcesContent":["import type { XCallOptions } from '../types'\n\nconst PERMISSIONS = 'camera; microphone; display-capture; autoplay; clipboard-write; fullscreen'\n\nexport function createIframe(base: string, style?: Partial<CSSStyleDeclaration>): HTMLIFrameElement {\n const el = document.createElement('iframe')\n el.src = base.replace(/\\/$/, '')\n el.allow = PERMISSIONS\n el.style.border = 'none'\n el.style.width = '100%'\n el.style.height = '100%'\n\n if (style) {\n for (const [key, value] of Object.entries(style)) {\n ;(el.style as unknown as Record<string, string>)[key] = value as string\n }\n }\n\n return el\n}\n\nexport function resolveContainer(container: XCallOptions['container']): HTMLElement {\n const el =\n typeof container === 'string'\n ? (document.querySelector(container) as HTMLElement | null)\n : container\n if (!el) throw new Error('[xCall] container not found')\n return el\n}\n","import type { XCallEventName, XCallEventCallback, XCallEventMap } from '../types'\n\ntype ListenerMap = Partial<{\n [K in XCallEventName]: Set<XCallEventCallback<K>>\n}>\n\nexport class EventEmitter {\n private listeners: ListenerMap = {}\n\n on<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n if (!this.listeners[event]) {\n this.listeners[event] = new Set() as never\n }\n ;(this.listeners[event] as Set<XCallEventCallback<K>>).add(cb)\n return this\n }\n\n off<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n ;(this.listeners[event] as Set<XCallEventCallback<K>> | undefined)?.delete(cb)\n return this\n }\n\n emit<K extends XCallEventName>(event: K, data: XCallEventMap[K]): void {\n const handlers = this.listeners[event] as Set<XCallEventCallback<K>> | undefined\n handlers?.forEach((cb) => cb(data))\n }\n}\n","import type { XCallOptions, XCallEventName, XCallEventCallback, XCallCommand, XCallIncomingMessage } from '../types'\nimport { createIframe, resolveContainer } from '../internal/iframe'\nimport { EventEmitter } from '../internal/events'\n\nconst DEFAULT_ROOM_URL = 'https://room.xcall.com.br'\n\nexport class XCall {\n private iframe: HTMLIFrameElement\n private origin: string\n private emitter = new EventEmitter()\n private messageHandler: (e: MessageEvent) => void\n\n constructor(options: XCallOptions) {\n const container = resolveContainer(options.container)\n const base = options.roomUrl ?? DEFAULT_ROOM_URL\n\n this.origin = new URL(base).origin\n this.iframe = createIframe(base, options.iframeStyle)\n container.appendChild(this.iframe)\n\n this.messageHandler = (e: MessageEvent) => {\n if (e.origin !== this.origin) return\n this._handleMessage(e.data as XCallIncomingMessage, options.token)\n }\n window.addEventListener('message', this.messageHandler)\n }\n\n // ── Eventos ───────────────────────────────────────────────────────────────\n\n on<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n this.emitter.on(event, cb)\n return this\n }\n\n off<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n this.emitter.off(event, cb)\n return this\n }\n\n // ── Comandos ──────────────────────────────────────────────────────────────\n\n muteAudio(muted: boolean) { this._send({ type: 'xcall:mute_audio', muted }) }\n muteVideo(muted: boolean) { this._send({ type: 'xcall:mute_video', muted }) }\n leave() { this._send({ type: 'xcall:leave' }) }\n\n destroy() {\n window.removeEventListener('message', this.messageHandler)\n this.iframe.remove()\n }\n\n // ── Internals ─────────────────────────────────────────────────────────────\n\n private _handleMessage(msg: XCallIncomingMessage, token: string) {\n switch (msg.type) {\n case 'xcall:ready':\n this._send({ type: 'xcall:token', token })\n this.emitter.emit('ready', undefined as void)\n break\n case 'xcall:joined':\n this.emitter.emit('joined', { roomId: msg.roomId, userId: msg.userId })\n break\n case 'xcall:left':\n this.emitter.emit('left', { roomId: msg.roomId, reason: msg.reason })\n break\n case 'xcall:participant_joined':\n this.emitter.emit('participant_joined', { userId: msg.userId, displayName: msg.displayName })\n break\n case 'xcall:participant_left':\n this.emitter.emit('participant_left', { userId: msg.userId })\n break\n case 'xcall:error':\n this.emitter.emit('error', { code: msg.code, message: msg.message })\n break\n }\n }\n\n private _send(cmd: XCallCommand) {\n this.iframe.contentWindow?.postMessage(cmd, this.origin)\n }\n}\n"],"mappings":"AAEA,IAAMA,EAAc,6EAEb,SAASC,EAAaC,EAAcC,EAAyD,CAClG,IAAMC,EAAK,SAAS,cAAc,QAAQ,EAO1C,GANAA,EAAG,IAAMF,EAAK,QAAQ,MAAO,EAAE,EAC/BE,EAAG,MAAQJ,EACXI,EAAG,MAAM,OAAS,OAClBA,EAAG,MAAM,MAAQ,OACjBA,EAAG,MAAM,OAAS,OAEdD,EACF,OAAW,CAACE,EAAKC,CAAK,IAAK,OAAO,QAAQH,CAAK,EAC3CC,EAAG,MAA4CC,CAAG,EAAIC,EAI5D,OAAOF,CACT,CAEO,SAASG,EAAiBC,EAAmD,CAClF,IAAMJ,EACJ,OAAOI,GAAc,SAChB,SAAS,cAAcA,CAAS,EACjCA,EACN,GAAI,CAACJ,EAAI,MAAM,IAAI,MAAM,6BAA6B,EACtD,OAAOA,CACT,CCtBO,IAAMK,EAAN,KAAmB,CAAnB,cACL,KAAQ,UAAyB,CAAC,EAElC,GAA6BC,EAAUC,EAAiC,CACtE,OAAK,KAAK,UAAUD,CAAK,IACvB,KAAK,UAAUA,CAAK,EAAI,I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zD,KAAK,OAAO,OAAO,CACrB,CAIQ,eAAeC,EAA2BC,EAAe,CAC/D,OAAQD,EAAI,KAAM,CAChB,IAAK,cACH,KAAK,MAAM,CAAE,KAAM,cAAe,MAAAC,CAAM,CAAC,EACzC,KAAK,QAAQ,KAAK,QAAS,MAAiB,EAC5C,MACF,IAAK,eACH,KAAK,QAAQ,KAAK,SAAU,CAAE,OAAQD,EAAI,OAAQ,OAAQA,EAAI,MAAO,CAAC,EACtE,MACF,IAAK,aACH,KAAK,QAAQ,KAAK,OAAQ,CAAE,OAAQA,EAAI,OAAQ,OAAQA,EAAI,MAAO,CAAC,EACpE,MACF,IAAK,2BACH,KAAK,QAAQ,KAAK,qBAAsB,CAAE,OAAQA,EAAI,OAAQ,YAAaA,EAAI,WAAY,CAAC,EAC5F,MACF,IAAK,yBACH,KAAK,QAAQ,KAAK,mBAAoB,CAAE,OAAQA,EAAI,MAAO,CAAC,EAC5D,MACF,IAAK,cACH,KAAK,QAAQ,KAAK,QAAS,CAAE,KAAMA,EAAI,KAAM,QAASA,EAAI,OAAQ,CAAC,EACnE,KACJ,CACF,CAEQ,MAAME,EAAmB,CA5EnC,IAAAX,GA6EIA,EAAA,KAAK,OAAO,gBAAZ,MAAAA,EAA2B,YAAYW,EAAK,KAAK,OACnD,CACF","names":["PERMISSIONS","createIframe","base","style","el","key","value","resolveContainer","container","EventEmitter","event","cb","_a","data","handlers","DEFAULT_ROOM_URL","XCall","options","EventEmitter","_a","container","resolveContainer","base","createIframe","e","event","cb","muted","msg","token","cmd"]}
|
package/dist/xcall.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var s=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var C=(a,e)=>{for(var t in e)s(a,t,{get:e[t],enumerable:!0})},f=(a,e,t,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!h.call(a,r)&&r!==t&&s(a,r,{get:()=>e[r],enumerable:!(l=d(e,r))||l.enumerable});return a};var v=a=>f(s({},"__esModule",{value:!0}),a);var X={};C(X,{XCall:()=>n});module.exports=v(X);var u="camera; microphone; display-capture; autoplay; clipboard-write; fullscreen";function m(a,e){let t=document.createElement("iframe");if(t.src=a.replace(/\/$/,""),t.allow=u,t.style.border="none",t.style.width="100%",t.style.height="100%",e)for(let[l,r]of Object.entries(e))t.style[l]=r;return t}function c(a){let e=typeof a=="string"?document.querySelector(a):a;if(!e)throw new Error("[xCall] container not found");return e}var i=class{constructor(){this.listeners={}}on(e,t){return this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),this}off(e,t){var l;return(l=this.listeners[e])==null||l.delete(t),this}emit(e,t){let l=this.listeners[e];l==null||l.forEach(r=>r(t))}};var E="https://room.xcall.com.br",n=class{constructor(e){this.emitter=new i;var r;let t=c(e.container),l=(r=e.roomUrl)!=null?r:E;this.origin=new URL(l).origin,this.iframe=m(l,e.iframeStyle),t.appendChild(this.iframe),this.messageHandler=o=>{o.origin===this.origin&&this._handleMessage(o.data,e.token)},window.addEventListener("message",this.messageHandler)}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}muteAudio(e){this._send({type:"xcall:mute_audio",muted:e})}muteVideo(e){this._send({type:"xcall:mute_video",muted:e})}leave(){this._send({type:"xcall:leave"})}destroy(){window.removeEventListener("message",this.messageHandler),this.iframe.remove()}_handleMessage(e,t){switch(e.type){case"xcall:ready":this._send({type:"xcall:token",token:t}),this.emitter.emit("ready",void 0);break;case"xcall:joined":this.emitter.emit("joined",{roomId:e.roomId,userId:e.userId});break;case"xcall:left":this.emitter.emit("left",{roomId:e.roomId,reason:e.reason});break;case"xcall:participant_joined":this.emitter.emit("participant_joined",{userId:e.userId,displayName:e.displayName});break;case"xcall:participant_left":this.emitter.emit("participant_left",{userId:e.userId});break;case"xcall:error":this.emitter.emit("error",{code:e.code,message:e.message});break}}_send(e){var t;(t=this.iframe.contentWindow)==null||t.postMessage(e,this.origin)}};0&&(module.exports={XCall});
|
|
2
2
|
//# sourceMappingURL=xcall.min.js.map
|
package/dist/xcall.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/internal/iframe.ts","../src/internal/events.ts","../src/core/XCall.ts"],"sourcesContent":["export { XCall } from './core/XCall'\nexport * from './types'\n","import type { XCallOptions } from '../types'\n\nconst PERMISSIONS = 'camera; microphone; display-capture; autoplay; clipboard-write; fullscreen'\n\nexport function createIframe(base: string, style?: Partial<CSSStyleDeclaration>): HTMLIFrameElement {\n const el = document.createElement('iframe')\n el.src = base.replace(/\\/$/, '')\n el.allow = PERMISSIONS\n el.style.border = 'none'\n el.style.width = '100%'\n el.style.height = '100%'\n\n if (style) {\n for (const [key, value] of Object.entries(style)) {\n ;(el.style as unknown as Record<string, string>)[key] = value as string\n }\n }\n\n return el\n}\n\nexport function resolveContainer(container: XCallOptions['container']): HTMLElement {\n const el =\n typeof container === 'string'\n ? (document.querySelector(container) as HTMLElement | null)\n : container\n if (!el) throw new Error('[xCall] container not found')\n return el\n}\n","import type { XCallEventName, XCallEventCallback, XCallEventMap } from '../types'\n\ntype ListenerMap = Partial<{\n [K in XCallEventName]: Set<XCallEventCallback<K>>\n}>\n\nexport class EventEmitter {\n private listeners: ListenerMap = {}\n\n on<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n if (!this.listeners[event]) {\n this.listeners[event] = new Set() as never\n }\n ;(this.listeners[event] as Set<XCallEventCallback<K>>).add(cb)\n return this\n }\n\n off<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n ;(this.listeners[event] as Set<XCallEventCallback<K>> | undefined)?.delete(cb)\n return this\n }\n\n emit<K extends XCallEventName>(event: K, data: XCallEventMap[K]): void {\n const handlers = this.listeners[event] as Set<XCallEventCallback<K>> | undefined\n handlers?.forEach((cb) => cb(data))\n }\n}\n","import type { XCallOptions, XCallEventName, XCallEventCallback, XCallCommand, XCallIncomingMessage } from '../types'\nimport { createIframe, resolveContainer } from '../internal/iframe'\nimport { EventEmitter } from '../internal/events'\n\nconst DEFAULT_ROOM_URL = 'https://room.xcall.com.br'\n\nexport class XCall {\n private iframe: HTMLIFrameElement\n private origin: string\n private emitter = new EventEmitter()\n private messageHandler: (e: MessageEvent) => void\n\n constructor(options: XCallOptions) {\n const container = resolveContainer(options.container)\n const base = options.roomUrl ?? DEFAULT_ROOM_URL\n\n this.origin = new URL(base).origin\n this.iframe = createIframe(base, options.iframeStyle)\n container.appendChild(this.iframe)\n\n this.messageHandler = (e: MessageEvent) => {\n if (e.origin !== this.origin) return\n this._handleMessage(e.data as XCallIncomingMessage, options.token)\n }\n window.addEventListener('message', this.messageHandler)\n }\n\n // ── Eventos ───────────────────────────────────────────────────────────────\n\n on<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n this.emitter.on(event, cb)\n return this\n }\n\n off<K extends XCallEventName>(event: K, cb: XCallEventCallback<K>): this {\n this.emitter.off(event, cb)\n return this\n }\n\n // ── Comandos ──────────────────────────────────────────────────────────────\n\n muteAudio(muted: boolean) { this._send({ type: 'xcall:mute_audio', muted }) }\n muteVideo(muted: boolean) { this._send({ type: 'xcall:mute_video', muted }) }\n leave() { this._send({ type: 'xcall:leave' }) }\n\n destroy() {\n window.removeEventListener('message', this.messageHandler)\n this.iframe.remove()\n }\n\n // ── Internals ─────────────────────────────────────────────────────────────\n\n private _handleMessage(msg: XCallIncomingMessage, token: string) {\n switch (msg.type) {\n case 'xcall:ready':\n this._send({ type: 'xcall:token', token })\n this.emitter.emit('ready', undefined as void)\n break\n case 'xcall:joined':\n this.emitter.emit('joined', { roomId: msg.roomId, userId: msg.userId })\n break\n case 'xcall:left':\n this.emitter.emit('left', { roomId: msg.roomId, reason: msg.reason })\n break\n case 'xcall:participant_joined':\n this.emitter.emit('participant_joined', { userId: msg.userId, displayName: msg.displayName })\n break\n case 'xcall:participant_left':\n this.emitter.emit('participant_left', { userId: msg.userId })\n break\n case 'xcall:error':\n this.emitter.emit('error', { code: msg.code, message: msg.message })\n break\n }\n }\n\n private _send(cmd: XCallCommand) {\n this.iframe.contentWindow?.postMessage(cmd, this.origin)\n }\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GCEA,IAAMI,EAAc,6EAEb,SAASC,EAAaC,EAAcC,EAAyD,CAClG,IAAMC,EAAK,SAAS,cAAc,QAAQ,EAO1C,GANAA,EAAG,IAAMF,EAAK,QAAQ,MAAO,EAAE,EAC/BE,EAAG,MAAQJ,EACXI,EAAG,MAAM,OAAS,OAClBA,EAAG,MAAM,MAAQ,OACjBA,EAAG,MAAM,OAAS,OAEdD,EACF,OAAW,CAACE,EAAKC,CAAK,IAAK,OAAO,QAAQH,CAAK,EAC3CC,EAAG,MAA4CC,CAAG,EAAIC,EAI5D,OAAOF,CACT,CAEO,SAASG,EAAiBC,EAAmD,CAClF,IAAMJ,EACJ,OAAOI,GAAc,SAChB,SAAS,cAAcA,CAAS,EACjCA,EACN,GAAI,CAACJ,EAAI,MAAM,IAAI,MAAM,6BAA6B,EACtD,OAAOA,CACT,CCtBO,IAAMK,EAAN,KAAmB,CAAnB,cACL,KAAQ,UAAyB,CAAC,EAElC,GAA6BC,EAAUC,EAAiC,CACtE,OAAK,KAAK,UAAUD,CAAK,IACvB,KAAK,UAAUA,CAAK,EAAI,IAAI,KAE5B,KAAK,UAAUA,CAAK,EAAiC,IAAIC,CAAE,EACtD,IACT,CAEA,IAA8BD,EAAUC,EAAiC,CAjB3E,IAAAC,EAkBK,OAACA,EAAA,KAAK,UAAUF,CAAK,IAApB,MAAAE,EAAkE,OAAOD,GACpE,IACT,CAEA,KAA+BD,EAAUG,EAA8B,CACrE,IAAMC,EAAW,KAAK,UAAUJ,CAAK,EACrCI,GAAA,MA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,EAAI,MAAO,CAAC,EACtE,MACF,IAAK,aACH,KAAK,QAAQ,KAAK,OAAQ,CAAE,OAAQA,EAAI,OAAQ,OAAQA,EAAI,MAAO,CAAC,EACpE,MACF,IAAK,2BACH,KAAK,QAAQ,KAAK,qBAAsB,CAAE,OAAQA,EAAI,OAAQ,YAAaA,EAAI,WAAY,CAAC,EAC5F,MACF,IAAK,yBACH,KAAK,QAAQ,KAAK,mBAAoB,CAAE,OAAQA,EAAI,MAAO,CAAC,EAC5D,MACF,IAAK,cACH,KAAK,QAAQ,KAAK,QAAS,CAAE,KAAMA,EAAI,KAAM,QAASA,EAAI,OAAQ,CAAC,EACnE,KACJ,CACF,CAEQ,MAAME,EAAmB,CA5EnC,IAAAX,GA6EIA,EAAA,KAAK,OAAO,gBAAZ,MAAAA,EAA2B,YAAYW,EAAK,KAAK,OACnD,CACF","names":["src_exports","__export","XCall","__toCommonJS","PERMISSIONS","createIframe","base","style","el","key","value","resolveContainer","container","EventEmitter","event","cb","_a","data","handlers","DEFAULT_ROOM_URL","XCall","options","EventEmitter","_a","container","resolveContainer","base","createIframe","e","event","cb","muted","msg","token","cmd"]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcall/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "xCall SDK — embed video calls in any website",
|
|
5
|
-
"main": "dist/
|
|
6
|
-
"module": "dist/
|
|
7
|
-
"types": "dist/
|
|
5
|
+
"main": "dist/xcall.min.js",
|
|
6
|
+
"module": "dist/xcall.min.esm.js",
|
|
7
|
+
"types": "dist/xcall.min.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|