@vonage/client-sdk 2.7.2 → 2.7.3
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/client/index.cjs +38 -13
- package/dist/client/index.mjs +38 -13
- package/dist/vonageClientSDK.js +37 -13
- package/dist/vonageClientSDK.min.js +1 -1
- package/dist/vonageClientSDK.min.mjs +1 -1
- package/dist/vonageClientSDK.mjs +37 -13
- package/package.json +1 -1
package/dist/vonageClientSDK.mjs
CHANGED
|
@@ -25107,9 +25107,6 @@ function requireClientsdkClientcore () {
|
|
|
25107
25107
|
initMetadataForCompanion(Companion_150);
|
|
25108
25108
|
initMetadataForObject($serializer_173, '$serializer', VOID, VOID, [GeneratedSerializer]);
|
|
25109
25109
|
initMetadataForClass(SessionTerminatedEvent, 'SessionTerminatedEvent', VOID, VOID, [SocketEvent], VOID, VOID, {0: $serializer_getInstance_173});
|
|
25110
|
-
function onConversationEvent(event) {
|
|
25111
|
-
}
|
|
25112
|
-
initMetadataForInterface(ConversationEventListener, 'ConversationEventListener');
|
|
25113
25110
|
function onRTCHangup(conversationId, legId, hangup) {
|
|
25114
25111
|
}
|
|
25115
25112
|
function onRTCTransfer(conversationId, legId) {
|
|
@@ -25117,6 +25114,9 @@ function requireClientsdkClientcore () {
|
|
|
25117
25114
|
function onLegStatusUpdate(conversationId, legId, fromUserId, status) {
|
|
25118
25115
|
}
|
|
25119
25116
|
initMetadataForInterface(RTCEventListener, 'RTCEventListener');
|
|
25117
|
+
function onConversationEvent(event) {
|
|
25118
|
+
}
|
|
25119
|
+
initMetadataForInterface(ConversationEventListener, 'ConversationEventListener');
|
|
25120
25120
|
function onAudioSay() {
|
|
25121
25121
|
}
|
|
25122
25122
|
function onAudioMuteUpdate(conversationId, legId, isMuted) {
|
|
@@ -25126,7 +25126,7 @@ function requireClientsdkClientcore () {
|
|
|
25126
25126
|
function onAudioDTMFUpdate(conversationId, legId, digits) {
|
|
25127
25127
|
}
|
|
25128
25128
|
initMetadataForInterface(AudioEventListener, 'AudioEventListener');
|
|
25129
|
-
initMetadataForClass(ChatAPIImpl$1, VOID, VOID, VOID, [
|
|
25129
|
+
initMetadataForClass(ChatAPIImpl$1, VOID, VOID, VOID, [RTCEventListener, ConversationEventListener, AudioEventListener]);
|
|
25130
25130
|
initMetadataForClass(ChatAPIImpl, 'ChatAPIImpl', VOID, VOID, [ChatAPI]);
|
|
25131
25131
|
initMetadataForClass(LoggingLevel, 'LoggingLevel', VOID, Enum);
|
|
25132
25132
|
initMetadataForObject(DefaultConfig, 'DefaultConfig');
|
|
@@ -25265,7 +25265,7 @@ function requireClientsdkClientcore () {
|
|
|
25265
25265
|
initMetadataForClass(HangupReason, 'HangupReason', VOID, Enum);
|
|
25266
25266
|
initMetadataForClass(LegStatus, 'LegStatus', VOID, Enum);
|
|
25267
25267
|
initMetadataForClass(CallDisconnectReason, 'CallDisconnectReason', VOID, Enum);
|
|
25268
|
-
initMetadataForClass(VoiceAPIImpl$1, VOID, VOID, VOID, [
|
|
25268
|
+
initMetadataForClass(VoiceAPIImpl$1, VOID, VOID, VOID, [RTCEventListener, ConversationEventListener, AudioEventListener]);
|
|
25269
25269
|
initMetadataForClass(VoiceAPIImpl, 'VoiceAPIImpl');
|
|
25270
25270
|
initMetadataForInterface(CallEvent, 'CallEvent');
|
|
25271
25271
|
initMetadataForClass(SetupOutboundCall, 'SetupOutboundCall', VOID, VOID, [CallEvent]);
|
|
@@ -25494,7 +25494,7 @@ function requireClientsdkClientcore () {
|
|
|
25494
25494
|
initMetadataForClass(runAfterDelay$1);
|
|
25495
25495
|
//endregion
|
|
25496
25496
|
function BuildKonfig() {
|
|
25497
|
-
this.i1i_1 = '2.7.
|
|
25497
|
+
this.i1i_1 = '2.7.3';
|
|
25498
25498
|
}
|
|
25499
25499
|
var BuildKonfig_instance;
|
|
25500
25500
|
function EmergencyCallOptions(ringbackTone) {
|
|
@@ -61904,6 +61904,16 @@ function requireClientsdkClientcore () {
|
|
|
61904
61904
|
return Unit_instance;
|
|
61905
61905
|
};
|
|
61906
61906
|
}
|
|
61907
|
+
function VoiceAPIImpl$serverCall$lambda(this$0, $context, $callback) {
|
|
61908
|
+
return function () {
|
|
61909
|
+
var session = this$0.k3q_1.e1j(getKClass(SessionReducer)).a2c_1.c2();
|
|
61910
|
+
if (!(session instanceof Active_0)) {
|
|
61911
|
+
return false;
|
|
61912
|
+
}
|
|
61913
|
+
attemptOutboundCall(this$0, session.a36_1.y3c_1, session.z35_1, $context, 1, null, $callback);
|
|
61914
|
+
return true;
|
|
61915
|
+
};
|
|
61916
|
+
}
|
|
61907
61917
|
function VoiceAPIImpl$attemptOutboundCall$lambda$lambda$lambda$lambda(this$0, $call, $callback, $legId, $sessionId) {
|
|
61908
61918
|
return function (it) {
|
|
61909
61919
|
if (it instanceof Exception) {
|
|
@@ -63169,12 +63179,10 @@ function requireClientsdkClientcore () {
|
|
|
63169
63179
|
return withCoreLock(VoiceAPIImpl$getCallLegs$lambda(this, callback, callId, parameters));
|
|
63170
63180
|
};
|
|
63171
63181
|
protoOf(VoiceAPIImpl).t1q = function (context, callback) {
|
|
63172
|
-
var
|
|
63173
|
-
if (!
|
|
63182
|
+
var started = withCoreLock(VoiceAPIImpl$serverCall$lambda(this, context, callback));
|
|
63183
|
+
if (!started) {
|
|
63174
63184
|
invokeCallbackWithError(new SessionNoActiveSessionError(), callback);
|
|
63175
|
-
return Unit_instance;
|
|
63176
63185
|
}
|
|
63177
|
-
attemptOutboundCall(this, session.a36_1.y3c_1, session.z35_1, context, 1, null, callback);
|
|
63178
63186
|
};
|
|
63179
63187
|
protoOf(VoiceAPIImpl).u1q = function (callId, callback) {
|
|
63180
63188
|
return withCoreLock(VoiceAPIImpl$reconnectCall$lambda(this, callback, callId));
|
|
@@ -86118,6 +86126,11 @@ function pcSetupEventOfSignalingState(state) {
|
|
|
86118
86126
|
class MediaClient {
|
|
86119
86127
|
constructor() {
|
|
86120
86128
|
this.pcs = new Map();
|
|
86129
|
+
/**
|
|
86130
|
+
* Per leg, so a second leg (a transfer) collects stats too and one leg ending cannot stop
|
|
86131
|
+
* collection for the others.
|
|
86132
|
+
*/
|
|
86133
|
+
this.statsTimers = new Map();
|
|
86121
86134
|
this.pcListeners = new WeakMap();
|
|
86122
86135
|
this.audio = undefined;
|
|
86123
86136
|
}
|
|
@@ -86142,18 +86155,28 @@ class MediaClient {
|
|
|
86142
86155
|
if (!pc) {
|
|
86143
86156
|
return closure(new clientsdkClientcore_jsExports.vonage.PeerConnectionNotFoundJS(id));
|
|
86144
86157
|
}
|
|
86145
|
-
this.
|
|
86158
|
+
if (this.statsTimers.has(id)) {
|
|
86159
|
+
return closure(null);
|
|
86160
|
+
}
|
|
86161
|
+
this.statsTimers.set(id, setInterval(() => {
|
|
86146
86162
|
if (pc.connectionState != 'connected') {
|
|
86147
|
-
|
|
86163
|
+
this.stopRtcStatsCollection(id);
|
|
86148
86164
|
return;
|
|
86149
86165
|
}
|
|
86150
86166
|
pc.getStats().then((result) => {
|
|
86151
86167
|
var _a;
|
|
86152
86168
|
(_a = this.delegate) === null || _a === void 0 ? void 0 : _a.onRawRtcStats(id, toRawRtcStats(result));
|
|
86153
86169
|
});
|
|
86154
|
-
}, interval);
|
|
86170
|
+
}, interval));
|
|
86155
86171
|
closure(null);
|
|
86156
86172
|
}
|
|
86173
|
+
stopRtcStatsCollection(id) {
|
|
86174
|
+
const timer = this.statsTimers.get(id);
|
|
86175
|
+
if (timer !== undefined) {
|
|
86176
|
+
clearInterval(timer);
|
|
86177
|
+
this.statsTimers.delete(id);
|
|
86178
|
+
}
|
|
86179
|
+
}
|
|
86157
86180
|
enableMediaInbound(rtcId, offerSDP, closure) {
|
|
86158
86181
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86159
86182
|
try {
|
|
@@ -86325,6 +86348,7 @@ class MediaClient {
|
|
|
86325
86348
|
return closure(null);
|
|
86326
86349
|
}
|
|
86327
86350
|
this.pcs.delete(id); // Remove from map before closing connection so size check in closePeerConnection is accurate
|
|
86351
|
+
this.stopRtcStatsCollection(id);
|
|
86328
86352
|
// trigger state change manually
|
|
86329
86353
|
(_a = this.delegate) === null || _a === void 0 ? void 0 : _a.onConnectionChange(id, 'closed');
|
|
86330
86354
|
this.closePeerConnection(pc);
|