@signalwire/js 4.0.0-dev-20260911205444 → 4.0.0-dev-20260914183941
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/browser.mjs +7 -11
- package/dist/browser.mjs.map +1 -1
- package/dist/browser.umd.js +7 -11
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +7 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser.mjs
CHANGED
|
@@ -17574,16 +17574,12 @@ var WebRTCVertoManager = class extends VertoManager {
|
|
|
17574
17574
|
const webrtcVertoMessage = WebrtcVerto(params);
|
|
17575
17575
|
const response = await this.webRtcCallSession.execute(webrtcVertoMessage);
|
|
17576
17576
|
const nonFatal = message.method === "verto.info" ? { fatal: false } : void 0;
|
|
17577
|
-
if (response.error) {
|
|
17578
|
-
const error = new JSONRPCError(response.error.code, response.error.message, response.error.data);
|
|
17579
|
-
this.reportLegError(error, this._rtcPeerConnectionsMap.get(params.callID), nonFatal);
|
|
17580
|
-
return response;
|
|
17581
|
-
}
|
|
17582
17577
|
const innerResult = getValueFrom(response, "result.result");
|
|
17583
|
-
|
|
17584
|
-
|
|
17578
|
+
const failure = response.error ?? innerResult?.error;
|
|
17579
|
+
if (failure) {
|
|
17580
|
+
const error = new JSONRPCError(failure.code, failure.message, failure.data);
|
|
17581
|
+
if (message.method === "verto.invite" || message.method === "verto.answer") throw error;
|
|
17585
17582
|
this.reportLegError(error, this._rtcPeerConnectionsMap.get(params.callID), nonFatal);
|
|
17586
|
-
return response;
|
|
17587
17583
|
}
|
|
17588
17584
|
return response;
|
|
17589
17585
|
}
|
|
@@ -17602,6 +17598,7 @@ var WebRTCVertoManager = class extends VertoManager {
|
|
|
17602
17598
|
default:
|
|
17603
17599
|
}
|
|
17604
17600
|
} catch (error) {
|
|
17601
|
+
if (vertoMethod === "verto.answer") throw error;
|
|
17605
17602
|
logger$16.error(`[WebRTCManager] Error sending Verto ${vertoMethod}:`, error);
|
|
17606
17603
|
this.reportLegError(toError(error), rtcPeerConnController);
|
|
17607
17604
|
if (vertoMethod === "verto.modify") this.onModifyFailed?.();
|
|
@@ -17638,7 +17635,7 @@ var WebRTCVertoManager = class extends VertoManager {
|
|
|
17638
17635
|
if (rtcPeerConnController.isMainDevice) this._signalingStatus$.next(status);
|
|
17639
17636
|
}
|
|
17640
17637
|
processInviteResponse(response, rtcPeerConnController) {
|
|
17641
|
-
if (
|
|
17638
|
+
if (getValueFrom(response, "result.result.result.message") === "CALL CREATED") {
|
|
17642
17639
|
this.emitMainSignalingStatus(rtcPeerConnController.id, "trying");
|
|
17643
17640
|
const nodeId = getValueFrom(response, "result.node_id") ?? null;
|
|
17644
17641
|
const memberId = getValueFrom(response, "result.result.result.memberID") ?? null;
|
|
@@ -17665,8 +17662,7 @@ var WebRTCVertoManager = class extends VertoManager {
|
|
|
17665
17662
|
logger$16.debug(`[WebRTCManager] nodeid: ${this._nodeId$.value}, selfId: ${this._selfId$.value}`);
|
|
17666
17663
|
} else {
|
|
17667
17664
|
logger$16.error("[WebRTCManager] Verto invite failed:", response);
|
|
17668
|
-
|
|
17669
|
-
this.reportLegError(inviteError, rtcPeerConnController);
|
|
17665
|
+
this.reportLegError(/* @__PURE__ */ new Error("Verto invite failed: unexpected response"), rtcPeerConnController);
|
|
17670
17666
|
}
|
|
17671
17667
|
}
|
|
17672
17668
|
get RTCPeerConnectionConfig() {
|