@signalapp/ringrtc 2.56.0 → 2.57.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/bin/virtual_audio.sh +204 -0
- package/dist/ringrtc/Service.d.ts +41 -41
- package/dist/ringrtc/Service.js +7 -7
- package/package.json +6 -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-account-keys 0.1.0, libsignal-core 0.1.0, mrp 2.
|
|
672
|
+
## libsignal-account-keys 0.1.0, libsignal-core 0.1.0, mrp 2.57.0, protobuf 2.57.0, ringrtc 2.57.0, regex-aot 0.1.0, partial-default-derive 0.1.0
|
|
673
673
|
|
|
674
674
|
```
|
|
675
675
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Copyright 2025 Signal Messenger, LLC
|
|
4
|
+
# SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
set -eou pipefail
|
|
8
|
+
|
|
9
|
+
usage()
|
|
10
|
+
{
|
|
11
|
+
echo "usage: $0 [--setup|--teardown|--play|--stop] [--input-source <name>] [--output-sink <name>] [--input-file <path>] [--input-loops <count>] [--output-file <path>] [--start-pipewire-pulse]
|
|
12
|
+
where:
|
|
13
|
+
--setup: Set up the specified devices
|
|
14
|
+
--teardown: Tear down the specified devices.
|
|
15
|
+
--play: Start playing from and recording to specified files and devices.
|
|
16
|
+
--stop: Stop playing and recording to the specified devices.
|
|
17
|
+
--input-source: The name of the source your application will use.
|
|
18
|
+
NOTE: this script may create additional devices with this name as a suffix.
|
|
19
|
+
--output-sink: The name of the device your application will output to.
|
|
20
|
+
--input-file: The name of the file to play to your application (should be a .wav).
|
|
21
|
+
--input-loops: Optional. The number of times to loop |input|. Default 1.
|
|
22
|
+
--output-file: The name of the file to record your application to (should be a .wav).
|
|
23
|
+
|
|
24
|
+
--start-pipewire-pulse: Optional, linux only. Assume that there is no pulse server running and start one.
|
|
25
|
+
-h, --help: Display this usage text.
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
# Setup 'my_spiffy_input_source' as an input and 'my_spiffy_output_sink' as an out, and start pipewire if needed.
|
|
29
|
+
$0 --setup --input-source my_spiffy_input_source --output-sink my_spiffy_output_sink --start-pipewire-pulse
|
|
30
|
+
# Start playing foo.wav to my_spiffy_input_source
|
|
31
|
+
$0 --play --input-source my_spiffy_input_source --output-sink my_spiffy_output_sink --input-file foo.wav
|
|
32
|
+
# Stop playing to my_spiffy_input_source
|
|
33
|
+
$0 --stop --input-source my_spiffy_input_source --output-sink my_spiffy_output_sink
|
|
34
|
+
# Destroy the specified virtual input devices.
|
|
35
|
+
$0 --teardown --input-source my_spiffy_input_source --output-sink my_spiffy_output_sink
|
|
36
|
+
|
|
37
|
+
"
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
TYPE=
|
|
41
|
+
INPUT_SOURCE=
|
|
42
|
+
INPUT_SINK=
|
|
43
|
+
OUTPUT_SINK=
|
|
44
|
+
INPUT_FILE=
|
|
45
|
+
INPUT_LOOPS=1
|
|
46
|
+
OUTPUT_FILE=
|
|
47
|
+
START_PIPEWIRE_PULSE=
|
|
48
|
+
|
|
49
|
+
while [[ $# -gt 0 ]]; do
|
|
50
|
+
case $1 in
|
|
51
|
+
--setup )
|
|
52
|
+
TYPE=setup
|
|
53
|
+
;;
|
|
54
|
+
--teardown )
|
|
55
|
+
TYPE=teardown
|
|
56
|
+
;;
|
|
57
|
+
--play )
|
|
58
|
+
TYPE=play
|
|
59
|
+
;;
|
|
60
|
+
--stop )
|
|
61
|
+
TYPE=stop
|
|
62
|
+
;;
|
|
63
|
+
--input-source )
|
|
64
|
+
INPUT_SOURCE="$2"
|
|
65
|
+
shift
|
|
66
|
+
;;
|
|
67
|
+
--output-sink )
|
|
68
|
+
OUTPUT_SINK="$2"
|
|
69
|
+
shift
|
|
70
|
+
;;
|
|
71
|
+
--input-file )
|
|
72
|
+
INPUT_FILE="$2"
|
|
73
|
+
shift
|
|
74
|
+
;;
|
|
75
|
+
--output-file )
|
|
76
|
+
OUTPUT_FILE="$2"
|
|
77
|
+
shift
|
|
78
|
+
;;
|
|
79
|
+
--input-loops )
|
|
80
|
+
INPUT_LOOPS="$2"
|
|
81
|
+
shift
|
|
82
|
+
;;
|
|
83
|
+
--start-pipewire-pulse )
|
|
84
|
+
START_PIPEWIRE_PULSE=y
|
|
85
|
+
;;
|
|
86
|
+
-h | --help )
|
|
87
|
+
usage
|
|
88
|
+
exit
|
|
89
|
+
;;
|
|
90
|
+
* )
|
|
91
|
+
echo "Did not recognize flag $1"
|
|
92
|
+
usage
|
|
93
|
+
exit 1
|
|
94
|
+
esac
|
|
95
|
+
shift
|
|
96
|
+
done
|
|
97
|
+
|
|
98
|
+
start_pipewire_pulse()
|
|
99
|
+
{
|
|
100
|
+
if pactl info | grep -q "Server Name: PulseAudio (on PipeWire"; then
|
|
101
|
+
echo "not re-initializing pulse/pipewire"
|
|
102
|
+
else
|
|
103
|
+
echo "Starting a new pipewire, wireplumber, and pipewire-pulse"
|
|
104
|
+
pipewire &
|
|
105
|
+
wireplumber &
|
|
106
|
+
pipewire-pulse &
|
|
107
|
+
fi
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
setup_linux()
|
|
111
|
+
{
|
|
112
|
+
pactl load-module module-null-sink sink_name="${INPUT_SINK}" \
|
|
113
|
+
format=s16 rate=48000 channels=2 > /dev/null # ignore module ID
|
|
114
|
+
# Use this as a dummy module to turn the monitor source, which Signal
|
|
115
|
+
# Desktop ignores, into a non-monitor source
|
|
116
|
+
pactl load-module module-remap-source source_name="${INPUT_SOURCE}" \
|
|
117
|
+
source_properties=device.description="${INPUT_SOURCE}" \
|
|
118
|
+
format=s16 rate=48000 channels=2 master="${INPUT_SINK}".monitor \
|
|
119
|
+
master_channel_map=front-left,front-right \
|
|
120
|
+
channel_map=front-left,front-right remix=false > /dev/null # ignore ID
|
|
121
|
+
pactl load-module module-null-sink sink_name="${OUTPUT_SINK}" \
|
|
122
|
+
sink_properties=device.description="${OUTPUT_SINK}" \
|
|
123
|
+
format=s16 rate=48000 channels=2 > /dev/null # ignore ID
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
teardown_linux()
|
|
127
|
+
{
|
|
128
|
+
# safe to ignore failures here
|
|
129
|
+
pactl unload-module module-null-sink || true
|
|
130
|
+
pactl unload-module module-remap-source || true
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
play_linux()
|
|
134
|
+
{
|
|
135
|
+
if [ -n "$INPUT_FILE" ] && [ -e "$INPUT_FILE" ]; then
|
|
136
|
+
(
|
|
137
|
+
for _ in $(seq 1 "${INPUT_LOOPS}"); do
|
|
138
|
+
paplay --device="${INPUT_SINK}" "$INPUT_FILE" || break # Exit early if requested
|
|
139
|
+
done
|
|
140
|
+
) &
|
|
141
|
+
fi
|
|
142
|
+
if [ -n "$OUTPUT_FILE" ]; then
|
|
143
|
+
parecord --format=s16 --rate=48000 --channels=2 \
|
|
144
|
+
--device="${OUTPUT_SINK}".monitor "${OUTPUT_FILE}" &
|
|
145
|
+
fi
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
stop_linux()
|
|
149
|
+
{
|
|
150
|
+
# Kill the recording process
|
|
151
|
+
pkill --full "parecord.*${OUTPUT_SINK}.monitor" || true
|
|
152
|
+
# Kill the play process
|
|
153
|
+
pkill --full "paplay.*${INPUT_SINK}" || true
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
if [ -z "$TYPE" ]; then
|
|
158
|
+
echo "One of --setup, --teardown, --play, --stop is required"
|
|
159
|
+
usage
|
|
160
|
+
exit 1
|
|
161
|
+
fi
|
|
162
|
+
|
|
163
|
+
if [ -z "$INPUT_SOURCE" ]; then
|
|
164
|
+
echo "--input-source is required"
|
|
165
|
+
usage
|
|
166
|
+
exit 1
|
|
167
|
+
fi
|
|
168
|
+
|
|
169
|
+
INPUT_SINK="sink_for_${INPUT_SOURCE}"
|
|
170
|
+
|
|
171
|
+
if [ -z "$OUTPUT_SINK" ]; then
|
|
172
|
+
echo "--output-sink is required"
|
|
173
|
+
usage
|
|
174
|
+
exit 1
|
|
175
|
+
fi
|
|
176
|
+
|
|
177
|
+
UNAME=$(uname)
|
|
178
|
+
|
|
179
|
+
if [ "$UNAME" = "Darwin" ]; then
|
|
180
|
+
echo "macOS is not yet supported"
|
|
181
|
+
exit 1
|
|
182
|
+
elif [ "$UNAME" = "Linux" ]; then
|
|
183
|
+
if [[ "$START_PIPEWIRE_PULSE" ]]; then
|
|
184
|
+
start_pipewire_pulse
|
|
185
|
+
fi
|
|
186
|
+
if [ "$TYPE" = "setup" ]; then
|
|
187
|
+
setup_linux
|
|
188
|
+
elif [ "$TYPE" = "teardown" ]; then
|
|
189
|
+
teardown_linux
|
|
190
|
+
elif [ "$TYPE" = "play" ]; then
|
|
191
|
+
if [ -z "$INPUT_FILE" ]; then
|
|
192
|
+
echo "--input-file was not specified with --play; assuming silence"
|
|
193
|
+
fi
|
|
194
|
+
if [ -z "$OUTPUT_FILE" ]; then
|
|
195
|
+
echo "--output-file was not specified with --play; will not record"
|
|
196
|
+
fi
|
|
197
|
+
play_linux
|
|
198
|
+
elif [ "$TYPE" = "stop" ]; then
|
|
199
|
+
stop_linux
|
|
200
|
+
fi
|
|
201
|
+
else
|
|
202
|
+
echo "$UNAME" is not yet supported
|
|
203
|
+
exit 1
|
|
204
|
+
fi
|
|
@@ -5,7 +5,7 @@ declare class Config {
|
|
|
5
5
|
field_trials: Record<string, string> | undefined;
|
|
6
6
|
}
|
|
7
7
|
type GroupId = Uint8Array;
|
|
8
|
-
type GroupCallUserId =
|
|
8
|
+
type GroupCallUserId = Uint8Array;
|
|
9
9
|
export interface PeekDeviceInfo {
|
|
10
10
|
demuxId: number;
|
|
11
11
|
userId?: GroupCallUserId;
|
|
@@ -99,14 +99,14 @@ export declare class RingRTCType {
|
|
|
99
99
|
handleLogMessage: ((level: CallLogLevel, fileName: string, line: number, message: string) => void) | null;
|
|
100
100
|
handleSendHttpRequest: ((requestId: number, url: string, method: HttpMethod, headers: {
|
|
101
101
|
[name: string]: string;
|
|
102
|
-
}, body:
|
|
103
|
-
handleSendCallMessage: ((recipientUuid:
|
|
104
|
-
handleSendCallMessageToGroup: ((groupId: GroupId, message:
|
|
105
|
-
handleGroupCallRingUpdate: ((groupId: GroupId, ringId: bigint, sender:
|
|
102
|
+
}, body: Uint8Array | undefined) => void) | null;
|
|
103
|
+
handleSendCallMessage: ((recipientUuid: Uint8Array, message: Uint8Array, urgency: CallMessageUrgency) => void) | null;
|
|
104
|
+
handleSendCallMessageToGroup: ((groupId: GroupId, message: Uint8Array, urgency: CallMessageUrgency, overrideRecipients: Array<Uint8Array>) => void) | null;
|
|
105
|
+
handleGroupCallRingUpdate: ((groupId: GroupId, ringId: bigint, sender: GroupCallUserId, update: RingUpdate) => void) | null;
|
|
106
106
|
handleRtcStatsReport: ((reportJson: string) => void) | null;
|
|
107
107
|
constructor();
|
|
108
108
|
setConfig(config: Config): void;
|
|
109
|
-
setSelfUuid(uuid:
|
|
109
|
+
setSelfUuid(uuid: Uint8Array): void;
|
|
110
110
|
startOutgoingCall(remoteUserId: UserId, isVideoCall: boolean, localDeviceId: DeviceId): Call;
|
|
111
111
|
cancelGroupRing(groupId: GroupId, ringId: bigint, reason: RingCancelReason | null): void;
|
|
112
112
|
onStartOutgoingCall(remoteUserId: UserId, callId: CallId): void;
|
|
@@ -121,9 +121,9 @@ export declare class RingRTCType {
|
|
|
121
121
|
onAudioLevels(remoteUserId: UserId, capturedLevel: RawAudioLevel, receivedLevel: RawAudioLevel): void;
|
|
122
122
|
onLowBandwidthForVideo(remoteUserId: UserId, recovered: boolean): void;
|
|
123
123
|
renderVideoFrame(width: number, height: number, buffer: Buffer): void;
|
|
124
|
-
onSendOffer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, offerType: OfferType, opaque:
|
|
125
|
-
onSendAnswer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, opaque:
|
|
126
|
-
onSendIceCandidates(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, candidates: Array<
|
|
124
|
+
onSendOffer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, offerType: OfferType, opaque: Uint8Array): void;
|
|
125
|
+
onSendAnswer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, opaque: Uint8Array): void;
|
|
126
|
+
onSendIceCandidates(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, candidates: Array<Uint8Array>): void;
|
|
127
127
|
onSendHangup(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, hangupType: HangupType, deviceId: DeviceId | null): void;
|
|
128
128
|
onSendBusy(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean): void;
|
|
129
129
|
private sendSignaling;
|
|
@@ -227,11 +227,11 @@ export declare class RingRTCType {
|
|
|
227
227
|
* @param adminPasskey - the passkey specified when the link was created
|
|
228
228
|
*/
|
|
229
229
|
deleteCallLink(sfuUrl: string, authCredentialPresentation: Uint8Array, linkRootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined, adminPasskey: Uint8Array): Promise<HttpResult<undefined>>;
|
|
230
|
-
receivedHttpResponse(requestId: number, status: number, body:
|
|
230
|
+
receivedHttpResponse(requestId: number, status: number, body: Uint8Array): void;
|
|
231
231
|
httpRequestFailed(requestId: number, debugInfo: string | undefined): void;
|
|
232
232
|
getGroupCall(groupId: GroupId, sfuUrl: string, hkdfExtraInfo: Uint8Array, audioLevelsIntervalMillis: number | undefined, observer: GroupCallObserver): GroupCall | undefined;
|
|
233
233
|
getCallLinkCall(sfuUrl: string, endorsementPublicKey: Uint8Array, authCredentialPresentation: Uint8Array, rootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined, adminPasskey: Uint8Array | undefined, hkdfExtraInfo: Uint8Array, audioLevelsIntervalMillis: number | undefined, observer: GroupCallObserver): GroupCall | undefined;
|
|
234
|
-
peekGroupCall(sfuUrl: string, membershipProof:
|
|
234
|
+
peekGroupCall(sfuUrl: string, membershipProof: Uint8Array, groupMembers: Array<GroupMemberInfo>): Promise<PeekInfo>;
|
|
235
235
|
peekCallLinkCall(sfuUrl: string, authCredentialPresentation: Uint8Array, rootKey: CallLinkRootKey, epoch: CallLinkEpoch | undefined): Promise<HttpResult<PeekInfo>>;
|
|
236
236
|
requestMembershipProof(clientId: GroupCallClientId): void;
|
|
237
237
|
requestGroupMembers(clientId: GroupCallClientId): void;
|
|
@@ -259,7 +259,7 @@ export declare class RingRTCType {
|
|
|
259
259
|
logInfo(message: string): void;
|
|
260
260
|
handleCallingMessage(message: CallingMessage, options: {
|
|
261
261
|
remoteUserId: UserId;
|
|
262
|
-
remoteUuid?:
|
|
262
|
+
remoteUuid?: Uint8Array;
|
|
263
263
|
remoteDeviceId: DeviceId;
|
|
264
264
|
localDeviceId: DeviceId;
|
|
265
265
|
ageSec: number;
|
|
@@ -270,9 +270,9 @@ export declare class RingRTCType {
|
|
|
270
270
|
}): void;
|
|
271
271
|
sendHttpRequest(requestId: number, url: string, method: HttpMethod, headers: {
|
|
272
272
|
[name: string]: string;
|
|
273
|
-
}, body:
|
|
274
|
-
sendCallMessage(recipientUuid:
|
|
275
|
-
sendCallMessageToGroup(groupId: GroupId, message:
|
|
273
|
+
}, body: Uint8Array | undefined): void;
|
|
274
|
+
sendCallMessage(recipientUuid: Uint8Array, message: Uint8Array, urgency: CallMessageUrgency): void;
|
|
275
|
+
sendCallMessageToGroup(groupId: GroupId, message: Uint8Array, urgency: CallMessageUrgency, overrideRecipients: Array<Uint8Array>): void;
|
|
276
276
|
get call(): Call | null;
|
|
277
277
|
getCall(callId: CallId): Call | null;
|
|
278
278
|
accept(callId: CallId): void;
|
|
@@ -473,7 +473,7 @@ export declare class LocalDeviceState {
|
|
|
473
473
|
}
|
|
474
474
|
export declare class RemoteDeviceState {
|
|
475
475
|
demuxId: number;
|
|
476
|
-
userId:
|
|
476
|
+
userId: Uint8Array;
|
|
477
477
|
mediaKeysReceived: boolean;
|
|
478
478
|
audioMuted: boolean | undefined;
|
|
479
479
|
videoMuted: boolean | undefined;
|
|
@@ -485,12 +485,12 @@ export declare class RemoteDeviceState {
|
|
|
485
485
|
speakerTime: string;
|
|
486
486
|
forwardingVideo: boolean | undefined;
|
|
487
487
|
isHigherResolutionPending: boolean;
|
|
488
|
-
constructor(demuxId: number, userId:
|
|
488
|
+
constructor(demuxId: number, userId: Uint8Array, addedTime: string, speakerTime: string, mediaKeysReceived: boolean);
|
|
489
489
|
}
|
|
490
490
|
export declare class GroupMemberInfo {
|
|
491
|
-
userId:
|
|
492
|
-
userIdCipherText:
|
|
493
|
-
constructor(userId:
|
|
491
|
+
userId: Uint8Array;
|
|
492
|
+
userIdCipherText: Uint8Array;
|
|
493
|
+
constructor(userId: Uint8Array, userIdCipherText: Uint8Array);
|
|
494
494
|
}
|
|
495
495
|
export declare class VideoRequest {
|
|
496
496
|
demuxId: number;
|
|
@@ -549,12 +549,12 @@ export declare class GroupCall {
|
|
|
549
549
|
resendMediaKeys(): void;
|
|
550
550
|
setDataMode(dataMode: DataMode): void;
|
|
551
551
|
requestVideo(resolutions: Array<VideoRequest>, activeSpeakerHeight: number): void;
|
|
552
|
-
approveUser(otherUserId:
|
|
553
|
-
denyUser(otherUserId:
|
|
552
|
+
approveUser(otherUserId: Uint8Array): void;
|
|
553
|
+
denyUser(otherUserId: Uint8Array): void;
|
|
554
554
|
removeClient(otherClientDemuxId: number): void;
|
|
555
555
|
blockClient(otherClientDemuxId: number): void;
|
|
556
556
|
setGroupMembers(members: Array<GroupMemberInfo>): void;
|
|
557
|
-
setMembershipProof(proof:
|
|
557
|
+
setMembershipProof(proof: Uint8Array): void;
|
|
558
558
|
requestMembershipProof(): void;
|
|
559
559
|
requestGroupMembers(): void;
|
|
560
560
|
handleConnectionStateChanged(connectionState: ConnectionState): void;
|
|
@@ -582,7 +582,7 @@ declare class GroupCallVideoFrameSource {
|
|
|
582
582
|
constructor(callManager: CallManager, groupCall: GroupCall, remoteDemuxId: number);
|
|
583
583
|
receiveVideoFrame(buffer: Buffer, maxWidth: number, maxHeight: number): [number, number] | undefined;
|
|
584
584
|
}
|
|
585
|
-
type ProtobufBuffer =
|
|
585
|
+
type ProtobufBuffer = Uint8Array | {
|
|
586
586
|
toArrayBuffer: () => ArrayBuffer;
|
|
587
587
|
};
|
|
588
588
|
export type UserId = string;
|
|
@@ -651,7 +651,7 @@ export declare enum RingCancelReason {
|
|
|
651
651
|
}
|
|
652
652
|
export interface CallManager {
|
|
653
653
|
setConfig(config: Config): void;
|
|
654
|
-
setSelfUuid(uuid:
|
|
654
|
+
setSelfUuid(uuid: Uint8Array): void;
|
|
655
655
|
createOutgoingCall(remoteUserId: UserId, isVideoCall: boolean, localDeviceId: DeviceId): CallId;
|
|
656
656
|
proceed(callId: CallId, iceServers: Array<IceServer>, hideIp: boolean, dataMode: DataMode, audioLevelsIntervalMillis: number): void;
|
|
657
657
|
accept(callId: CallId): void;
|
|
@@ -666,13 +666,13 @@ export interface CallManager {
|
|
|
666
666
|
updateDataMode(dataMode: DataMode): void;
|
|
667
667
|
sendVideoFrame(width: number, height: number, format: VideoPixelFormatEnum, buffer: Buffer): void;
|
|
668
668
|
receiveVideoFrame(buffer: Buffer, maxWidth: number, maxHeight: number): [number, number] | undefined;
|
|
669
|
-
receivedOffer(remoteUserId: UserId, remoteDeviceId: DeviceId, localDeviceId: DeviceId, messageAgeSec: number, callId: CallId, offerType: OfferType, opaque:
|
|
670
|
-
receivedAnswer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, opaque:
|
|
671
|
-
receivedIceCandidates(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, candidates: Array<
|
|
669
|
+
receivedOffer(remoteUserId: UserId, remoteDeviceId: DeviceId, localDeviceId: DeviceId, messageAgeSec: number, callId: CallId, offerType: OfferType, opaque: Uint8Array, senderIdentityKey: Uint8Array, receiverIdentityKey: Uint8Array): void;
|
|
670
|
+
receivedAnswer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, opaque: Uint8Array, senderIdentityKey: Uint8Array, receiverIdentityKey: Uint8Array): void;
|
|
671
|
+
receivedIceCandidates(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, candidates: Array<Uint8Array>): void;
|
|
672
672
|
receivedHangup(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, hangupType: HangupType, hangupDeviceId: DeviceId | null): void;
|
|
673
673
|
receivedBusy(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId): void;
|
|
674
|
-
receivedCallMessage(remoteUserId:
|
|
675
|
-
receivedHttpResponse(requestId: number, status: number, body:
|
|
674
|
+
receivedCallMessage(remoteUserId: Uint8Array, remoteDeviceId: DeviceId, localDeviceId: DeviceId, data: Uint8Array, messageAgeSec: number): void;
|
|
675
|
+
receivedHttpResponse(requestId: number, status: number, body: Uint8Array): void;
|
|
676
676
|
httpRequestFailed(requestId: number, debugInfo: string | undefined): void;
|
|
677
677
|
createGroupCallClient(groupId: GroupId, sfuUrl: string, hkdfExtraInfo: Uint8Array, audioLevelsIntervalMillis: number): GroupCallClientId;
|
|
678
678
|
createCallLinkCallClient(sfuUrl: string, endorsementPublicKey: Uint8Array, authCredentialPresentation: Uint8Array, linkRootKey: Uint8Array, epoch: number | undefined, adminPasskey: Uint8Array | undefined, hkdfExtraInfo: Uint8Array, audioLevelsIntervalMillis: number): GroupCallClientId;
|
|
@@ -687,25 +687,25 @@ export interface CallManager {
|
|
|
687
687
|
setOutgoingVideoMuted(clientId: GroupCallClientId, muted: boolean): void;
|
|
688
688
|
setPresenting(clientId: GroupCallClientId, presenting: boolean): void;
|
|
689
689
|
setOutgoingGroupCallVideoIsScreenShare(clientId: GroupCallClientId, isScreenShare: boolean): void;
|
|
690
|
-
groupRing(clientId: GroupCallClientId, recipient:
|
|
690
|
+
groupRing(clientId: GroupCallClientId, recipient: Uint8Array | undefined): void;
|
|
691
691
|
groupReact(clientId: GroupCallClientId, value: string): void;
|
|
692
692
|
groupRaiseHand(clientId: GroupCallClientId, raise: boolean): void;
|
|
693
693
|
resendMediaKeys(clientId: GroupCallClientId): void;
|
|
694
694
|
setDataMode(clientId: GroupCallClientId, dataMode: DataMode): void;
|
|
695
695
|
requestVideo(clientId: GroupCallClientId, resolutions: Array<VideoRequest>, activeSpeakerHeight: number): void;
|
|
696
|
-
approveUser(clientId: GroupCallClientId, otherUserId:
|
|
697
|
-
denyUser(clientId: GroupCallClientId, otherUserId:
|
|
696
|
+
approveUser(clientId: GroupCallClientId, otherUserId: Uint8Array): void;
|
|
697
|
+
denyUser(clientId: GroupCallClientId, otherUserId: Uint8Array): void;
|
|
698
698
|
removeClient(clientId: GroupCallClientId, otherClientDemuxId: number): void;
|
|
699
699
|
blockClient(clientId: GroupCallClientId, otherClientDemuxId: number): void;
|
|
700
700
|
setGroupMembers(clientId: GroupCallClientId, members: Array<GroupMemberInfo>): void;
|
|
701
|
-
setMembershipProof(clientId: GroupCallClientId, proof:
|
|
701
|
+
setMembershipProof(clientId: GroupCallClientId, proof: Uint8Array): void;
|
|
702
702
|
receiveGroupCallVideoFrame(clientId: GroupCallClientId, remoteDemuxId: number, buffer: Buffer, maxWidth: number, maxHeight: number): [number, number] | undefined;
|
|
703
703
|
setRtcStatsInterval(clientId: GroupCallClientId, intervalMillis: number): void;
|
|
704
704
|
readCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Uint8Array, linkRootKey: Uint8Array, epoch: number | undefined): void;
|
|
705
705
|
createCallLink(requestId: number, sfuUrl: string, createCredentialPresentation: Uint8Array, linkRootKey: Uint8Array, adminPasskey: Uint8Array, callLinkPublicParams: Uint8Array, restrictions: number | undefined): void;
|
|
706
706
|
updateCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Uint8Array, linkRootKey: Uint8Array, epoch: number | undefined, adminPasskey: Uint8Array, newName: string | undefined, newRestrictions: number | undefined, newRevoked: boolean | undefined): void;
|
|
707
707
|
deleteCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Uint8Array, linkRootKey: Uint8Array, epoch: number | undefined, adminPasskey: Uint8Array): void;
|
|
708
|
-
peekGroupCall(requestId: number, sfu_url: string, membership_proof:
|
|
708
|
+
peekGroupCall(requestId: number, sfu_url: string, membership_proof: Uint8Array, group_members: Array<GroupMemberInfo>): void;
|
|
709
709
|
peekCallLinkCall(requestId: number, sfuUrl: string, authCredentialPresentation: Uint8Array, linkRootKey: Uint8Array, epoch: number | undefined): void;
|
|
710
710
|
getAudioInputs(): Array<AudioDevice>;
|
|
711
711
|
setAudioInput(index: number): void;
|
|
@@ -720,16 +720,16 @@ export interface CallManagerCallbacks {
|
|
|
720
720
|
onRemoteAudioEnabled(remoteUserId: UserId, enabled: boolean): void;
|
|
721
721
|
onRemoteVideoEnabled(remoteUserId: UserId, enabled: boolean): void;
|
|
722
722
|
onRemoteSharingScreen(remoteUserId: UserId, enabled: boolean): void;
|
|
723
|
-
onSendOffer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, mediaType: number, opaque:
|
|
724
|
-
onSendAnswer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, opaque:
|
|
725
|
-
onSendIceCandidates(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, candidates: Array<
|
|
723
|
+
onSendOffer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, mediaType: number, opaque: Uint8Array): void;
|
|
724
|
+
onSendAnswer(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, opaque: Uint8Array): void;
|
|
725
|
+
onSendIceCandidates(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, candidates: Array<Uint8Array>): void;
|
|
726
726
|
onSendHangup(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean, HangupType: HangupType, hangupDeviceId: DeviceId | null): void;
|
|
727
727
|
onSendBusy(remoteUserId: UserId, remoteDeviceId: DeviceId, callId: CallId, broadcast: boolean): void;
|
|
728
|
-
sendCallMessage(recipientUuid:
|
|
729
|
-
sendCallMessageToGroup(groupId: GroupId, message:
|
|
728
|
+
sendCallMessage(recipientUuid: Uint8Array, message: Uint8Array, urgency: CallMessageUrgency): void;
|
|
729
|
+
sendCallMessageToGroup(groupId: GroupId, message: Uint8Array, urgency: CallMessageUrgency, overrideRecipients: Array<Uint8Array>): void;
|
|
730
730
|
sendHttpRequest(requestId: number, url: string, method: HttpMethod, headers: {
|
|
731
731
|
[name: string]: string;
|
|
732
|
-
}, body:
|
|
732
|
+
}, body: Uint8Array | undefined): void;
|
|
733
733
|
requestMembershipProof(clientId: GroupCallClientId): void;
|
|
734
734
|
requestGroupMembers(clientId: GroupCallClientId): void;
|
|
735
735
|
handleConnectionStateChanged(clientId: GroupCallClientId, connectionState: ConnectionState): void;
|
package/dist/ringrtc/Service.js
CHANGED
|
@@ -1028,7 +1028,7 @@ class RingRTCType {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
if (message.offer?.callId) {
|
|
1030
1030
|
const callId = message.offer.callId;
|
|
1031
|
-
const opaque =
|
|
1031
|
+
const opaque = toUint8Array(message.offer.opaque);
|
|
1032
1032
|
// opaque is required. sdp is obsolete, but it might still come with opaque.
|
|
1033
1033
|
if (!opaque) {
|
|
1034
1034
|
// TODO: Remove once the proto is updated to only support opaque and require it.
|
|
@@ -1043,7 +1043,7 @@ class RingRTCType {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
if (message.answer?.callId) {
|
|
1045
1045
|
const callId = message.answer.callId;
|
|
1046
|
-
const opaque =
|
|
1046
|
+
const opaque = toUint8Array(message.answer.opaque);
|
|
1047
1047
|
// opaque is required. sdp is obsolete, but it might still come with opaque.
|
|
1048
1048
|
if (!opaque) {
|
|
1049
1049
|
// TODO: Remove once the proto is updated to only support opaque and require it.
|
|
@@ -1058,7 +1058,7 @@ class RingRTCType {
|
|
|
1058
1058
|
// We have to copy them to do the .toArrayBuffer() thing.
|
|
1059
1059
|
const candidates = [];
|
|
1060
1060
|
for (const candidate of message.iceCandidates) {
|
|
1061
|
-
const copy =
|
|
1061
|
+
const copy = toUint8Array(candidate.opaque);
|
|
1062
1062
|
if (copy) {
|
|
1063
1063
|
candidates.push(copy);
|
|
1064
1064
|
}
|
|
@@ -1093,7 +1093,7 @@ class RingRTCType {
|
|
|
1093
1093
|
this.logError('handleCallingMessage(): opaque message received without UUID!');
|
|
1094
1094
|
return;
|
|
1095
1095
|
}
|
|
1096
|
-
const data =
|
|
1096
|
+
const data = toUint8Array(message.opaque.data);
|
|
1097
1097
|
if (data == undefined) {
|
|
1098
1098
|
this.logError('handleCallingMessage(): opaque message received without data!');
|
|
1099
1099
|
return;
|
|
@@ -1741,14 +1741,14 @@ class GroupCallVideoFrameSource {
|
|
|
1741
1741
|
return frame;
|
|
1742
1742
|
}
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function toUint8Array(pbab) {
|
|
1745
1745
|
if (!pbab) {
|
|
1746
1746
|
return pbab;
|
|
1747
1747
|
}
|
|
1748
|
-
if (pbab instanceof
|
|
1748
|
+
if (pbab instanceof Uint8Array) {
|
|
1749
1749
|
return pbab;
|
|
1750
1750
|
}
|
|
1751
|
-
return
|
|
1751
|
+
return new Uint8Array(pbab.toArrayBuffer());
|
|
1752
1752
|
}
|
|
1753
1753
|
class CallingMessage {
|
|
1754
1754
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalapp/ringrtc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.57.0",
|
|
4
4
|
"description": "Signal Messenger voice and video calling library.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
"dist/acknowledgments.md",
|
|
13
13
|
"scripts/fetch-prebuild.js"
|
|
14
14
|
],
|
|
15
|
+
"bin": {
|
|
16
|
+
"virtual_audio": "dist/bin/virtual_audio.sh"
|
|
17
|
+
},
|
|
15
18
|
"scripts": {
|
|
16
|
-
"build": "tsc",
|
|
19
|
+
"build": "tsc && bash scripts/build-help.sh",
|
|
17
20
|
"clean": "rimraf dist",
|
|
18
21
|
"test": "electron-mocha --renderer --recursive dist/test --timeout 10000 --require source-map-support/register",
|
|
19
22
|
"eslint": "eslint .",
|
|
@@ -25,7 +28,7 @@
|
|
|
25
28
|
},
|
|
26
29
|
"config": {
|
|
27
30
|
"prebuildUrl": "https://build-artifacts.signal.org/libraries/ringrtc-desktop-build-v${npm_package_version}.tar.gz",
|
|
28
|
-
"prebuildChecksum": "
|
|
31
|
+
"prebuildChecksum": "ef9241775fe21e9fbe8bbdb90b0e891b3764a26c57fdf4615db66a55d31c8619"
|
|
29
32
|
},
|
|
30
33
|
"author": "",
|
|
31
34
|
"license": "AGPL-3.0-only",
|