@signalwire/js 4.0.0-dev-20260714201720 → 4.0.0-dev-20260717142935
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 +122 -85
- package/dist/browser.mjs.map +1 -1
- package/dist/browser.umd.js +123 -84
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +110 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -13
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +64 -13
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +109 -86
- package/dist/index.mjs.map +1 -1
- package/dist/operators/index.cjs +1 -1
- package/dist/operators/index.mjs +1 -1
- package/dist/{operators-BlUtq-t0.mjs → operators-Cgz8swPu.mjs} +16 -2
- package/dist/operators-Cgz8swPu.mjs.map +1 -0
- package/dist/{operators-B8ipd4Xl.cjs → operators-D3_VhSb1.cjs} +27 -1
- package/dist/operators-D3_VhSb1.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/operators-B8ipd4Xl.cjs.map +0 -1
- package/dist/operators-BlUtq-t0.mjs.map +0 -1
package/dist/browser.mjs
CHANGED
|
@@ -9281,6 +9281,20 @@ var CallCreateError = class extends Error {
|
|
|
9281
9281
|
this.name = "CallCreateError";
|
|
9282
9282
|
}
|
|
9283
9283
|
};
|
|
9284
|
+
var CallNotReadyError = class extends Error {
|
|
9285
|
+
constructor(callId, options) {
|
|
9286
|
+
super(`Call "${callId}" has no self member context yet: selfId/nodeId have not been received from the server`, options);
|
|
9287
|
+
this.callId = callId;
|
|
9288
|
+
this.name = "CallNotReadyError";
|
|
9289
|
+
}
|
|
9290
|
+
};
|
|
9291
|
+
var ParticipantNotReadyError = class extends Error {
|
|
9292
|
+
constructor(memberId, options) {
|
|
9293
|
+
super(`Participant "${memberId}" has no call context yet: its member state (call_id/node_id) has not been received from the server`, options);
|
|
9294
|
+
this.memberId = memberId;
|
|
9295
|
+
this.name = "ParticipantNotReadyError";
|
|
9296
|
+
}
|
|
9297
|
+
};
|
|
9284
9298
|
var JSONRPCError = class extends Error {
|
|
9285
9299
|
constructor(code, message, data, options, requestId) {
|
|
9286
9300
|
super(message, options);
|
|
@@ -13644,9 +13658,9 @@ const initialState = {};
|
|
|
13644
13658
|
* the local participant with additional device control.
|
|
13645
13659
|
*/
|
|
13646
13660
|
var Participant = class extends Destroyable {
|
|
13647
|
-
constructor(id,
|
|
13661
|
+
constructor(id, callExecuteMethod, deviceController) {
|
|
13648
13662
|
super();
|
|
13649
|
-
this.
|
|
13663
|
+
this.callExecuteMethod = callExecuteMethod;
|
|
13650
13664
|
this.deviceController = deviceController;
|
|
13651
13665
|
this._state$ = this.createBehaviorSubject(initialState);
|
|
13652
13666
|
this.id = id;
|
|
@@ -13868,22 +13882,55 @@ var Participant = class extends Destroyable {
|
|
|
13868
13882
|
get value() {
|
|
13869
13883
|
return this._state$.value;
|
|
13870
13884
|
}
|
|
13885
|
+
/**
|
|
13886
|
+
* Target triple for member RPCs, built from the participant's own state.
|
|
13887
|
+
* The backend locates the member's session by the target `call_id`/`node_id`,
|
|
13888
|
+
* so this must always be the participant's own call context — never the
|
|
13889
|
+
* local call's id (issue #19400).
|
|
13890
|
+
*
|
|
13891
|
+
* Reading it doubles as a readiness probe: it throws until the first full
|
|
13892
|
+
* member event (`member.joined`/`member.updated` or the `call.joined`
|
|
13893
|
+
* roster) arrives, and never regresses afterwards.
|
|
13894
|
+
*
|
|
13895
|
+
* @throws {ParticipantNotReadyError} If the member state has not been
|
|
13896
|
+
* received yet (e.g. a participant first seen via `member.talking`) — an
|
|
13897
|
+
* empty call context can never address the member, so fail fast instead of
|
|
13898
|
+
* sending a doomed RPC.
|
|
13899
|
+
*/
|
|
13900
|
+
get target() {
|
|
13901
|
+
const { call_id, node_id } = this._state$.value;
|
|
13902
|
+
if (!call_id || !node_id) throw new ParticipantNotReadyError(this.id);
|
|
13903
|
+
return {
|
|
13904
|
+
member_id: this.id,
|
|
13905
|
+
call_id,
|
|
13906
|
+
node_id
|
|
13907
|
+
};
|
|
13908
|
+
}
|
|
13909
|
+
/**
|
|
13910
|
+
* Executes a member RPC against this participant, injecting its own
|
|
13911
|
+
* {@link target} as the target.
|
|
13912
|
+
*
|
|
13913
|
+
* @throws {ParticipantNotReadyError} Via {@link target}, when the
|
|
13914
|
+
* member state has not been received yet.
|
|
13915
|
+
*/
|
|
13916
|
+
async executeMethod(method, args) {
|
|
13917
|
+
return this.callExecuteMethod(this.target, method, args);
|
|
13918
|
+
}
|
|
13871
13919
|
/** Toggles the deafened state (mutes/unmutes incoming audio). */
|
|
13872
13920
|
async toggleDeaf() {
|
|
13873
|
-
|
|
13874
|
-
await this.executeMethod(this.id, method, {});
|
|
13921
|
+
await this.executeMethod(toggleDeafMethod(this.deaf), {});
|
|
13875
13922
|
}
|
|
13876
13923
|
/** Toggles the hand-raised state. */
|
|
13877
13924
|
async toggleHandraise() {
|
|
13878
|
-
await this.executeMethod(
|
|
13925
|
+
await this.executeMethod(toggleHandraiseMethod(this.handraised), {});
|
|
13879
13926
|
}
|
|
13880
13927
|
/** Mutes the participant's audio. */
|
|
13881
13928
|
async mute() {
|
|
13882
|
-
await this.executeMethod(
|
|
13929
|
+
await this.executeMethod("call.mute", { channels: ["audio"] });
|
|
13883
13930
|
}
|
|
13884
13931
|
/** Unmutes the participant's audio. */
|
|
13885
13932
|
async unmute() {
|
|
13886
|
-
await this.executeMethod(
|
|
13933
|
+
await this.executeMethod("call.unmute", { channels: ["audio"] });
|
|
13887
13934
|
}
|
|
13888
13935
|
/** Toggles the participant's audio mute state. */
|
|
13889
13936
|
async toggleMute() {
|
|
@@ -13891,11 +13938,11 @@ var Participant = class extends Destroyable {
|
|
|
13891
13938
|
}
|
|
13892
13939
|
/** Mutes the participant's video. */
|
|
13893
13940
|
async muteVideo() {
|
|
13894
|
-
await this.executeMethod(
|
|
13941
|
+
await this.executeMethod("call.mute", { channels: ["video"] });
|
|
13895
13942
|
}
|
|
13896
13943
|
/** Unmutes the participant's video. */
|
|
13897
13944
|
async unmuteVideo() {
|
|
13898
|
-
await this.executeMethod(
|
|
13945
|
+
await this.executeMethod("call.unmute", { channels: ["video"] });
|
|
13899
13946
|
}
|
|
13900
13947
|
/** Toggles the participant's video mute state. */
|
|
13901
13948
|
async toggleMuteVideo() {
|
|
@@ -13903,7 +13950,7 @@ var Participant = class extends Destroyable {
|
|
|
13903
13950
|
}
|
|
13904
13951
|
/** Toggles echo cancellation on the audio input. */
|
|
13905
13952
|
async toggleEchoCancellation() {
|
|
13906
|
-
await this.executeMethod(
|
|
13953
|
+
await this.executeMethod("call.audioflags.set", {
|
|
13907
13954
|
echo_cancellation: !this.echoCancellation,
|
|
13908
13955
|
auto_gain: this.autoGain,
|
|
13909
13956
|
noise_suppression: this.noiseSuppression
|
|
@@ -13911,7 +13958,7 @@ var Participant = class extends Destroyable {
|
|
|
13911
13958
|
}
|
|
13912
13959
|
/** Toggles automatic gain control on the audio input. */
|
|
13913
13960
|
async toggleAudioInputAutoGain() {
|
|
13914
|
-
await this.executeMethod(
|
|
13961
|
+
await this.executeMethod("call.audioflags.set", {
|
|
13915
13962
|
echo_cancellation: this.echoCancellation,
|
|
13916
13963
|
auto_gain: !this.autoGain,
|
|
13917
13964
|
noise_suppression: this.noiseSuppression
|
|
@@ -13919,7 +13966,7 @@ var Participant = class extends Destroyable {
|
|
|
13919
13966
|
}
|
|
13920
13967
|
/** Toggles noise suppression on the audio input. */
|
|
13921
13968
|
async toggleNoiseSuppression() {
|
|
13922
|
-
await this.executeMethod(
|
|
13969
|
+
await this.executeMethod("call.audioflags.set", {
|
|
13923
13970
|
echo_cancellation: this.echoCancellation,
|
|
13924
13971
|
auto_gain: this.autoGain,
|
|
13925
13972
|
noise_suppression: !this.noiseSuppression
|
|
@@ -13927,7 +13974,7 @@ var Participant = class extends Destroyable {
|
|
|
13927
13974
|
}
|
|
13928
13975
|
/** Toggles low-bitrate mode for this participant's media. */
|
|
13929
13976
|
async toggleLowbitrate() {
|
|
13930
|
-
await this.executeMethod(
|
|
13977
|
+
await this.executeMethod("call.lowbitrate.set", { lowbitrate: !this.lowbitrate });
|
|
13931
13978
|
}
|
|
13932
13979
|
/**
|
|
13933
13980
|
* Adjusts the **conference-only** microphone energy gate / sensitivity level
|
|
@@ -13943,7 +13990,7 @@ var Participant = class extends Destroyable {
|
|
|
13943
13990
|
* (integer, larger values are more sensitive).
|
|
13944
13991
|
*/
|
|
13945
13992
|
async setAudioInputSensitivity(value) {
|
|
13946
|
-
await this.executeMethod(
|
|
13993
|
+
await this.executeMethod("call.microphone.sensitivity.set", { sensitivity: value });
|
|
13947
13994
|
}
|
|
13948
13995
|
/**
|
|
13949
13996
|
* Sets the **server-side** microphone volume on this participant's bridged
|
|
@@ -13956,7 +14003,7 @@ var Participant = class extends Destroyable {
|
|
|
13956
14003
|
* @param value - Volume level (0-100).
|
|
13957
14004
|
*/
|
|
13958
14005
|
async setAudioInputVolume(value) {
|
|
13959
|
-
await this.executeMethod(
|
|
14006
|
+
await this.executeMethod("call.microphone.volume.set", { volume: value });
|
|
13960
14007
|
}
|
|
13961
14008
|
/**
|
|
13962
14009
|
* Sets the **server-side** speaker volume on this participant's bridged call
|
|
@@ -13970,45 +14017,31 @@ var Participant = class extends Destroyable {
|
|
|
13970
14017
|
* @param value - Volume level (0-100).
|
|
13971
14018
|
*/
|
|
13972
14019
|
async setAudioOutputVolume(value) {
|
|
13973
|
-
await this.executeMethod(
|
|
14020
|
+
await this.executeMethod("call.speaker.volume.set", { volume: value });
|
|
13974
14021
|
}
|
|
13975
14022
|
/**
|
|
13976
14023
|
* Sets the participant's position in the video layout.
|
|
13977
14024
|
*
|
|
13978
|
-
* Requires the `member.position` capability. The gateway
|
|
13979
|
-
*
|
|
13980
|
-
*
|
|
13981
|
-
*
|
|
13982
|
-
* guarantee a visible change: the backend silently returns `200` (no-op) for
|
|
13983
|
-
* non-conference targets.
|
|
14025
|
+
* Requires the `member.position` capability. The gateway requires a
|
|
14026
|
+
* `targets` array of `{ target, position }` entries (issue #19400). A
|
|
14027
|
+
* resolved promise does not guarantee a visible change: the backend silently
|
|
14028
|
+
* returns `200` (no-op) for non-conference targets.
|
|
13984
14029
|
*
|
|
13985
14030
|
* @param value - The {@link VideoPosition} to assign (e.g. `'auto'`, `'reserved-0'`).
|
|
13986
14031
|
*/
|
|
13987
14032
|
async setPosition(value) {
|
|
13988
|
-
|
|
13989
|
-
|
|
13990
|
-
member_id: this.id,
|
|
13991
|
-
call_id: state.call_id ?? "",
|
|
13992
|
-
node_id: state.node_id ?? ""
|
|
13993
|
-
};
|
|
13994
|
-
await this.executeMethod(target, "call.member.position.set", { targets: [{
|
|
13995
|
-
target,
|
|
14033
|
+
await this.executeMethod("call.member.position.set", { targets: [{
|
|
14034
|
+
target: this.target,
|
|
13996
14035
|
position: value
|
|
13997
14036
|
}] });
|
|
13998
14037
|
}
|
|
13999
14038
|
/** Removes this participant from the call. */
|
|
14000
14039
|
async remove() {
|
|
14001
|
-
|
|
14002
|
-
const target = {
|
|
14003
|
-
member_id: this.id,
|
|
14004
|
-
call_id: state.call_id ?? "",
|
|
14005
|
-
node_id: state.node_id ?? ""
|
|
14006
|
-
};
|
|
14007
|
-
await this.executeMethod(target, "call.member.remove", {});
|
|
14040
|
+
await this.executeMethod("call.member.remove", { targets: [this.target] });
|
|
14008
14041
|
}
|
|
14009
14042
|
/** Ends the call for this participant. */
|
|
14010
14043
|
async end() {
|
|
14011
|
-
await this.executeMethod(
|
|
14044
|
+
await this.executeMethod("call.end", {});
|
|
14012
14045
|
}
|
|
14013
14046
|
/**
|
|
14014
14047
|
* Replaces custom metadata for this participant.
|
|
@@ -14028,7 +14061,7 @@ var Participant = class extends Destroyable {
|
|
|
14028
14061
|
}
|
|
14029
14062
|
/** Destroys the participant, releasing all subscriptions and references. */
|
|
14030
14063
|
destroy() {
|
|
14031
|
-
this.
|
|
14064
|
+
this.callExecuteMethod = void 0;
|
|
14032
14065
|
super.destroy();
|
|
14033
14066
|
}
|
|
14034
14067
|
};
|
|
@@ -14040,8 +14073,8 @@ var Participant = class extends Destroyable {
|
|
|
14040
14073
|
*/
|
|
14041
14074
|
var SelfParticipant = class extends Participant {
|
|
14042
14075
|
/** @internal */
|
|
14043
|
-
constructor(id,
|
|
14044
|
-
super(id,
|
|
14076
|
+
constructor(id, callExecuteMethod, vertoManager, deviceController) {
|
|
14077
|
+
super(id, callExecuteMethod, deviceController);
|
|
14045
14078
|
this.vertoManager = vertoManager;
|
|
14046
14079
|
this._studioAudio$ = this.createBehaviorSubject(false);
|
|
14047
14080
|
this.capabilities = new SelfCapabilities();
|
|
@@ -14065,7 +14098,7 @@ var SelfParticipant = class extends Participant {
|
|
|
14065
14098
|
async enableStudioAudio() {
|
|
14066
14099
|
if (this._studioAudio$.value) return;
|
|
14067
14100
|
this._studioAudio$.next(true);
|
|
14068
|
-
await this.executeMethod(
|
|
14101
|
+
await this.executeMethod("call.audioflags.set", {
|
|
14069
14102
|
echo_cancellation: false,
|
|
14070
14103
|
auto_gain: false,
|
|
14071
14104
|
noise_suppression: false
|
|
@@ -14078,7 +14111,7 @@ var SelfParticipant = class extends Participant {
|
|
|
14078
14111
|
async disableStudioAudio() {
|
|
14079
14112
|
if (!this._studioAudio$.value) return;
|
|
14080
14113
|
this._studioAudio$.next(false);
|
|
14081
|
-
await this.executeMethod(
|
|
14114
|
+
await this.executeMethod("call.audioflags.set", {
|
|
14082
14115
|
echo_cancellation: true,
|
|
14083
14116
|
auto_gain: true,
|
|
14084
14117
|
noise_suppression: true
|
|
@@ -18299,12 +18332,6 @@ function mosToQualityLevel(mos) {
|
|
|
18299
18332
|
var import_cjs$11 = require_cjs();
|
|
18300
18333
|
const logger$12 = getLogger();
|
|
18301
18334
|
/**
|
|
18302
|
-
* Verto method for setting member layout positions. Its gateway DTO requires a
|
|
18303
|
-
* `targets` array whose entries are `{ target, position }` (NOT bare targets),
|
|
18304
|
-
* so {@link WebRTCCall.buildMethodParams} special-cases it. See issue #19400.
|
|
18305
|
-
*/
|
|
18306
|
-
const POSITION_SET_METHOD = "call.member.position.set";
|
|
18307
|
-
/**
|
|
18308
18335
|
* Ratio between the critical and warning RTT spike multipliers.
|
|
18309
18336
|
* Warning threshold = baseline * warningMultiplier (default 3x)
|
|
18310
18337
|
* Critical threshold = baseline * warningMultiplier * RTT_CRITICAL_TO_WARNING_RATIO
|
|
@@ -18455,7 +18482,7 @@ var WebRTCCall = class extends Destroyable {
|
|
|
18455
18482
|
/** Toggles the call lock state, preventing or allowing new participants from joining. */
|
|
18456
18483
|
async toggleLock() {
|
|
18457
18484
|
const method = this.locked ? "call.unlock" : "call.lock";
|
|
18458
|
-
await this.executeMethod(this.
|
|
18485
|
+
await this.executeMethod(this.callSelf, method, {});
|
|
18459
18486
|
}
|
|
18460
18487
|
/**
|
|
18461
18488
|
* Toggles the hold state of the call (pauses/resumes local media transmission).
|
|
@@ -18504,14 +18531,24 @@ var WebRTCCall = class extends Destroyable {
|
|
|
18504
18531
|
*
|
|
18505
18532
|
* Constructs call context (node_id, call_id, member_id) and sends the RPC request.
|
|
18506
18533
|
*
|
|
18507
|
-
* @param target - Target
|
|
18534
|
+
* @param target - Target {@link MemberTarget} triple, or the local member's
|
|
18535
|
+
* ID string for self-operations (any other string is rejected — a bare
|
|
18536
|
+
* member id cannot carry the remote member's own call context).
|
|
18508
18537
|
* @param method - Verto method name (e.g. `'call.mute'`, `'call.member.remove'`).
|
|
18509
18538
|
* @param args - Parameters for the RPC method.
|
|
18510
18539
|
* @returns The RPC response.
|
|
18540
|
+
* @throws {CallNotReadyError} If the call has no self member context yet.
|
|
18541
|
+
* @throws {InvalidParams} If a string target is not the local member's ID.
|
|
18511
18542
|
* @throws {JSONRPCError} If the RPC call returns an error.
|
|
18512
18543
|
*/
|
|
18513
18544
|
async executeMethod(target, method, args) {
|
|
18514
|
-
const
|
|
18545
|
+
const self = this.callSelf;
|
|
18546
|
+
if (typeof target === "string" && target !== self.member_id) throw new InvalidParams(`Target member ID ${target} does not match call's self member ID ${self.member_id}`);
|
|
18547
|
+
const params = {
|
|
18548
|
+
...args,
|
|
18549
|
+
self,
|
|
18550
|
+
target: typeof target === "string" ? self : target
|
|
18551
|
+
};
|
|
18515
18552
|
const request = buildRPCRequest({
|
|
18516
18553
|
method,
|
|
18517
18554
|
params
|
|
@@ -18525,29 +18562,23 @@ var WebRTCCall = class extends Destroyable {
|
|
|
18525
18562
|
throw error;
|
|
18526
18563
|
}
|
|
18527
18564
|
}
|
|
18528
|
-
|
|
18529
|
-
|
|
18530
|
-
|
|
18531
|
-
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
|
|
18535
|
-
|
|
18536
|
-
|
|
18537
|
-
|
|
18538
|
-
|
|
18539
|
-
|
|
18540
|
-
|
|
18541
|
-
targets: [target]
|
|
18542
|
-
};
|
|
18565
|
+
/**
|
|
18566
|
+
* The local leg's member triple — sent as `self` in every member RPC
|
|
18567
|
+
* envelope, and as the `target` of call-scoped self-operations (e.g. lock,
|
|
18568
|
+
* layout).
|
|
18569
|
+
*
|
|
18570
|
+
* @throws {CallNotReadyError} Before `call.joined` delivers the self member
|
|
18571
|
+
* context (`selfId`/`nodeId`) — an RPC without it cannot be routed, so fail
|
|
18572
|
+
* fast instead of sending a doomed request.
|
|
18573
|
+
*/
|
|
18574
|
+
get callSelf() {
|
|
18575
|
+
const node_id = this.nodeId;
|
|
18576
|
+
const member_id = this.vertoManager.selfId;
|
|
18577
|
+
if (!node_id || !member_id) throw new CallNotReadyError(this.id);
|
|
18543
18578
|
return {
|
|
18544
|
-
|
|
18545
|
-
|
|
18546
|
-
|
|
18547
|
-
node_id: this.nodeId ?? "",
|
|
18548
|
-
call_id: this.id,
|
|
18549
|
-
member_id: target
|
|
18550
|
-
}
|
|
18579
|
+
node_id,
|
|
18580
|
+
call_id: this.id,
|
|
18581
|
+
member_id
|
|
18551
18582
|
};
|
|
18552
18583
|
}
|
|
18553
18584
|
/** Observable of the current call status (e.g. `'ringing'`, `'connected'`). */
|
|
@@ -19110,12 +19141,17 @@ var WebRTCCall = class extends Destroyable {
|
|
|
19110
19141
|
*
|
|
19111
19142
|
* **These operations are NOT atomic.** The layout is applied first, then each
|
|
19112
19143
|
* member position sequentially, so members may briefly flash into their
|
|
19113
|
-
* default slots before being moved to the requested positions.
|
|
19144
|
+
* default slots before being moved to the requested positions. Targeted
|
|
19145
|
+
* members are validated upfront, though: when any of them has no
|
|
19146
|
+
* {@link Participant.target | member call context} yet, the whole call
|
|
19147
|
+
* rejects before any request is sent and the layout is left unchanged.
|
|
19114
19148
|
*
|
|
19115
19149
|
* @param layout - Layout name (must be one of {@link layouts}).
|
|
19116
19150
|
* @param positions - Optional map of member IDs to {@link VideoPosition} values.
|
|
19117
19151
|
* When omitted or empty, only the layout is changed.
|
|
19118
19152
|
* @throws {InvalidParams} If the layout is not in the available {@link layouts}.
|
|
19153
|
+
* @throws {ParticipantNotReadyError} If a targeted member's call context has
|
|
19154
|
+
* not been received yet — thrown before any request is sent.
|
|
19119
19155
|
*
|
|
19120
19156
|
* @example
|
|
19121
19157
|
* ```ts
|
|
@@ -19126,18 +19162,19 @@ var WebRTCCall = class extends Destroyable {
|
|
|
19126
19162
|
*/
|
|
19127
19163
|
async setLayout(layout, positions) {
|
|
19128
19164
|
if (!this.layouts.includes(layout)) throw new InvalidParams(`Layout ${layout} is not available in the current call layouts: ${this.layouts.join(", ")}`);
|
|
19129
|
-
const
|
|
19130
|
-
|
|
19131
|
-
const positionEntries = Object.entries(positions ?? {});
|
|
19132
|
-
if (positionEntries.length === 0) return;
|
|
19133
|
-
for (const [memberId, position] of positionEntries) {
|
|
19165
|
+
const targets = [];
|
|
19166
|
+
for (const [memberId, position] of Object.entries(positions ?? {})) {
|
|
19134
19167
|
const participant = this.participants.find((p) => p.id === memberId);
|
|
19135
19168
|
if (!participant) {
|
|
19136
19169
|
logger$12.warn(`[Call] setLayout: member ${memberId} not found in participants; skipping position ${position}`);
|
|
19137
19170
|
continue;
|
|
19138
19171
|
}
|
|
19139
|
-
|
|
19172
|
+
participant.target;
|
|
19173
|
+
targets.push([participant, position]);
|
|
19140
19174
|
}
|
|
19175
|
+
const selfId = await (0, import_cjs$11.firstValueFrom)(this.selfId$.pipe((0, import_cjs$11.filter)((id) => id !== null)));
|
|
19176
|
+
await this.executeMethod(selfId, "call.layout.set", { layout });
|
|
19177
|
+
for (const [participant, position] of targets) await participant.setPosition(position);
|
|
19141
19178
|
}
|
|
19142
19179
|
/**
|
|
19143
19180
|
* Transfers the call to another destination.
|
|
@@ -21969,7 +22006,7 @@ var SignalWire = class extends Destroyable {
|
|
|
21969
22006
|
logger$1.warn("[SignalWire] Failed to initialize VisibilityController:", error);
|
|
21970
22007
|
}
|
|
21971
22008
|
try {
|
|
21972
|
-
this._diagnosticsCollector = new DiagnosticsCollector({ sdkVersion: "4.0.0-rc.
|
|
22009
|
+
this._diagnosticsCollector = new DiagnosticsCollector({ sdkVersion: "4.0.0-rc.2" });
|
|
21973
22010
|
} catch (error) {
|
|
21974
22011
|
logger$1.warn("[SignalWire] Failed to initialize DiagnosticsCollector:", error);
|
|
21975
22012
|
}
|
|
@@ -22504,7 +22541,7 @@ var StaticCredentialProvider = class {
|
|
|
22504
22541
|
/**
|
|
22505
22542
|
* Library version from package.json, injected at build time.
|
|
22506
22543
|
*/
|
|
22507
|
-
const version = "4.0.0-rc.
|
|
22544
|
+
const version = "4.0.0-rc.2";
|
|
22508
22545
|
/**
|
|
22509
22546
|
* Flag indicating the library has been loaded and is ready to use.
|
|
22510
22547
|
* For UMD builds: `window.SignalWire.ready`
|
|
@@ -22526,7 +22563,7 @@ const ready = true;
|
|
|
22526
22563
|
*/
|
|
22527
22564
|
const emitReadyEvent = () => {
|
|
22528
22565
|
if (typeof window !== "undefined") {
|
|
22529
|
-
const event = new CustomEvent("signalwire:js:ready", { detail: { version: "4.0.0-rc.
|
|
22566
|
+
const event = new CustomEvent("signalwire:js:ready", { detail: { version: "4.0.0-rc.2" } });
|
|
22530
22567
|
window.dispatchEvent(event);
|
|
22531
22568
|
}
|
|
22532
22569
|
};
|
|
@@ -22550,5 +22587,5 @@ emitReadyEvent();
|
|
|
22550
22587
|
if (typeof process === "undefined") globalThis.process = { env: { NODE_ENV: "production" } };
|
|
22551
22588
|
|
|
22552
22589
|
//#endregion
|
|
22553
|
-
export { Address, CallCreateError, ClientPreferences, CollectionFetchError, DPoPInitError, DeviceTokenError, EmbedTokenCredentialProvider, InvalidCredentialsError, MediaAccessError, MediaTrackError, MessageParseError, OverconstrainedFallbackError, Participant, PreflightError, RecoveryError, SelfCapabilities, SelfParticipant, SignalWire, StaticCredentialProvider, TokenRefreshError, UnexpectedError, User, VertoPongError, WebRTCCall, embeddableCall, getLogger, isSelfParticipant, ready, setDebugOptions, setLogLevel, setLogger, version };
|
|
22590
|
+
export { Address, CallCreateError, CallNotReadyError, ClientPreferences, CollectionFetchError, DPoPInitError, DeviceTokenError, EmbedTokenCredentialProvider, InvalidCredentialsError, MediaAccessError, MediaTrackError, MessageParseError, OverconstrainedFallbackError, Participant, ParticipantNotReadyError, PreflightError, RecoveryError, SelfCapabilities, SelfParticipant, SignalWire, StaticCredentialProvider, TokenRefreshError, UnexpectedError, User, VertoPongError, WebRTCCall, embeddableCall, getLogger, isSelfParticipant, ready, setDebugOptions, setLogLevel, setLogger, version };
|
|
22554
22591
|
//# sourceMappingURL=browser.mjs.map
|