@signalapp/ringrtc 2.39.3 → 2.41.0
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/acknowledgments.md +1 -1
- package/dist/ringrtc/Service.d.ts +29 -13
- package/dist/ringrtc/Service.js +36 -19
- package/package.json +3 -3
package/dist/acknowledgments.md
CHANGED
|
@@ -669,7 +669,7 @@ For more information on this, and how to apply and follow the GNU AGPL, see
|
|
|
669
669
|
|
|
670
670
|
```
|
|
671
671
|
|
|
672
|
-
## libsignal-core 0.1.0, partial-default-derive 0.1.0, regex-aot 0.1.0, ringrtc 2.
|
|
672
|
+
## libsignal-core 0.1.0, partial-default-derive 0.1.0, regex-aot 0.1.0, ringrtc 2.41.0
|
|
673
673
|
|
|
674
674
|
```
|
|
675
675
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
@@ -16,6 +16,20 @@ export interface Reaction {
|
|
|
16
16
|
demuxId: number;
|
|
17
17
|
value: string;
|
|
18
18
|
}
|
|
19
|
+
/** type returned by Rust */
|
|
20
|
+
export interface RawPeekInfo {
|
|
21
|
+
devices: Array<PeekDeviceInfo>;
|
|
22
|
+
creator?: GroupCallUserId;
|
|
23
|
+
eraId?: string;
|
|
24
|
+
maxDevices?: number;
|
|
25
|
+
/** @deprecated Use {@link #deviceCountIncludingPendingDevices} and {@link #deviceCountExcludingPendingDevices} as appropriate */
|
|
26
|
+
deviceCount: number;
|
|
27
|
+
deviceCountIncludingPendingDevices: number;
|
|
28
|
+
deviceCountExcludingPendingDevices: number;
|
|
29
|
+
pendingUsers: Array<GroupCallUserId>;
|
|
30
|
+
callLinkState?: RawCallLinkState;
|
|
31
|
+
}
|
|
32
|
+
/** type derived from RawPeekInfo */
|
|
19
33
|
export interface PeekInfo {
|
|
20
34
|
devices: Array<PeekDeviceInfo>;
|
|
21
35
|
creator?: GroupCallUserId;
|
|
@@ -26,6 +40,7 @@ export interface PeekInfo {
|
|
|
26
40
|
deviceCountIncludingPendingDevices: number;
|
|
27
41
|
deviceCountExcludingPendingDevices: number;
|
|
28
42
|
pendingUsers: Array<GroupCallUserId>;
|
|
43
|
+
callLinkState?: CallLinkState;
|
|
29
44
|
}
|
|
30
45
|
export declare enum PeekStatusCodes {
|
|
31
46
|
EXPIRED_CALL_LINK = 703,
|
|
@@ -55,6 +70,12 @@ export declare class ReceivedAudioLevel {
|
|
|
55
70
|
level: RawAudioLevel;
|
|
56
71
|
constructor(demuxId: number, level: RawAudioLevel);
|
|
57
72
|
}
|
|
73
|
+
interface RawCallLinkState {
|
|
74
|
+
name: string;
|
|
75
|
+
rawRestrictions: number;
|
|
76
|
+
revoked: boolean;
|
|
77
|
+
expiration: Date;
|
|
78
|
+
}
|
|
58
79
|
export type EmptyObj = Record<PropertyKey, never>;
|
|
59
80
|
export type HttpResult<T> = {
|
|
60
81
|
success: true;
|
|
@@ -81,7 +102,7 @@ export declare class RingRTCType {
|
|
|
81
102
|
[name: string]: string;
|
|
82
103
|
}, body: Buffer | undefined) => void) | null;
|
|
83
104
|
handleSendCallMessage: ((recipientUuid: Buffer, message: Buffer, urgency: CallMessageUrgency) => void) | null;
|
|
84
|
-
handleSendCallMessageToGroup: ((groupId: Buffer, message: Buffer, urgency: CallMessageUrgency) => void) | null;
|
|
105
|
+
handleSendCallMessageToGroup: ((groupId: Buffer, message: Buffer, urgency: CallMessageUrgency, overrideRecipients: Array<Buffer>) => void) | null;
|
|
85
106
|
handleGroupCallRingUpdate: ((groupId: Buffer, ringId: bigint, sender: Buffer, update: RingUpdate) => void) | null;
|
|
86
107
|
constructor();
|
|
87
108
|
setConfig(config: Config): void;
|
|
@@ -216,14 +237,9 @@ export declare class RingRTCType {
|
|
|
216
237
|
handleReactions(clientId: GroupCallClientId, reactions: Array<Reaction>): void;
|
|
217
238
|
handleRaisedHands(clientId: GroupCallClientId, raisedHands: Array<number>): void;
|
|
218
239
|
handleRemoteDevicesChanged(clientId: GroupCallClientId, remoteDeviceStates: Array<RemoteDeviceState>): void;
|
|
219
|
-
handlePeekChanged(clientId: GroupCallClientId,
|
|
220
|
-
handlePeekResponse(requestId: number, statusCode: number,
|
|
221
|
-
handleCallLinkResponse(requestId: number, statusCode: number, state:
|
|
222
|
-
name: string;
|
|
223
|
-
rawRestrictions: number;
|
|
224
|
-
revoked: boolean;
|
|
225
|
-
expiration: Date;
|
|
226
|
-
} | undefined): void;
|
|
240
|
+
handlePeekChanged(clientId: GroupCallClientId, rawInfo: RawPeekInfo): void;
|
|
241
|
+
handlePeekResponse(requestId: number, statusCode: number, rawInfo: RawPeekInfo | undefined): void;
|
|
242
|
+
handleCallLinkResponse(requestId: number, statusCode: number, state: RawCallLinkState | undefined): void;
|
|
227
243
|
handleEmptyResponse(requestId: number, statusCode: number, state: EmptyObj | undefined): void;
|
|
228
244
|
handleEnded(clientId: GroupCallClientId, reason: GroupCallEndReason): void;
|
|
229
245
|
groupCallRingUpdate(groupId: GroupId, ringId: bigint, sender: GroupCallUserId, state: RingUpdate): void;
|
|
@@ -236,7 +252,7 @@ export declare class RingRTCType {
|
|
|
236
252
|
[name: string]: string;
|
|
237
253
|
}, body: Buffer | undefined): void;
|
|
238
254
|
sendCallMessage(recipientUuid: Buffer, message: Buffer, urgency: CallMessageUrgency): void;
|
|
239
|
-
sendCallMessageToGroup(groupId: Buffer, message: Buffer, urgency: CallMessageUrgency): void;
|
|
255
|
+
sendCallMessageToGroup(groupId: Buffer, message: Buffer, urgency: CallMessageUrgency, overrideRecipients: Array<Buffer>): void;
|
|
240
256
|
get call(): Call | null;
|
|
241
257
|
getCall(callId: CallId): Call | null;
|
|
242
258
|
accept(callId: CallId, asVideoCall: boolean): void;
|
|
@@ -645,7 +661,7 @@ export interface CallManagerCallbacks {
|
|
|
645
661
|
onSendHangup(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, HangupType: HangupType, hangupDeviceId: DeviceId | null): void;
|
|
646
662
|
onSendBusy(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean): void;
|
|
647
663
|
sendCallMessage(recipientUuid: Buffer, message: Buffer, urgency: CallMessageUrgency): void;
|
|
648
|
-
sendCallMessageToGroup(groupId: Buffer, message: Buffer, urgency: CallMessageUrgency): void;
|
|
664
|
+
sendCallMessageToGroup(groupId: Buffer, message: Buffer, urgency: CallMessageUrgency, overrideRecipients: Array<Buffer>): void;
|
|
649
665
|
sendHttpRequest(requestId: number, url: string, method: HttpMethod, headers: {
|
|
650
666
|
[name: string]: string;
|
|
651
667
|
}, body: Buffer | undefined): void;
|
|
@@ -654,8 +670,8 @@ export interface CallManagerCallbacks {
|
|
|
654
670
|
handleConnectionStateChanged(clientId: GroupCallClientId, connectionState: ConnectionState): void;
|
|
655
671
|
handleJoinStateChanged(clientId: GroupCallClientId, joinState: JoinState, demuxId: number | undefined): void;
|
|
656
672
|
handleRemoteDevicesChanged(clientId: GroupCallClientId, remoteDeviceStates: Array<RemoteDeviceState>): void;
|
|
657
|
-
handlePeekChanged(clientId: GroupCallClientId,
|
|
658
|
-
handlePeekResponse(requestId: number, statusCode: number,
|
|
673
|
+
handlePeekChanged(clientId: GroupCallClientId, rawInfo: RawPeekInfo): void;
|
|
674
|
+
handlePeekResponse(requestId: number, statusCode: number, rawInfo: RawPeekInfo | undefined): void;
|
|
659
675
|
handleEnded(clientId: GroupCallClientId, reason: GroupCallEndReason): void;
|
|
660
676
|
onLogMessage(level: number, fileName: string, line: number, message: string): void;
|
|
661
677
|
}
|
package/dist/ringrtc/Service.js
CHANGED
|
@@ -187,6 +187,32 @@ exports.ReceivedAudioLevel = ReceivedAudioLevel;
|
|
|
187
187
|
function normalizeAudioLevel(raw) {
|
|
188
188
|
return raw / 32767;
|
|
189
189
|
}
|
|
190
|
+
function rawCallLinkStateToCallLinkState(raw) {
|
|
191
|
+
if (raw) {
|
|
192
|
+
let restrictions;
|
|
193
|
+
switch (raw.rawRestrictions) {
|
|
194
|
+
case 0:
|
|
195
|
+
restrictions = CallLinks_1.CallLinkRestrictions.None;
|
|
196
|
+
break;
|
|
197
|
+
case 1:
|
|
198
|
+
restrictions = CallLinks_1.CallLinkRestrictions.AdminApproval;
|
|
199
|
+
break;
|
|
200
|
+
default:
|
|
201
|
+
restrictions = CallLinks_1.CallLinkRestrictions.Unknown;
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
return new CallLinks_1.CallLinkState(raw.name, restrictions, raw.revoked, raw.expiration);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
return undefined;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function rawPeekInfoToPeekInfo(raw) {
|
|
211
|
+
return {
|
|
212
|
+
...raw,
|
|
213
|
+
callLinkState: rawCallLinkStateToCallLinkState(raw.callLinkState),
|
|
214
|
+
};
|
|
215
|
+
}
|
|
190
216
|
class Requests {
|
|
191
217
|
constructor() {
|
|
192
218
|
this._resolveById = new Map();
|
|
@@ -821,21 +847,23 @@ class RingRTCType {
|
|
|
821
847
|
});
|
|
822
848
|
}
|
|
823
849
|
// Called by Rust
|
|
824
|
-
handlePeekChanged(clientId,
|
|
850
|
+
handlePeekChanged(clientId, rawInfo) {
|
|
825
851
|
sillyDeadlockProtection(() => {
|
|
826
852
|
const groupCall = this._groupCallByClientId.get(clientId);
|
|
827
853
|
if (!groupCall) {
|
|
828
854
|
this.logError('handlePeekChanged(): GroupCall not found in map!');
|
|
829
855
|
return;
|
|
830
856
|
}
|
|
857
|
+
const info = rawPeekInfoToPeekInfo(rawInfo);
|
|
831
858
|
groupCall.handlePeekChanged(info);
|
|
832
859
|
});
|
|
833
860
|
}
|
|
834
861
|
// Called by Rust
|
|
835
|
-
handlePeekResponse(requestId, statusCode,
|
|
862
|
+
handlePeekResponse(requestId, statusCode, rawInfo) {
|
|
836
863
|
sillyDeadlockProtection(() => {
|
|
837
864
|
let result;
|
|
838
|
-
if (
|
|
865
|
+
if (rawInfo) {
|
|
866
|
+
const info = rawPeekInfoToPeekInfo(rawInfo);
|
|
839
867
|
result = { success: true, value: info };
|
|
840
868
|
}
|
|
841
869
|
else {
|
|
@@ -851,22 +879,11 @@ class RingRTCType {
|
|
|
851
879
|
sillyDeadlockProtection(() => {
|
|
852
880
|
// Recreate the state so that we have the correct prototype, in case we add more methods to CallLinkState.
|
|
853
881
|
let result;
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
switch (state.rawRestrictions) {
|
|
857
|
-
case 0:
|
|
858
|
-
restrictions = CallLinks_1.CallLinkRestrictions.None;
|
|
859
|
-
break;
|
|
860
|
-
case 1:
|
|
861
|
-
restrictions = CallLinks_1.CallLinkRestrictions.AdminApproval;
|
|
862
|
-
break;
|
|
863
|
-
default:
|
|
864
|
-
restrictions = CallLinks_1.CallLinkRestrictions.Unknown;
|
|
865
|
-
break;
|
|
866
|
-
}
|
|
882
|
+
const s = rawCallLinkStateToCallLinkState(state);
|
|
883
|
+
if (s) {
|
|
867
884
|
result = {
|
|
868
885
|
success: true,
|
|
869
|
-
value:
|
|
886
|
+
value: s,
|
|
870
887
|
};
|
|
871
888
|
}
|
|
872
889
|
else {
|
|
@@ -1034,9 +1051,9 @@ class RingRTCType {
|
|
|
1034
1051
|
}
|
|
1035
1052
|
}
|
|
1036
1053
|
// Called by Rust
|
|
1037
|
-
sendCallMessageToGroup(groupId, message, urgency) {
|
|
1054
|
+
sendCallMessageToGroup(groupId, message, urgency, overrideRecipients) {
|
|
1038
1055
|
if (this.handleSendCallMessageToGroup) {
|
|
1039
|
-
this.handleSendCallMessageToGroup(groupId, message, urgency);
|
|
1056
|
+
this.handleSendCallMessageToGroup(groupId, message, urgency, overrideRecipients);
|
|
1040
1057
|
}
|
|
1041
1058
|
else {
|
|
1042
1059
|
this.logError('RingRTC.handleSendCallMessageToGroup is not set!');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalapp/ringrtc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.41.0",
|
|
4
4
|
"description": "Signal Messenger voice and video calling library.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"config": {
|
|
27
27
|
"prebuildUrl": "https://build-artifacts.signal.org/libraries/ringrtc-desktop-build-v${npm_package_version}.tar.gz",
|
|
28
|
-
"prebuildChecksum": "
|
|
28
|
+
"prebuildChecksum": "50e54adb31b0c40911e82c0192732323abe850b4990f4794ccc99a0a21bf85b4"
|
|
29
29
|
},
|
|
30
30
|
"author": "",
|
|
31
31
|
"license": "AGPL-3.0-only",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"https-proxy-agent": "7.0.1",
|
|
34
|
-
"tar": "^6.1
|
|
34
|
+
"tar": "^6.2.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/chai": "4.3.11",
|