@vonage/client-sdk
Advanced tools
Comparing version 0.1.3 to 0.1.4-alpha.2
@@ -9,3 +9,6 @@ import './kotlin/clientsdk-clientcore_js'; | ||
} | ||
interface CoreClientJS { | ||
getPeerConnection(id: string): RTCPeerConnection; | ||
} | ||
} | ||
} |
@@ -15,2 +15,3 @@ type Nullable<T> = T | null | undefined | ||
rtcHangup(call: vonage.VoiceCallJS, legId: string, callQuality: vonage.RTCQualityJS): void; | ||
legStatusUpdate(call: vonage.VoiceCallJS, legId: string, status: string): void; | ||
} | ||
@@ -98,3 +99,5 @@ interface CallSayParams { | ||
refreshSession(token: string): Promise<any>; | ||
getPeerConnection(id: string): any; | ||
serverCall(context: Nullable<Json>): Promise<vonage.VoiceCallJS>; | ||
reconnectCall(legId: string): Promise<vonage.VoiceCallJS>; | ||
} | ||
@@ -156,8 +159,9 @@ class VoiceCallJS { | ||
interface MediaClientJS { | ||
delegate: Nullable<vonage.MediaClientDelegateJS>; | ||
enableMedia(id: string, remoteDescription: Nullable<string>): void; | ||
processAnswer(mediaId: string, sdp: string, streamId: string, legId: string): void; | ||
enableMediaOutbound(closure: (p0: any, p1: Nullable<string>, p2: (p0: string) => void) => void): void; | ||
enableMediaInbound(closure: (p0: any, p1: Nullable<string>) => void, offerSDP: string, rtcId: string): void; | ||
processAnswer(id: string, sdp: string): void; | ||
disableMedia(id: string): void; | ||
mute(id: string): void; | ||
unmute(id: string): void; | ||
getPeerConnection(id: string): any; | ||
} | ||
@@ -164,0 +168,0 @@ interface MediaClientDelegateJS { |
@@ -19,13 +19,13 @@ (function (root, factory) { | ||
var imul = Math.imul; | ||
var THROW_ISE = kotlin_kotlin.$_$.w7; | ||
var Unit_getInstance = kotlin_kotlin.$_$.o2; | ||
var THROW_ISE = kotlin_kotlin.$_$.z7; | ||
var Unit_getInstance = kotlin_kotlin.$_$.p2; | ||
var ClientConfigRegion_AP_getInstance = kotlin_com_vonage_clientcore.$_$.r; | ||
var ClientConfigRegion_EU_getInstance = kotlin_com_vonage_clientcore.$_$.s; | ||
var ClientConfigRegion_US_getInstance = kotlin_com_vonage_clientcore.$_$.t; | ||
var Enum = kotlin_kotlin.$_$.q7; | ||
var classMeta = kotlin_kotlin.$_$.h5; | ||
var Enum = kotlin_kotlin.$_$.s7; | ||
var classMeta = kotlin_kotlin.$_$.j5; | ||
var Companion_getInstance = kotlin_com_vonage_clientcore.$_$.u; | ||
var ILoggingLevel = kotlin_com_vonage_clientcore.$_$.b; | ||
var setDefaultLoggingLevel = kotlin_com_vonage_clientcore.$_$.e; | ||
var newThrowable = kotlin_kotlin.$_$.e6; | ||
var newThrowable = kotlin_kotlin.$_$.g6; | ||
var SessionListener = kotlin_com_vonage_clientcore.$_$.c; | ||
@@ -35,6 +35,6 @@ var VoiceClientDelegate = kotlin_com_vonage_clientcore.$_$.d; | ||
var SetConfig = kotlin_com_vonage_clientcore.$_$.i; | ||
var emptyMap = kotlin_kotlin.$_$.u3; | ||
var THROW_CCE = kotlin_kotlin.$_$.v7; | ||
var getStringHashCode = kotlin_kotlin.$_$.m5; | ||
var equals = kotlin_kotlin.$_$.i5; | ||
var emptyMap = kotlin_kotlin.$_$.v3; | ||
var THROW_CCE = kotlin_kotlin.$_$.y7; | ||
var getStringHashCode = kotlin_kotlin.$_$.o5; | ||
var equals = kotlin_kotlin.$_$.k5; | ||
var Exception_init_$Create$ = kotlin_kotlin.$_$.z; | ||
@@ -53,11 +53,11 @@ var HTTPClient = kotlin_com_vonage_clientcore.$_$.f; | ||
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.j; | ||
var to = kotlin_kotlin.$_$.p8; | ||
var toMap = kotlin_kotlin.$_$.t4; | ||
var to = kotlin_kotlin.$_$.s8; | ||
var toMap = kotlin_kotlin.$_$.u4; | ||
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t; | ||
var Map = kotlin_kotlin.$_$.a3; | ||
var isInterface = kotlin_kotlin.$_$.w5; | ||
var Exception = kotlin_kotlin.$_$.r7; | ||
var Pair = kotlin_kotlin.$_$.u7; | ||
var copyToArray = kotlin_kotlin.$_$.s3; | ||
var json = kotlin_kotlin.$_$.c6; | ||
var Map = kotlin_kotlin.$_$.b3; | ||
var isInterface = kotlin_kotlin.$_$.y5; | ||
var Exception = kotlin_kotlin.$_$.u7; | ||
var Pair = kotlin_kotlin.$_$.x7; | ||
var copyToArray = kotlin_kotlin.$_$.t3; | ||
var json = kotlin_kotlin.$_$.e6; | ||
//endregion | ||
@@ -101,6 +101,6 @@ //region block: pre-declaration | ||
Enum.call(this, name, ordinal); | ||
this.g2c_1 = coreRegion; | ||
this.j2e_1 = coreRegion; | ||
} | ||
CoreClientConfigRegionJS.prototype.h2c = function () { | ||
return this.g2c_1; | ||
CoreClientConfigRegionJS.prototype.k2e = function () { | ||
return this.j2e_1; | ||
}; | ||
@@ -110,42 +110,42 @@ CoreClientConfigRegionJS.$metadata$ = classMeta('CoreClientConfigRegionJS', undefined, undefined, undefined, undefined, Enum.prototype); | ||
configurable: true, | ||
get: CoreClientConfigRegionJS.prototype.h2c | ||
get: CoreClientConfigRegionJS.prototype.k2e | ||
}); | ||
Object.defineProperty(CoreClientConfigRegionJS.prototype, 'name', { | ||
configurable: true, | ||
get: CoreClientConfigRegionJS.prototype.q3 | ||
get: CoreClientConfigRegionJS.prototype.r3 | ||
}); | ||
Object.defineProperty(CoreClientConfigRegionJS.prototype, 'ordinal', { | ||
configurable: true, | ||
get: CoreClientConfigRegionJS.prototype.oe | ||
get: CoreClientConfigRegionJS.prototype.qe | ||
}); | ||
function CoreClientConfigJS(region) { | ||
this.i2c_1 = Companion_getInstance().t1y(region.g2c_1); | ||
this.j2c_1 = this.i2c_1.u1y_1; | ||
this.k2c_1 = this.i2c_1.v1y_1; | ||
this.l2c_1 = this.i2c_1.w1y_1; | ||
this.m2c_1 = this.i2c_1.x1y_1; | ||
this.l2e_1 = Companion_getInstance().h1z(region.j2e_1); | ||
this.m2e_1 = this.l2e_1.i1z_1; | ||
this.n2e_1 = this.l2e_1.j1z_1; | ||
this.o2e_1 = this.l2e_1.k1z_1; | ||
this.p2e_1 = this.l2e_1.l1z_1; | ||
} | ||
CoreClientConfigJS.prototype.n2c = function (_set____db54di) { | ||
this.j2c_1 = _set____db54di; | ||
CoreClientConfigJS.prototype.q2e = function (_set____db54di) { | ||
this.m2e_1 = _set____db54di; | ||
}; | ||
CoreClientConfigJS.prototype.o2c = function () { | ||
return this.j2c_1; | ||
CoreClientConfigJS.prototype.r2e = function () { | ||
return this.m2e_1; | ||
}; | ||
CoreClientConfigJS.prototype.p2c = function (_set____db54di) { | ||
this.k2c_1 = _set____db54di; | ||
CoreClientConfigJS.prototype.s2e = function (_set____db54di) { | ||
this.n2e_1 = _set____db54di; | ||
}; | ||
CoreClientConfigJS.prototype.q2c = function () { | ||
return this.k2c_1; | ||
CoreClientConfigJS.prototype.t2e = function () { | ||
return this.n2e_1; | ||
}; | ||
CoreClientConfigJS.prototype.r2c = function (_set____db54di) { | ||
this.l2c_1 = _set____db54di; | ||
CoreClientConfigJS.prototype.u2e = function (_set____db54di) { | ||
this.o2e_1 = _set____db54di; | ||
}; | ||
CoreClientConfigJS.prototype.s2c = function () { | ||
return this.l2c_1; | ||
CoreClientConfigJS.prototype.v2e = function () { | ||
return this.o2e_1; | ||
}; | ||
CoreClientConfigJS.prototype.t2c = function (_set____db54di) { | ||
this.m2c_1 = _set____db54di; | ||
CoreClientConfigJS.prototype.w2e = function (_set____db54di) { | ||
this.p2e_1 = _set____db54di; | ||
}; | ||
CoreClientConfigJS.prototype.u2c = function () { | ||
return this.m2c_1; | ||
CoreClientConfigJS.prototype.x2e = function () { | ||
return this.p2e_1; | ||
}; | ||
@@ -155,19 +155,19 @@ CoreClientConfigJS.$metadata$ = classMeta('CoreClientConfigJS'); | ||
configurable: true, | ||
get: CoreClientConfigJS.prototype.o2c, | ||
set: CoreClientConfigJS.prototype.n2c | ||
get: CoreClientConfigJS.prototype.r2e, | ||
set: CoreClientConfigJS.prototype.q2e | ||
}); | ||
Object.defineProperty(CoreClientConfigJS.prototype, 'websocketUrl', { | ||
configurable: true, | ||
get: CoreClientConfigJS.prototype.q2c, | ||
set: CoreClientConfigJS.prototype.p2c | ||
get: CoreClientConfigJS.prototype.t2e, | ||
set: CoreClientConfigJS.prototype.s2e | ||
}); | ||
Object.defineProperty(CoreClientConfigJS.prototype, 'websocketPath', { | ||
configurable: true, | ||
get: CoreClientConfigJS.prototype.s2c, | ||
set: CoreClientConfigJS.prototype.r2c | ||
get: CoreClientConfigJS.prototype.v2e, | ||
set: CoreClientConfigJS.prototype.u2e | ||
}); | ||
Object.defineProperty(CoreClientConfigJS.prototype, 'autoMediaReoffer', { | ||
configurable: true, | ||
get: CoreClientConfigJS.prototype.u2c, | ||
set: CoreClientConfigJS.prototype.t2c | ||
get: CoreClientConfigJS.prototype.x2e, | ||
set: CoreClientConfigJS.prototype.w2e | ||
}); | ||
@@ -217,6 +217,6 @@ var LoggingLevelJS_Verbose_instance; | ||
Enum.call(this, name, ordinal); | ||
this.x2c_1 = sev; | ||
this.a2f_1 = sev; | ||
} | ||
LoggingLevelJS.prototype.x1b = function () { | ||
return this.x2c_1; | ||
LoggingLevelJS.prototype.a1c = function () { | ||
return this.a2f_1; | ||
}; | ||
@@ -226,7 +226,7 @@ LoggingLevelJS.$metadata$ = classMeta('LoggingLevelJS', [ILoggingLevel], undefined, undefined, undefined, Enum.prototype); | ||
configurable: true, | ||
get: LoggingLevelJS.prototype.q3 | ||
get: LoggingLevelJS.prototype.r3 | ||
}); | ||
Object.defineProperty(LoggingLevelJS.prototype, 'ordinal', { | ||
configurable: true, | ||
get: LoggingLevelJS.prototype.oe | ||
get: LoggingLevelJS.prototype.qe | ||
}); | ||
@@ -249,3 +249,3 @@ function setDefaultLoggingLevel_0(level) { | ||
return function (resolve, reject) { | ||
this$0.z2c_1.u1a($token, $sessionId, CoreClientJS$createSession$lambda$lambda(reject, resolve)); | ||
this$0.d2f_1.w1a($token, $sessionId, CoreClientJS$createSession$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -265,3 +265,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.z2c_1.v1a(CoreClientJS$deleteSession$lambda$lambda(reject, resolve)); | ||
this$0.d2f_1.x1a(CoreClientJS$deleteSession$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -281,3 +281,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.z2c_1.w1a($token, CoreClientJS$refreshSession$lambda$lambda(reject, resolve)); | ||
this$0.d2f_1.y1a($token, CoreClientJS$refreshSession$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -300,11 +300,29 @@ }; | ||
return function (resolve, reject) { | ||
this$0.z2c_1.z1a($typedContext, CoreClientJS$serverCall$lambda$lambda(resolve, reject)); | ||
this$0.d2f_1.b1b($typedContext, CoreClientJS$serverCall$lambda$lambda(resolve, reject)); | ||
return Unit_getInstance(); | ||
}; | ||
} | ||
function CoreClientJS$reconnectCall$lambda$lambda($resolve, $reject) { | ||
return function (err, call) { | ||
var tmp; | ||
if (!(call == null)) { | ||
tmp = $resolve(new VoiceCallJS(call)); | ||
} else { | ||
var tmp0_elvis_lhs = err; | ||
tmp = $reject(tmp0_elvis_lhs == null ? newThrowable('', void 1) : tmp0_elvis_lhs); | ||
} | ||
return Unit_getInstance(); | ||
}; | ||
} | ||
function CoreClientJS$reconnectCall$lambda(this$0, $legId) { | ||
return function (resolve, reject) { | ||
this$0.d2f_1.c1b($legId, CoreClientJS$reconnectCall$lambda$lambda(resolve, reject)); | ||
return Unit_getInstance(); | ||
}; | ||
} | ||
function CoreClientJS$1(this$0) { | ||
this.a2d_1 = this$0; | ||
this.e2f_1 = this$0; | ||
} | ||
CoreClientJS$1.prototype.n20 = function () { | ||
var tmp0_safe_receiver = this.a2d_1.y2c_1; | ||
CoreClientJS$1.prototype.b21 = function () { | ||
var tmp0_safe_receiver = this.e2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -316,4 +334,4 @@ null; | ||
}; | ||
CoreClientJS$1.prototype.o20 = function () { | ||
var tmp0_safe_receiver = this.a2d_1.y2c_1; | ||
CoreClientJS$1.prototype.c21 = function () { | ||
var tmp0_safe_receiver = this.e2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -325,4 +343,4 @@ null; | ||
}; | ||
CoreClientJS$1.prototype.p20 = function (reason) { | ||
var tmp0_safe_receiver = this.a2d_1.y2c_1; | ||
CoreClientJS$1.prototype.d21 = function (reason) { | ||
var tmp0_safe_receiver = this.e2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -336,6 +354,6 @@ null; | ||
function CoreClientJS$2(this$0) { | ||
this.b2d_1 = this$0; | ||
this.f2f_1 = this$0; | ||
} | ||
CoreClientJS$2.prototype.a22 = function (invite) { | ||
var tmp0_safe_receiver = this.b2d_1.y2c_1; | ||
CoreClientJS$2.prototype.l22 = function (invite) { | ||
var tmp0_safe_receiver = this.f2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -347,4 +365,4 @@ null; | ||
}; | ||
CoreClientJS$2.prototype.b22 = function (call, newConversation, prevConversation) { | ||
var tmp0_safe_receiver = this.b2d_1.y2c_1; | ||
CoreClientJS$2.prototype.m22 = function (call, newConversation, prevConversation) { | ||
var tmp0_safe_receiver = this.f2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -356,4 +374,4 @@ null; | ||
}; | ||
CoreClientJS$2.prototype.c22 = function (call, legId, isMuted) { | ||
var tmp0_safe_receiver = this.b2d_1.y2c_1; | ||
CoreClientJS$2.prototype.n22 = function (call, legId, isMuted) { | ||
var tmp0_safe_receiver = this.f2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -365,4 +383,4 @@ null; | ||
}; | ||
CoreClientJS$2.prototype.d22 = function (call, legId, earmuffStatus) { | ||
var tmp0_safe_receiver = this.b2d_1.y2c_1; | ||
CoreClientJS$2.prototype.o22 = function (call, legId, earmuffStatus) { | ||
var tmp0_safe_receiver = this.f2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -374,4 +392,4 @@ null; | ||
}; | ||
CoreClientJS$2.prototype.e22 = function (call, legId, digits) { | ||
var tmp0_safe_receiver = this.b2d_1.y2c_1; | ||
CoreClientJS$2.prototype.p22 = function (call, legId, digits) { | ||
var tmp0_safe_receiver = this.f2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -383,4 +401,4 @@ null; | ||
}; | ||
CoreClientJS$2.prototype.f22 = function (call, legId, callQuality) { | ||
var tmp0_safe_receiver = this.b2d_1.y2c_1; | ||
CoreClientJS$2.prototype.q22 = function (call, legId, callQuality) { | ||
var tmp0_safe_receiver = this.f2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
@@ -392,17 +410,26 @@ null; | ||
}; | ||
CoreClientJS$2.prototype.r22 = function (call, legId, status) { | ||
var tmp0_safe_receiver = this.f2f_1.c2f_1; | ||
if (tmp0_safe_receiver == null) | ||
null; | ||
else { | ||
tmp0_safe_receiver.legStatusUpdate(new VoiceCallJS(call), legId, status); | ||
} | ||
}; | ||
CoreClientJS$2.$metadata$ = classMeta(undefined, [VoiceClientDelegate]); | ||
function CoreClientJS(http, socket, media) { | ||
this.y2c_1 = null; | ||
this.z2c_1 = (new Builder()).y1b(HttpClientJSAdapter(http)).z1b(SocketClientJSAdapter(socket)).a1c(MediaClientJSAdapter(media)); | ||
this.z2c_1.x1a(new CoreClientJS$1(this)); | ||
this.z2c_1.y1a(new CoreClientJS$2(this)); | ||
this.b2f_1 = media; | ||
this.c2f_1 = null; | ||
this.d2f_1 = (new Builder()).b1c(HttpClientJSAdapter(http)).c1c(SocketClientJSAdapter(socket)).d1c(MediaClientJSAdapter(media)); | ||
this.d2f_1.z1a(new CoreClientJS$1(this)); | ||
this.d2f_1.a1b(new CoreClientJS$2(this)); | ||
} | ||
CoreClientJS.prototype.c2d = function (_set____db54di) { | ||
this.y2c_1 = _set____db54di; | ||
CoreClientJS.prototype.g2f = function (_set____db54di) { | ||
this.c2f_1 = _set____db54di; | ||
}; | ||
CoreClientJS.prototype.d2d = function () { | ||
return this.y2c_1; | ||
CoreClientJS.prototype.h2f = function () { | ||
return this.c2f_1; | ||
}; | ||
CoreClientJS.prototype.setConfig = function (config) { | ||
this.z2c_1.t1a(new SetConfig(config.k2c_1, config.l2c_1, config.j2c_1)); | ||
this.d2f_1.v1a(new SetConfig(config.n2e_1, config.o2e_1, config.m2e_1)); | ||
}; | ||
@@ -418,2 +445,5 @@ CoreClientJS.prototype.createSession = function (token, sessionId) { | ||
}; | ||
CoreClientJS.prototype.getPeerConnection = function (id) { | ||
return this.b2f_1.getPeerConnection(id); | ||
}; | ||
CoreClientJS.prototype.serverCall = function (context) { | ||
@@ -434,7 +464,10 @@ var tmp0_safe_receiver = get_jsonNullable(context); | ||
}; | ||
CoreClientJS.prototype.reconnectCall = function (legId) { | ||
return new Promise(CoreClientJS$reconnectCall$lambda(this, legId)); | ||
}; | ||
CoreClientJS.$metadata$ = classMeta('CoreClientJS'); | ||
Object.defineProperty(CoreClientJS.prototype, 'emitter', { | ||
configurable: true, | ||
get: CoreClientJS.prototype.d2d, | ||
set: CoreClientJS.prototype.c2d | ||
get: CoreClientJS.prototype.h2f, | ||
set: CoreClientJS.prototype.g2f | ||
}); | ||
@@ -455,3 +488,3 @@ function VoiceCallJS$hangup$lambda$lambda($resolve, $reject) { | ||
return function (resolve, reject) { | ||
this$0.e2d_1.j21($reasonText, $reasonCode, VoiceCallJS$hangup$lambda$lambda(resolve, reject)); | ||
this$0.i2f_1.u21($reasonText, $reasonCode, VoiceCallJS$hangup$lambda$lambda(resolve, reject)); | ||
return Unit_getInstance(); | ||
@@ -484,3 +517,3 @@ }; | ||
var tmp_4 = tmp4_elvis_lhs == null ? true : tmp4_elvis_lhs; | ||
this$0.e2d_1.z21(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, VoiceCallJS$say$lambda$lambda(reject, resolve)); | ||
this$0.i2f_1.k22(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, VoiceCallJS$say$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -502,3 +535,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.e2d_1.u21(VoiceCallJS$mute$lambda$lambda(reject, resolve)); | ||
this$0.i2f_1.f22(VoiceCallJS$mute$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -518,3 +551,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.e2d_1.v21(VoiceCallJS$unmute$lambda$lambda(reject, resolve)); | ||
this$0.i2f_1.g22(VoiceCallJS$unmute$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -534,3 +567,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.e2d_1.w21(VoiceCallJS$enableEarmuff$lambda$lambda(reject, resolve)); | ||
this$0.i2f_1.h22(VoiceCallJS$enableEarmuff$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -550,3 +583,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.e2d_1.x21(VoiceCallJS$disableEarmuff$lambda$lambda(reject, resolve)); | ||
this$0.i2f_1.i22(VoiceCallJS$disableEarmuff$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -566,3 +599,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.e2d_1.y21($digits, VoiceCallJS$sendDTMF$lambda$lambda(reject, resolve)); | ||
this$0.i2f_1.j22($digits, VoiceCallJS$sendDTMF$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -572,15 +605,15 @@ }; | ||
function VoiceCallJS(call) { | ||
this.e2d_1 = call; | ||
this.f2d_1 = this.e2d_1.c21_1; | ||
this.i2f_1 = call; | ||
this.j2f_1 = this.i2f_1.p21_1; | ||
} | ||
VoiceCallJS.prototype.o1k = function () { | ||
return this.f2d_1; | ||
VoiceCallJS.prototype.u1n = function () { | ||
return this.j2f_1; | ||
}; | ||
VoiceCallJS.prototype.hangup = function (reasonText, reasonCode) { | ||
return this.g2d(reasonText === void 1 ? null : reasonText, reasonCode === void 1 ? null : reasonCode); | ||
return this.k2f(reasonText === void 1 ? null : reasonText, reasonCode === void 1 ? null : reasonCode); | ||
}; | ||
VoiceCallJS.prototype.g2d = function (reasonText, reasonCode) { | ||
VoiceCallJS.prototype.k2f = function (reasonText, reasonCode) { | ||
return new Promise(VoiceCallJS$hangup$lambda(this, reasonText, reasonCode)); | ||
}; | ||
VoiceCallJS.prototype.h2d = function (reasonText, reasonCode, $mask0, $handler) { | ||
VoiceCallJS.prototype.l2f = function (reasonText, reasonCode, $mask0, $handler) { | ||
if (!(($mask0 & 1) === 0)) | ||
@@ -590,3 +623,3 @@ reasonText = null; | ||
reasonCode = null; | ||
return this.g2d(reasonText, reasonCode); | ||
return this.k2f(reasonText, reasonCode); | ||
}; | ||
@@ -614,39 +647,39 @@ VoiceCallJS.prototype.say = function (params) { | ||
configurable: true, | ||
get: VoiceCallJS.prototype.o1k | ||
get: VoiceCallJS.prototype.u1n | ||
}); | ||
function VoiceInviteFromInfoJS(id, type) { | ||
this.i2d_1 = id; | ||
this.j2d_1 = type; | ||
this.m2f_1 = id; | ||
this.n2f_1 = type; | ||
} | ||
VoiceInviteFromInfoJS.prototype.o1k = function () { | ||
return this.i2d_1; | ||
VoiceInviteFromInfoJS.prototype.u1n = function () { | ||
return this.m2f_1; | ||
}; | ||
VoiceInviteFromInfoJS.prototype.k2d = function () { | ||
return this.j2d_1; | ||
VoiceInviteFromInfoJS.prototype.o2f = function () { | ||
return this.n2f_1; | ||
}; | ||
VoiceInviteFromInfoJS.prototype.component1 = function () { | ||
return this.i2d_1; | ||
return this.m2f_1; | ||
}; | ||
VoiceInviteFromInfoJS.prototype.component2 = function () { | ||
return this.j2d_1; | ||
return this.n2f_1; | ||
}; | ||
VoiceInviteFromInfoJS.prototype.copy = function (id, type) { | ||
return this.l2d(id === void 1 ? this.i2d_1 : id, type === void 1 ? this.j2d_1 : type); | ||
return this.p2f(id === void 1 ? this.m2f_1 : id, type === void 1 ? this.n2f_1 : type); | ||
}; | ||
VoiceInviteFromInfoJS.prototype.l2d = function (id, type) { | ||
VoiceInviteFromInfoJS.prototype.p2f = function (id, type) { | ||
return new VoiceInviteFromInfoJS(id, type); | ||
}; | ||
VoiceInviteFromInfoJS.prototype.m2d = function (id, type, $mask0, $handler) { | ||
VoiceInviteFromInfoJS.prototype.q2f = function (id, type, $mask0, $handler) { | ||
if (!(($mask0 & 1) === 0)) | ||
id = this.i2d_1; | ||
id = this.m2f_1; | ||
if (!(($mask0 & 2) === 0)) | ||
type = this.j2d_1; | ||
return this.l2d(id, type); | ||
type = this.n2f_1; | ||
return this.p2f(id, type); | ||
}; | ||
VoiceInviteFromInfoJS.prototype.toString = function () { | ||
return 'VoiceInviteFromInfoJS(id=' + this.i2d_1 + ', type=' + this.j2d_1 + ')'; | ||
return 'VoiceInviteFromInfoJS(id=' + this.m2f_1 + ', type=' + this.n2f_1 + ')'; | ||
}; | ||
VoiceInviteFromInfoJS.prototype.hashCode = function () { | ||
var result = this.i2d_1 == null ? 0 : getStringHashCode(this.i2d_1); | ||
result = imul(result, 31) + getStringHashCode(this.j2d_1) | 0; | ||
var result = this.m2f_1 == null ? 0 : getStringHashCode(this.m2f_1); | ||
result = imul(result, 31) + getStringHashCode(this.n2f_1) | 0; | ||
return result; | ||
@@ -660,5 +693,5 @@ }; | ||
var tmp0_other_with_cast = other instanceof VoiceInviteFromInfoJS ? other : THROW_CCE(); | ||
if (!(this.i2d_1 == tmp0_other_with_cast.i2d_1)) | ||
if (!(this.m2f_1 == tmp0_other_with_cast.m2f_1)) | ||
return false; | ||
if (!(this.j2d_1 === tmp0_other_with_cast.j2d_1)) | ||
if (!(this.n2f_1 === tmp0_other_with_cast.n2f_1)) | ||
return false; | ||
@@ -670,11 +703,11 @@ return true; | ||
configurable: true, | ||
get: VoiceInviteFromInfoJS.prototype.o1k | ||
get: VoiceInviteFromInfoJS.prototype.u1n | ||
}); | ||
Object.defineProperty(VoiceInviteFromInfoJS.prototype, 'type', { | ||
configurable: true, | ||
get: VoiceInviteFromInfoJS.prototype.k2d | ||
get: VoiceInviteFromInfoJS.prototype.o2f | ||
}); | ||
function VoiceInviteJS_init_$Init$(invite, from, $mask0, $marker, $this) { | ||
if (!(($mask0 & 2) === 0)) | ||
from = new VoiceInviteFromInfoJS(invite.i22_1.n22_1, invite.i22_1.o22_1); | ||
from = new VoiceInviteFromInfoJS(invite.t22_1.j23_1, invite.t22_1.k23_1); | ||
VoiceInviteJS.call($this, invite, from); | ||
@@ -701,3 +734,3 @@ return $this; | ||
return function (resolve, reject) { | ||
this$0.n2d_1.j22(VoiceInviteJS$answerCall$lambda$lambda(reject, resolve)); | ||
this$0.r2f_1.g23(VoiceInviteJS$answerCall$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -719,3 +752,3 @@ }; | ||
return function (resolve, reject) { | ||
this$0.n2d_1.m22(VoiceInviteJS$rejectCall$lambda$lambda(reject, resolve)); | ||
this$0.r2f_1.h23(VoiceInviteJS$rejectCall$lambda$lambda(reject, resolve)); | ||
return Unit_getInstance(); | ||
@@ -725,7 +758,7 @@ }; | ||
function VoiceInviteJS(invite, from) { | ||
this.n2d_1 = invite; | ||
this.o2d_1 = from; | ||
this.r2f_1 = invite; | ||
this.s2f_1 = from; | ||
} | ||
VoiceInviteJS.prototype.v1j = function () { | ||
return this.o2d_1; | ||
VoiceInviteJS.prototype.j1i = function () { | ||
return this.s2f_1; | ||
}; | ||
@@ -741,30 +774,30 @@ VoiceInviteJS.prototype.answerCall = function () { | ||
configurable: true, | ||
get: VoiceInviteJS.prototype.v1j | ||
get: VoiceInviteJS.prototype.j1i | ||
}); | ||
function ConversationJS(conversation) { | ||
this.p2d_1 = conversation; | ||
this.q2d_1 = this.p2d_1.z1y_1; | ||
this.t2f_1 = conversation; | ||
this.u2f_1 = this.t2f_1.n1z_1; | ||
} | ||
ConversationJS.prototype.r2d = function (_set____db54di) { | ||
this.q2d_1 = _set____db54di; | ||
ConversationJS.prototype.v2f = function (_set____db54di) { | ||
this.u2f_1 = _set____db54di; | ||
}; | ||
ConversationJS.prototype.o1k = function () { | ||
return this.q2d_1; | ||
ConversationJS.prototype.u1n = function () { | ||
return this.u2f_1; | ||
}; | ||
ConversationJS.prototype.copy = function (conversation) { | ||
return this.s2d(conversation === void 1 ? this.p2d_1 : conversation); | ||
return this.w2f(conversation === void 1 ? this.t2f_1 : conversation); | ||
}; | ||
ConversationJS.prototype.s2d = function (conversation) { | ||
ConversationJS.prototype.w2f = function (conversation) { | ||
return new ConversationJS(conversation); | ||
}; | ||
ConversationJS.prototype.t2d = function (conversation, $mask0, $handler) { | ||
ConversationJS.prototype.x2f = function (conversation, $mask0, $handler) { | ||
if (!(($mask0 & 1) === 0)) | ||
conversation = this.p2d_1; | ||
return this.s2d(conversation); | ||
conversation = this.t2f_1; | ||
return this.w2f(conversation); | ||
}; | ||
ConversationJS.prototype.toString = function () { | ||
return 'ConversationJS(conversation=' + this.p2d_1 + ')'; | ||
return 'ConversationJS(conversation=' + this.t2f_1 + ')'; | ||
}; | ||
ConversationJS.prototype.hashCode = function () { | ||
return this.p2d_1.hashCode(); | ||
return this.t2f_1.hashCode(); | ||
}; | ||
@@ -777,3 +810,3 @@ ConversationJS.prototype.equals = function (other) { | ||
var tmp0_other_with_cast = other instanceof ConversationJS ? other : THROW_CCE(); | ||
if (!this.p2d_1.equals(tmp0_other_with_cast.p2d_1)) | ||
if (!this.t2f_1.equals(tmp0_other_with_cast.t2f_1)) | ||
return false; | ||
@@ -785,4 +818,4 @@ return true; | ||
configurable: true, | ||
get: ConversationJS.prototype.o1k, | ||
set: ConversationJS.prototype.r2d | ||
get: ConversationJS.prototype.u1n, | ||
set: ConversationJS.prototype.v2f | ||
}); | ||
@@ -858,56 +891,56 @@ function get_jsonNullable(_this__u8e3s4) { | ||
function RTCQualityJS(callQuality) { | ||
this.u2d_1 = callQuality; | ||
this.v2d_1 = this.u2d_1.z24_1; | ||
this.w2d_1 = this.u2d_1.a25_1; | ||
this.x2d_1 = this.u2d_1.b25_1; | ||
this.y2d_1 = this.u2d_1.c25_1; | ||
this.z2d_1 = this.u2d_1.d25_1; | ||
this.a2e_1 = this.u2d_1.e25_1; | ||
this.b2e_1 = this.u2d_1.f25_1; | ||
this.c2e_1 = this.u2d_1.g25_1; | ||
this.d2e_1 = this.u2d_1.h25_1; | ||
this.y2f_1 = callQuality; | ||
this.z2f_1 = this.y2f_1.t26_1; | ||
this.a2g_1 = this.y2f_1.u26_1; | ||
this.b2g_1 = this.y2f_1.v26_1; | ||
this.c2g_1 = this.y2f_1.w26_1; | ||
this.d2g_1 = this.y2f_1.x26_1; | ||
this.e2g_1 = this.y2f_1.y26_1; | ||
this.f2g_1 = this.y2f_1.z26_1; | ||
this.g2g_1 = this.y2f_1.a27_1; | ||
this.h2g_1 = this.y2f_1.b27_1; | ||
} | ||
RTCQualityJS.prototype.e2e = function () { | ||
return this.v2d_1; | ||
RTCQualityJS.prototype.i2g = function () { | ||
return this.z2f_1; | ||
}; | ||
RTCQualityJS.prototype.f2e = function () { | ||
return this.w2d_1; | ||
RTCQualityJS.prototype.j2g = function () { | ||
return this.a2g_1; | ||
}; | ||
RTCQualityJS.prototype.g2e = function () { | ||
return this.x2d_1; | ||
RTCQualityJS.prototype.k2g = function () { | ||
return this.b2g_1; | ||
}; | ||
RTCQualityJS.prototype.h2e = function () { | ||
return this.y2d_1; | ||
RTCQualityJS.prototype.l2g = function () { | ||
return this.c2g_1; | ||
}; | ||
RTCQualityJS.prototype.i2e = function () { | ||
return this.z2d_1; | ||
RTCQualityJS.prototype.m2g = function () { | ||
return this.d2g_1; | ||
}; | ||
RTCQualityJS.prototype.j2e = function () { | ||
return this.a2e_1; | ||
RTCQualityJS.prototype.n2g = function () { | ||
return this.e2g_1; | ||
}; | ||
RTCQualityJS.prototype.k2e = function () { | ||
return this.b2e_1; | ||
RTCQualityJS.prototype.o2g = function () { | ||
return this.f2g_1; | ||
}; | ||
RTCQualityJS.prototype.l2e = function () { | ||
return this.c2e_1; | ||
RTCQualityJS.prototype.p2g = function () { | ||
return this.g2g_1; | ||
}; | ||
RTCQualityJS.prototype.m2e = function () { | ||
return this.d2e_1; | ||
RTCQualityJS.prototype.q2g = function () { | ||
return this.h2g_1; | ||
}; | ||
RTCQualityJS.prototype.copy = function (callQuality) { | ||
return this.n2e(callQuality === void 1 ? this.u2d_1 : callQuality); | ||
return this.r2g(callQuality === void 1 ? this.y2f_1 : callQuality); | ||
}; | ||
RTCQualityJS.prototype.n2e = function (callQuality) { | ||
RTCQualityJS.prototype.r2g = function (callQuality) { | ||
return new RTCQualityJS(callQuality); | ||
}; | ||
RTCQualityJS.prototype.o2e = function (callQuality, $mask0, $handler) { | ||
RTCQualityJS.prototype.s2g = function (callQuality, $mask0, $handler) { | ||
if (!(($mask0 & 1) === 0)) | ||
callQuality = this.u2d_1; | ||
return this.n2e(callQuality); | ||
callQuality = this.y2f_1; | ||
return this.r2g(callQuality); | ||
}; | ||
RTCQualityJS.prototype.toString = function () { | ||
return 'RTCQualityJS(callQuality=' + this.u2d_1 + ')'; | ||
return 'RTCQualityJS(callQuality=' + this.y2f_1 + ')'; | ||
}; | ||
RTCQualityJS.prototype.hashCode = function () { | ||
return this.u2d_1.hashCode(); | ||
return this.y2f_1.hashCode(); | ||
}; | ||
@@ -920,3 +953,3 @@ RTCQualityJS.prototype.equals = function (other) { | ||
var tmp0_other_with_cast = other instanceof RTCQualityJS ? other : THROW_CCE(); | ||
if (!this.u2d_1.equals(tmp0_other_with_cast.u2d_1)) | ||
if (!this.y2f_1.equals(tmp0_other_with_cast.y2f_1)) | ||
return false; | ||
@@ -928,35 +961,35 @@ return true; | ||
configurable: true, | ||
get: RTCQualityJS.prototype.e2e | ||
get: RTCQualityJS.prototype.i2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'quality_percentage', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.f2e | ||
get: RTCQualityJS.prototype.j2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'jitter_min_var', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.g2e | ||
get: RTCQualityJS.prototype.k2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'jitter_max_var', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.h2e | ||
get: RTCQualityJS.prototype.l2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'jitter_loss_rate', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.i2e | ||
get: RTCQualityJS.prototype.m2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'jitter_burst_rate', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.j2e | ||
get: RTCQualityJS.prototype.n2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'flaw_total', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.k2e | ||
get: RTCQualityJS.prototype.o2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'packet_cnt', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.l2e | ||
get: RTCQualityJS.prototype.p2g | ||
}); | ||
Object.defineProperty(RTCQualityJS.prototype, 'packet_loss_perc', { | ||
configurable: true, | ||
get: RTCQualityJS.prototype.m2e | ||
get: RTCQualityJS.prototype.q2g | ||
}); | ||
@@ -973,3 +1006,2 @@ function HttpClientJSAdapter(js) { | ||
var adapter = new MediaClientJSAdapter$adapter$1(js); | ||
js.delegate = new MediaClientJSAdapter$1(adapter); | ||
return adapter; | ||
@@ -987,5 +1019,5 @@ } | ||
function HttpClientJSAdapter$1($js) { | ||
this.p2e_1 = $js; | ||
this.t2g_1 = $js; | ||
} | ||
HttpClientJSAdapter$1.prototype.f1b = function (verb, url, headers, body, callback) { | ||
HttpClientJSAdapter$1.prototype.j1b = function (verb, url, headers, body, callback) { | ||
var tmp = verb.toString(); | ||
@@ -1000,3 +1032,3 @@ var tmp$ret$1; | ||
var tmp_0 = tmp$ret$1; | ||
this.p2e_1.request(tmp, url, tmp_0, body, HttpClientJSAdapter$o$request$lambda(callback)); | ||
this.t2g_1.request(tmp, url, tmp_0, body, HttpClientJSAdapter$o$request$lambda(callback)); | ||
}; | ||
@@ -1025,12 +1057,12 @@ HttpClientJSAdapter$1.$metadata$ = classMeta(undefined, [HTTPClient]); | ||
function SocketClientJSAdapter$adapter$1($js) { | ||
this.r2e_1 = $js; | ||
this.q2e_1 = null; | ||
this.v2g_1 = $js; | ||
this.u2g_1 = null; | ||
} | ||
SocketClientJSAdapter$adapter$1.prototype.i1b = function (_set____db54di) { | ||
this.q2e_1 = _set____db54di; | ||
SocketClientJSAdapter$adapter$1.prototype.m1b = function (_set____db54di) { | ||
this.u2g_1 = _set____db54di; | ||
}; | ||
SocketClientJSAdapter$adapter$1.prototype.z22 = function () { | ||
return this.q2e_1; | ||
SocketClientJSAdapter$adapter$1.prototype.a24 = function () { | ||
return this.u2g_1; | ||
}; | ||
SocketClientJSAdapter$adapter$1.prototype.j1b = function (type, msg, callback) { | ||
SocketClientJSAdapter$adapter$1.prototype.n1b = function (type, msg, callback) { | ||
var tmp0_safe_receiver = msg; | ||
@@ -1051,26 +1083,26 @@ var tmp; | ||
var tmp_0 = tmp; | ||
this.r2e_1.emit(type, tmp_0, SocketClientJSAdapter$o$emit$lambda(callback)); | ||
this.v2g_1.emit(type, tmp_0, SocketClientJSAdapter$o$emit$lambda(callback)); | ||
}; | ||
SocketClientJSAdapter$adapter$1.prototype.k1b = function (host, path, reconnectionAttempts, reconnectionDelay, randomizationFactor, token, session_id, query) { | ||
this.r2e_1.connect(host, path, reconnectionAttempts, reconnectionDelay, randomizationFactor, query); | ||
SocketClientJSAdapter$adapter$1.prototype.o1b = function (host, path, reconnectionAttempts, reconnectionDelay, randomizationFactor, token, session_id, query) { | ||
this.v2g_1.connect(host, path, reconnectionAttempts, reconnectionDelay, randomizationFactor, query); | ||
}; | ||
SocketClientJSAdapter$adapter$1.prototype.l1b = function () { | ||
this.r2e_1.disconnect(); | ||
SocketClientJSAdapter$adapter$1.prototype.p1b = function () { | ||
this.v2g_1.disconnect(); | ||
}; | ||
SocketClientJSAdapter$adapter$1.prototype.m1b = function (token) { | ||
this.r2e_1.setConnectParamsSocketConfig(token); | ||
SocketClientJSAdapter$adapter$1.prototype.q1b = function (token) { | ||
this.v2g_1.setConnectParamsSocketConfig(token); | ||
}; | ||
SocketClientJSAdapter$adapter$1.prototype.n1b = function (milliseconds, callback) { | ||
this.r2e_1.startVerifyResponseTimer(milliseconds, callback); | ||
SocketClientJSAdapter$adapter$1.prototype.r1b = function (milliseconds, callback) { | ||
this.v2g_1.startVerifyResponseTimer(milliseconds, callback); | ||
}; | ||
SocketClientJSAdapter$adapter$1.$metadata$ = classMeta(undefined, [SocketClient]); | ||
function SocketClientJSAdapter$1($adapter) { | ||
this.s2e_1 = $adapter; | ||
this.w2g_1 = $adapter; | ||
} | ||
SocketClientJSAdapter$1.prototype.didReceiveNewSocketEvent = function (type, body) { | ||
var tmp0_safe_receiver = this.s2e_1.q2e_1; | ||
var tmp0_safe_receiver = this.w2g_1.u2g_1; | ||
if (tmp0_safe_receiver == null) | ||
null; | ||
else { | ||
tmp0_safe_receiver.j27(new UnknownSocketEvent(body, type)); | ||
tmp0_safe_receiver.e29(new UnknownSocketEvent(body, type)); | ||
} | ||
@@ -1109,3 +1141,3 @@ }; | ||
case 'NXMCORE_REASON_SERVER_DISCONNECTED': | ||
var tmp1_safe_receiver_0 = this.s2e_1.q2e_1; | ||
var tmp1_safe_receiver_0 = this.w2g_1.u2g_1; | ||
var tmp_0; | ||
@@ -1115,3 +1147,3 @@ if (tmp1_safe_receiver_0 == null) { | ||
} else { | ||
tmp1_safe_receiver_0.k27(tmp1_safe_receiver, SocketConnectionFailedReason_ServerDisconnected_getInstance()); | ||
tmp1_safe_receiver_0.f29(tmp1_safe_receiver, SocketConnectionFailedReason_ServerDisconnected_getInstance()); | ||
tmp_0 = Unit_getInstance(); | ||
@@ -1123,3 +1155,3 @@ } | ||
case 'NXMCORE_REASON_CLIENT_DISCONNECTED': | ||
var tmp2_safe_receiver = this.s2e_1.q2e_1; | ||
var tmp2_safe_receiver = this.w2g_1.u2g_1; | ||
var tmp_1; | ||
@@ -1129,3 +1161,3 @@ if (tmp2_safe_receiver == null) { | ||
} else { | ||
tmp2_safe_receiver.k27(tmp1_safe_receiver, SocketConnectionFailedReason_ClientDisconnected_getInstance()); | ||
tmp2_safe_receiver.f29(tmp1_safe_receiver, SocketConnectionFailedReason_ClientDisconnected_getInstance()); | ||
tmp_1 = Unit_getInstance(); | ||
@@ -1137,3 +1169,3 @@ } | ||
case 'NXMCORE_CLIENT_NETWORK_ERROR': | ||
var tmp3_safe_receiver = this.s2e_1.q2e_1; | ||
var tmp3_safe_receiver = this.w2g_1.u2g_1; | ||
var tmp_2; | ||
@@ -1143,3 +1175,3 @@ if (tmp3_safe_receiver == null) { | ||
} else { | ||
tmp3_safe_receiver.k27(tmp1_safe_receiver, SocketConnectionFailedReason_ClientNetworkError_getInstance()); | ||
tmp3_safe_receiver.f29(tmp1_safe_receiver, SocketConnectionFailedReason_ClientNetworkError_getInstance()); | ||
tmp_2 = Unit_getInstance(); | ||
@@ -1151,3 +1183,3 @@ } | ||
case 'NXMCORE_REASON_PING_TIMEOUT': | ||
var tmp4_safe_receiver = this.s2e_1.q2e_1; | ||
var tmp4_safe_receiver = this.w2g_1.u2g_1; | ||
var tmp_3; | ||
@@ -1157,3 +1189,3 @@ if (tmp4_safe_receiver == null) { | ||
} else { | ||
tmp4_safe_receiver.k27(tmp1_safe_receiver, SocketConnectionFailedReason_PingTimeout_getInstance()); | ||
tmp4_safe_receiver.f29(tmp1_safe_receiver, SocketConnectionFailedReason_PingTimeout_getInstance()); | ||
tmp_3 = Unit_getInstance(); | ||
@@ -1165,3 +1197,3 @@ } | ||
default: | ||
var tmp5_safe_receiver = this.s2e_1.q2e_1; | ||
var tmp5_safe_receiver = this.w2g_1.u2g_1; | ||
var tmp_4; | ||
@@ -1171,3 +1203,3 @@ if (tmp5_safe_receiver == null) { | ||
} else { | ||
tmp5_safe_receiver.k27(tmp1_safe_receiver, null); | ||
tmp5_safe_receiver.f29(tmp1_safe_receiver, null); | ||
tmp_4 = Unit_getInstance(); | ||
@@ -1185,55 +1217,26 @@ } | ||
function MediaClientJSAdapter$adapter$1($js) { | ||
this.u2e_1 = $js; | ||
this.t2e_1 = null; | ||
this.x2g_1 = $js; | ||
} | ||
MediaClientJSAdapter$adapter$1.prototype.q1b = function (_set____db54di) { | ||
this.t2e_1 = _set____db54di; | ||
MediaClientJSAdapter$adapter$1.prototype.u1b = function (closure) { | ||
this.x2g_1.enableMediaOutbound(closure); | ||
}; | ||
MediaClientJSAdapter$adapter$1.prototype.r1b = function (id) { | ||
this.u2e_1.enableMedia(id, null); | ||
MediaClientJSAdapter$adapter$1.prototype.y2g = function (closure, offerSDP, rtcId) { | ||
this.x2g_1.enableMediaInbound(closure, offerSDP, rtcId); | ||
}; | ||
MediaClientJSAdapter$adapter$1.prototype.s1b = function (id, remoteDescription) { | ||
this.u2e_1.enableMedia(id, remoteDescription); | ||
MediaClientJSAdapter$adapter$1.prototype.v1b = function (closure, offerSDP, rtcId) { | ||
return this.y2g(closure, offerSDP, rtcId); | ||
}; | ||
MediaClientJSAdapter$adapter$1.prototype.t1b = function (id, sdp, streamId, legId) { | ||
this.u2e_1.processAnswer(id, sdp, streamId, legId); | ||
MediaClientJSAdapter$adapter$1.prototype.w1b = function (id, sdp) { | ||
this.x2g_1.processAnswer(id, sdp); | ||
}; | ||
MediaClientJSAdapter$adapter$1.prototype.u1b = function (id) { | ||
this.u2e_1.disableMedia(id); | ||
MediaClientJSAdapter$adapter$1.prototype.x1b = function (id) { | ||
this.x2g_1.disableMedia(id); | ||
}; | ||
MediaClientJSAdapter$adapter$1.prototype.v1b = function (id) { | ||
this.u2e_1.mute(id); | ||
MediaClientJSAdapter$adapter$1.prototype.y1b = function (id) { | ||
this.x2g_1.mute(id); | ||
}; | ||
MediaClientJSAdapter$adapter$1.prototype.w1b = function (id) { | ||
this.u2e_1.unmute(id); | ||
MediaClientJSAdapter$adapter$1.prototype.z1b = function (id) { | ||
this.x2g_1.unmute(id); | ||
}; | ||
MediaClientJSAdapter$adapter$1.$metadata$ = classMeta(undefined, [MediaClient]); | ||
function MediaClientJSAdapter$1($adapter) { | ||
this.v2e_1 = $adapter; | ||
} | ||
MediaClientJSAdapter$1.prototype.onOffer = function (mediaId, streamId, sdp, callback) { | ||
var tmp0_safe_receiver = this.v2e_1.t2e_1; | ||
if (tmp0_safe_receiver == null) | ||
null; | ||
else { | ||
tmp0_safe_receiver.g27(mediaId, streamId, sdp, callback); | ||
} | ||
}; | ||
MediaClientJSAdapter$1.prototype.onAnswer = function (mediaId, streamId, sdp, callback) { | ||
var tmp0_safe_receiver = this.v2e_1.t2e_1; | ||
if (tmp0_safe_receiver == null) | ||
null; | ||
else { | ||
tmp0_safe_receiver.h27(mediaId, streamId, sdp, callback); | ||
} | ||
}; | ||
MediaClientJSAdapter$1.prototype.onError = function (mediaId, error) { | ||
var tmp0_safe_receiver = this.v2e_1.t2e_1; | ||
if (tmp0_safe_receiver == null) | ||
null; | ||
else { | ||
tmp0_safe_receiver.i27(mediaId, Exception_init_$Create$(error)); | ||
} | ||
}; | ||
MediaClientJSAdapter$1.$metadata$ = classMeta(); | ||
function entriesOf(jsObject) { | ||
@@ -1240,0 +1243,0 @@ var tmp$ret$2; |
@@ -15,10 +15,10 @@ (function (root, factory) { | ||
//region block: imports | ||
var classMeta = kotlin_kotlin.$_$.h5; | ||
var objectMeta = kotlin_kotlin.$_$.h6; | ||
var listOf = kotlin_kotlin.$_$.g4; | ||
var interfaceMeta = kotlin_kotlin.$_$.o5; | ||
var THROW_ISE = kotlin_kotlin.$_$.w7; | ||
var Unit_getInstance = kotlin_kotlin.$_$.o2; | ||
var Enum = kotlin_kotlin.$_$.q7; | ||
var stackTraceToString = kotlin_kotlin.$_$.m8; | ||
var classMeta = kotlin_kotlin.$_$.j5; | ||
var objectMeta = kotlin_kotlin.$_$.j6; | ||
var listOf = kotlin_kotlin.$_$.h4; | ||
var interfaceMeta = kotlin_kotlin.$_$.q5; | ||
var THROW_ISE = kotlin_kotlin.$_$.z7; | ||
var Unit_getInstance = kotlin_kotlin.$_$.p2; | ||
var Enum = kotlin_kotlin.$_$.s7; | ||
var stackTraceToString = kotlin_kotlin.$_$.p8; | ||
//endregion | ||
@@ -35,3 +35,3 @@ //region block: pre-declaration | ||
} | ||
LogWriter.prototype.y19 = function (severity) { | ||
LogWriter.prototype.a1a = function (severity) { | ||
return true; | ||
@@ -57,12 +57,12 @@ }; | ||
Companion_instance = this; | ||
var tmp = LoggerGlobal_getInstance().a1a_1; | ||
var tmp = LoggerGlobal_getInstance().c1a_1; | ||
Logger_init_$Init$(tmp, null, 2, null, this); | ||
} | ||
Companion.prototype.d1a = function () { | ||
Companion.prototype.f1a = function () { | ||
return get_defaultTag(); | ||
}; | ||
Companion.prototype.e1a = function (severity) { | ||
LoggerGlobal_getInstance().a1a_1.f1a(severity); | ||
Companion.prototype.g1a = function (severity) { | ||
LoggerGlobal_getInstance().c1a_1.h1a(severity); | ||
}; | ||
Companion.prototype.g1a = function (tag) { | ||
Companion.prototype.i1a = function (tag) { | ||
set_defaultTag(tag); | ||
@@ -79,33 +79,33 @@ }; | ||
Companion_getInstance(); | ||
this.h1a_1 = config; | ||
this.i1a_1 = tag; | ||
this.j1a_1 = config; | ||
this.k1a_1 = tag; | ||
} | ||
Logger.prototype.j1a = function () { | ||
return this.h1a_1; | ||
Logger.prototype.l1a = function () { | ||
return this.j1a_1; | ||
}; | ||
Logger.prototype.d1a = function () { | ||
return this.i1a_1; | ||
Logger.prototype.f1a = function () { | ||
return this.k1a_1; | ||
}; | ||
Logger.prototype.k1a = function (tag) { | ||
return new Logger(this.h1a_1, tag); | ||
Logger.prototype.m1a = function (tag) { | ||
return new Logger(this.j1a_1, tag); | ||
}; | ||
Logger.prototype.l1a = function (message) { | ||
if (this.h1a_1.p1a().r3(Severity_Info_getInstance()) <= 0) { | ||
this.o1a(Severity_Info_getInstance(), this.d1a(), null, message()); | ||
Logger.prototype.n1a = function (message) { | ||
if (this.j1a_1.r1a().s3(Severity_Info_getInstance()) <= 0) { | ||
this.q1a(Severity_Info_getInstance(), this.f1a(), null, message()); | ||
} | ||
}; | ||
Logger.prototype.m1a = function (message) { | ||
if (this.h1a_1.p1a().r3(Severity_Error_getInstance()) <= 0) { | ||
this.o1a(Severity_Error_getInstance(), this.d1a(), null, message()); | ||
Logger.prototype.o1a = function (message) { | ||
if (this.j1a_1.r1a().s3(Severity_Error_getInstance()) <= 0) { | ||
this.q1a(Severity_Error_getInstance(), this.f1a(), null, message()); | ||
} | ||
}; | ||
Logger.prototype.n1a = function (message) { | ||
if (this.h1a_1.p1a().r3(Severity_Error_getInstance()) <= 0) { | ||
this.o1a(Severity_Error_getInstance(), this.d1a(), null, message); | ||
Logger.prototype.p1a = function (message) { | ||
if (this.j1a_1.r1a().s3(Severity_Error_getInstance()) <= 0) { | ||
this.q1a(Severity_Error_getInstance(), this.f1a(), null, message); | ||
} | ||
}; | ||
Logger.prototype.o1a = function (severity, tag, throwable, message) { | ||
Logger.prototype.q1a = function (severity, tag, throwable, message) { | ||
// Inline function 'co.touchlab.kermit.Logger.processLog' call | ||
// Inline function 'kotlin.collections.forEach' call | ||
var tmp0_forEach = this.h1a_1.q1a(); | ||
var tmp0_forEach = this.j1a_1.s1a(); | ||
var tmp0_iterator = tmp0_forEach.g(); | ||
@@ -115,5 +115,5 @@ while (tmp0_iterator.h()) { | ||
// Inline function 'co.touchlab.kermit.Logger.processLog.<anonymous>' call | ||
if (element.y19(severity)) { | ||
if (element.a1a(severity)) { | ||
// Inline function 'co.touchlab.kermit.Logger.log.<anonymous>' call | ||
element.z19(severity, message, tag, throwable); | ||
element.b1a(severity, message, tag, throwable); | ||
} | ||
@@ -125,3 +125,3 @@ } | ||
LoggerGlobal_instance = this; | ||
this.a1a_1 = mutableKermitConfigInit(listOf(platformLogWriter())); | ||
this.c1a_1 = mutableKermitConfigInit(listOf(platformLogWriter())); | ||
} | ||
@@ -218,3 +218,3 @@ LoggerGlobal.$metadata$ = objectMeta('LoggerGlobal'); | ||
} | ||
ConsoleWriter.prototype.z19 = function (severity, message, tag, throwable) { | ||
ConsoleWriter.prototype.b1a = function (severity, message, tag, throwable) { | ||
var output = '[' + tag + '] ' + message; | ||
@@ -232,3 +232,3 @@ var tmp0_safe_receiver = throwable; | ||
var tmp1_subject = severity; | ||
var tmp0 = tmp1_subject.p3_1; | ||
var tmp0 = tmp1_subject.q3_1; | ||
switch (tmp0) { | ||
@@ -257,13 +257,13 @@ case 5: | ||
function JsMutableLoggerConfig(logWriters) { | ||
this.r1a_1 = get_DEFAULT_MIN_SEVERITY(); | ||
this.s1a_1 = logWriters; | ||
this.t1a_1 = get_DEFAULT_MIN_SEVERITY(); | ||
this.u1a_1 = logWriters; | ||
} | ||
JsMutableLoggerConfig.prototype.f1a = function (_set____db54di) { | ||
this.r1a_1 = _set____db54di; | ||
JsMutableLoggerConfig.prototype.h1a = function (_set____db54di) { | ||
this.t1a_1 = _set____db54di; | ||
}; | ||
JsMutableLoggerConfig.prototype.p1a = function () { | ||
return this.r1a_1; | ||
JsMutableLoggerConfig.prototype.r1a = function () { | ||
return this.t1a_1; | ||
}; | ||
JsMutableLoggerConfig.prototype.q1a = function () { | ||
return this.s1a_1; | ||
JsMutableLoggerConfig.prototype.s1a = function () { | ||
return this.u1a_1; | ||
}; | ||
@@ -270,0 +270,0 @@ JsMutableLoggerConfig.$metadata$ = classMeta('JsMutableLoggerConfig', [MutableLoggerConfig]); |
@@ -9,6 +9,9 @@ import * as KMPPackage from './kotlin/clientsdk-clientcore_js'; | ||
constructor(); | ||
enableMedia(id: string, remoteDescription?: string): Promise<void>; | ||
enableMediaInbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>) => void, offerSDP: string, rtcId: string): Promise<void>; | ||
enableMediaOutbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>, callback: (legId: string) => void) => void): Promise<void>; | ||
private getNewPC; | ||
mute(id: string): Promise<void>; | ||
unmute(id: string): Promise<void>; | ||
processAnswer(id: string, sdp: string, streamId: string, legId: string): void; | ||
getPeerConnection(id: string): RTCPeerConnection | undefined; | ||
processAnswer(id: string, sdp: string): void; | ||
disableMedia(id: string): void; | ||
@@ -15,0 +18,0 @@ private setMediaTracksEnabled; |
@@ -18,35 +18,54 @@ "use strict"; | ||
} | ||
enableMedia(id, remoteDescription) { | ||
var _a, _b; | ||
enableMediaInbound(closure, offerSDP, rtcId) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let sdp; | ||
let error; | ||
try { | ||
const pc = yield (0, createRtcAudioConnection_1.createRtcAudioConnection)(); | ||
this.pcs.set(id, pc); | ||
pc.ontrack = (evt) => { | ||
const stream = evt.streams[0]; | ||
if (stream) { | ||
const audio = new Audio(); | ||
audio.srcObject = stream; | ||
audio.autoplay = true; | ||
this.audio = audio; | ||
this.stream = stream; | ||
} | ||
}; | ||
if (remoteDescription) { | ||
const sdp = yield (0, createRtcAudioConnection_1.createAnswer)(pc, remoteDescription); | ||
// eslint-disable-next-line @typescript-eslint/no-empty-function | ||
(_a = this.delegate) === null || _a === void 0 ? void 0 : _a.onAnswer(id, '', sdp, () => { }); | ||
} | ||
else { | ||
const sdp = yield (0, createRtcAudioConnection_1.createOffer)(pc); | ||
(_b = this.delegate) === null || _b === void 0 ? void 0 : _b.onOffer(id, '', sdp, () => { | ||
// Do we need to save the leg id for later? | ||
}); | ||
} | ||
const pc = yield this.getNewPC(); | ||
this.pcs.set(rtcId, pc); | ||
sdp = yield (0, createRtcAudioConnection_1.createAnswer)(pc, offerSDP); | ||
} | ||
catch (error) { | ||
// TODO | ||
catch (err) { | ||
error = err; | ||
} | ||
finally { | ||
closure(error, sdp); | ||
} | ||
}); | ||
} | ||
enableMediaOutbound(closure) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let error; | ||
let pc; | ||
let sdp; | ||
try { | ||
pc = yield this.getNewPC(); | ||
sdp = yield (0, createRtcAudioConnection_1.createOffer)(pc); | ||
} | ||
catch (err) { | ||
error = err; | ||
} | ||
finally { | ||
closure(error, sdp, (legId) => { | ||
this.pcs.set(legId, pc); | ||
}); | ||
} | ||
}); | ||
} | ||
getNewPC() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const pc = yield (0, createRtcAudioConnection_1.createRtcAudioConnection)(); | ||
pc.ontrack = (evt) => { | ||
const stream = evt.streams[0]; | ||
if (stream) { | ||
const audio = new Audio(); | ||
audio.srcObject = stream; | ||
audio.autoplay = true; | ||
this.audio = audio; | ||
this.stream = stream; | ||
} | ||
}; | ||
return pc; | ||
}); | ||
} | ||
mute(id) { | ||
@@ -62,2 +81,6 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
getPeerConnection(id) { | ||
const pc = this.pcs.get(id); | ||
return pc; | ||
} | ||
// async getLocalStream(): Promise<MediaStream> { | ||
@@ -69,7 +92,3 @@ // return await navigator.mediaDevices.getUserMedia({ | ||
// } | ||
processAnswer(id, sdp, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
streamId, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
legId) { | ||
processAnswer(id, sdp) { | ||
const remoteDescription = new RTCSessionDescription({ | ||
@@ -76,0 +95,0 @@ type: 'answer', |
{ | ||
"name": "@vonage/client-sdk", | ||
"version": "0.1.3", | ||
"version": "0.1.4-alpha.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/Client.js", |
# Vonage Voice SDK | ||
## Install | ||
The Client SDK is intended to provide a ready solution for developers to build Programmable Conversation applications across multiple Channels including: Messages, Voice, SIP, websockets, and App. | ||
### 1. Create a Personal Access Token | ||
## Installation | ||
- generate token, see [here](https://docs.github.com/en/enterprise-server@3.4/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token ), you will need a PAT with `packages:read` scope enabled | ||
- enable SSO for new token, see [here](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on) | ||
The SDK can be installed using the npm install command | ||
### 2. Authenticate with Github packages | ||
``` | ||
npm i @vonage/client-sdk | ||
``` | ||
## SDK setup | ||
To use the client SDK in a Webpack or Vite project: | ||
``` | ||
$ npm login --scope=@nexmoinc --registry=https://npm.pkg.github.com | ||
import './App.css'; | ||
import VoiceClient, { ClientConfig, ConfigRegion } from '@vonage/client-sdk'; | ||
> Username: USERNAME //github user | ||
> Password: TOKEN // Personal access token | ||
> Email: github email | ||
const client = new VoiceClient(); | ||
// Config is optional but recomended, default region is US | ||
const config = new ClientConfig(ConfigRegion.US) | ||
client.setConfig(config) | ||
function App() { | ||
const createSession = async () => { | ||
const token = "my-token" | ||
await client.createSession(token) | ||
} | ||
return ( | ||
<button onClick={createSession}> create session </button> | ||
); | ||
} | ||
export default App; | ||
``` | ||
### 3. Add dependency | ||
## Documentation and examples | ||
``` | ||
npm install @nexmoinc/voice-sdk | ||
``` | ||
Visit [vonage website] (https://developer.vonage.com/tools) | ||
## License | ||
Copyright (c) 2023 Vonage, Inc. All rights reserved. Licensed only under the Vonage Client SDK License Agreement (the "License") located at [LICENCE](https://github.com/nexmoinc/conversation-js-sdk/blob/master/LICENSE). | ||
By downloading or otherwise using our software or services, you acknowledge that you have read, understand and agree to be bound by the Vonage Client SDK License Agreement and Privacy Policy. | ||
You may not use, exercise any rights with respect to or exploit this SDK, or any modifications or derivative works thereof, except in accordance with the License. | ||
[<img src="https://developer.nexmo.com/images/logos/vbc-logo.svg" width="30%">](https://www.vonage.com/communications-apis/) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
2188171
47117
55