@vonage/client-sdk 1.0.1-alpha.4 → 1.0.1-rc.1

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.
@@ -47240,14 +47240,68 @@ function requireClientsdkClientcore () {
47240
47240
  return Unit_getInstance();
47241
47241
  };
47242
47242
  }
47243
- function VoiceAPIImpl$answerCall$lambda$lambda($callback) {
47243
+ function VoiceAPIImpl$answerCall$lambda$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel) {
47244
+ return function () {
47245
+ var tmp0_safe_receiver = this$0.p2p_1.h2g(getKClass(CallReducer));
47246
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t2p_1;
47247
+ var call = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g2($legIdOrErr);
47248
+ var tmp2_safe_receiver = call;
47249
+ var tmp3_subject = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l2p_1;
47250
+ var tmp0 = tmp3_subject == null ? -1 : tmp3_subject.e4_1;
47251
+ switch (tmp0) {
47252
+ case -1:
47253
+ // Inline function 'kotlin.let' call
47254
+ $callback(Companion_getInstance_107().b2g(InternalError_NoInviteFound_getInstance()));
47255
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
47256
+ var tmp0_safe_receiver_0 = $cancel._v;
47257
+ tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0();
47258
+
47259
+ Unit_getInstance();
47260
+ break;
47261
+ case 3:
47262
+ // Inline function 'kotlin.also' call
47263
+ var tmp4_safe_receiver = $cancel._v;
47264
+ tmp4_safe_receiver == null ? null : tmp4_safe_receiver();
47265
+ // Inline function 'kotlin.contracts.contract' call
47266
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
47267
+ $callback(null);
47268
+
47269
+ Unit_getInstance();
47270
+ break;
47271
+ case 5:
47272
+ case 6:
47273
+ // Inline function 'kotlin.also' call
47274
+ var tmp5_safe_receiver = $cancel._v;
47275
+ tmp5_safe_receiver == null ? null : tmp5_safe_receiver();
47276
+ // Inline function 'kotlin.contracts.contract' call
47277
+ // Inline function 'com.vonage.clientcore.core.api.VoiceAPIImpl.answerCall.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
47278
+ $callback(Companion_getInstance_107().b2g(InternalError_InboundCallFailed_getInstance()));
47279
+
47280
+ Unit_getInstance();
47281
+ break;
47282
+ default:
47283
+ Unit_getInstance();
47284
+ break;
47285
+ }
47286
+ return Unit_getInstance();
47287
+ };
47288
+ }
47289
+ function VoiceAPIImpl$answerCall$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel) {
47290
+ return function () {
47291
+ return new StoredSubscription(VoiceAPIImpl$answerCall$lambda$lambda$lambda$lambda(this$0, $legIdOrErr, $callback, $cancel));
47292
+ };
47293
+ }
47294
+ function VoiceAPIImpl$answerCall$lambda$lambda($callback, this$0) {
47244
47295
  return function (legIdOrErr) {
47245
47296
  var tmp0_subject = legIdOrErr;
47246
47297
  if (tmp0_subject instanceof Exception) {
47247
47298
  $callback(Companion_getInstance_107().g2g(InternalError_InboundCallFailed_getInstance(), legIdOrErr.message, legIdOrErr.cause));
47248
47299
  } else {
47249
47300
  if (!(tmp0_subject == null) ? typeof tmp0_subject === 'string' : false) {
47250
- $callback(null);
47301
+ var cancel = {_v: null};
47302
+ var tmp_0 = getKClass(CallReducer);
47303
+ cancel._v = this$0.p2p_1.l2k(tmp_0, VoiceAPIImpl$answerCall$lambda$lambda$lambda(this$0, legIdOrErr, $callback, cancel));
47304
+ Unit_getInstance();
47251
47305
  } else {
47252
47306
  $callback(Companion_getInstance_107().h2j());
47253
47307
  }
@@ -47262,7 +47316,7 @@ function requireClientsdkClientcore () {
47262
47316
  $callback(Companion_getInstance_107().b2g(it));
47263
47317
  } else {
47264
47318
  var tmp_0 = new SetupInboundCall($callId, $invite.a2q_1, $invite.z2p_1, $invite.x2p_1, ensureNotNull($invite.b2q_1), null);
47265
- this$0.p2p_1.c1d(new Action(tmp_0, ActionMeta_init_$Create$(null, null, VoiceAPIImpl$answerCall$lambda$lambda($callback), 3, null)));
47319
+ this$0.p2p_1.c1d(new Action(tmp_0, ActionMeta_init_$Create$(null, null, VoiceAPIImpl$answerCall$lambda$lambda($callback, this$0), 3, null)));
47266
47320
  Unit_getInstance();
47267
47321
  }
47268
47322
  return Unit_getInstance();
@@ -66819,6 +66873,10 @@ class MediaClient {
66819
66873
  let error;
66820
66874
  try {
66821
66875
  const pc = yield this.getNewPC();
66876
+ pc.onconnectionstatechange = () => {
66877
+ var _a;
66878
+ (_a = this.delegate) === null || _a === void 0 ? void 0 : _a.onConnectionChange(rtcId, pc.connectionState);
66879
+ };
66822
66880
  this.pcs.set(rtcId, pc);
66823
66881
  sdp = yield createAnswer(pc, offerSDP);
66824
66882
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonage/client-sdk",
3
- "version": "1.0.1-alpha.4",
3
+ "version": "1.0.1-rc.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "module": "dist/client/index.mjs",