@signalapp/ringrtc 2.28.1 → 2.29.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.
- package/dist/ringrtc/Service.d.ts +23 -12
- package/dist/ringrtc/Service.js +35 -13
- package/dist/ringrtc/VideoSupport.js +8 -1
- package/package.json +2 -2
|
@@ -19,6 +19,7 @@ export interface PeekInfo {
|
|
|
19
19
|
eraId?: string;
|
|
20
20
|
maxDevices?: number;
|
|
21
21
|
deviceCount: number;
|
|
22
|
+
pendingUsers: Array<GroupCallUserId>;
|
|
22
23
|
}
|
|
23
24
|
export declare enum PeekStatusCodes {
|
|
24
25
|
EXPIRED_CALL_LINK = 703,
|
|
@@ -331,18 +332,20 @@ export declare enum JoinState {
|
|
|
331
332
|
export declare enum GroupCallEndReason {
|
|
332
333
|
DeviceExplicitlyDisconnected = 0,
|
|
333
334
|
ServerExplicitlyDisconnected = 1,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
335
|
+
DeniedRequestToJoinCall = 2,
|
|
336
|
+
RemovedFromCall = 3,
|
|
337
|
+
CallManagerIsBusy = 4,
|
|
338
|
+
SfuClientFailedToJoin = 5,
|
|
339
|
+
FailedToCreatePeerConnectionFactory = 6,
|
|
340
|
+
FailedToNegotiateSrtpKeys = 7,
|
|
341
|
+
FailedToCreatePeerConnection = 8,
|
|
342
|
+
FailedToStartPeerConnection = 9,
|
|
343
|
+
FailedToUpdatePeerConnection = 10,
|
|
344
|
+
FailedToSetMaxSendBitrate = 11,
|
|
345
|
+
IceFailedWhileConnecting = 12,
|
|
346
|
+
IceFailedAfterConnected = 13,
|
|
347
|
+
ServerChangedDemuxId = 14,
|
|
348
|
+
HasMaxDevices = 15
|
|
346
349
|
}
|
|
347
350
|
export declare enum CallMessageUrgency {
|
|
348
351
|
Droppable = 0,
|
|
@@ -442,6 +445,10 @@ export declare class GroupCall {
|
|
|
442
445
|
resendMediaKeys(): void;
|
|
443
446
|
setDataMode(dataMode: DataMode): void;
|
|
444
447
|
requestVideo(resolutions: Array<VideoRequest>, activeSpeakerHeight: number): void;
|
|
448
|
+
approveUser(otherUserId: Buffer): void;
|
|
449
|
+
denyUser(otherUserId: Buffer): void;
|
|
450
|
+
removeClient(otherClientDemuxId: number): void;
|
|
451
|
+
blockClient(otherClientDemuxId: number): void;
|
|
445
452
|
setGroupMembers(members: Array<GroupMemberInfo>): void;
|
|
446
453
|
setMembershipProof(proof: Buffer): void;
|
|
447
454
|
requestMembershipProof(): void;
|
|
@@ -573,6 +580,10 @@ export interface CallManager {
|
|
|
573
580
|
resendMediaKeys(clientId: GroupCallClientId): void;
|
|
574
581
|
setDataMode(clientId: GroupCallClientId, dataMode: DataMode): void;
|
|
575
582
|
requestVideo(clientId: GroupCallClientId, resolutions: Array<VideoRequest>, activeSpeakerHeight: number): void;
|
|
583
|
+
approveUser(clientId: GroupCallClientId, otherUserId: Buffer): void;
|
|
584
|
+
denyUser(clientId: GroupCallClientId, otherUserId: Buffer): void;
|
|
585
|
+
removeClient(clientId: GroupCallClientId, otherClientDemuxId: number): void;
|
|
586
|
+
blockClient(clientId: GroupCallClientId, otherClientDemuxId: number): void;
|
|
576
587
|
setGroupMembers(clientId: GroupCallClientId, members: Array<GroupMemberInfo>): void;
|
|
577
588
|
setMembershipProof(clientId: GroupCallClientId, proof: Buffer): void;
|
|
578
589
|
receiveGroupCallVideoFrame(clientId: GroupCallClientId, remoteDemuxId: number, buffer: Buffer, maxWidth: number, maxHeight: number): [number, number] | undefined;
|
package/dist/ringrtc/Service.js
CHANGED
|
@@ -156,6 +156,10 @@ NativeCallManager.prototype.resendMediaKeys =
|
|
|
156
156
|
Native_1.default.cm_resendMediaKeys;
|
|
157
157
|
NativeCallManager.prototype.setDataMode = Native_1.default.cm_setDataMode;
|
|
158
158
|
NativeCallManager.prototype.requestVideo = Native_1.default.cm_requestVideo;
|
|
159
|
+
NativeCallManager.prototype.approveUser = Native_1.default.cm_approveUser;
|
|
160
|
+
NativeCallManager.prototype.denyUser = Native_1.default.cm_denyUser;
|
|
161
|
+
NativeCallManager.prototype.removeClient = Native_1.default.cm_removeClient;
|
|
162
|
+
NativeCallManager.prototype.blockClient = Native_1.default.cm_blockClient;
|
|
159
163
|
NativeCallManager.prototype.setGroupMembers =
|
|
160
164
|
Native_1.default.cm_setGroupMembers;
|
|
161
165
|
NativeCallManager.prototype.setMembershipProof =
|
|
@@ -726,7 +730,7 @@ class RingRTCType {
|
|
|
726
730
|
return result.value;
|
|
727
731
|
}
|
|
728
732
|
else {
|
|
729
|
-
return { devices: [], deviceCount: 0 };
|
|
733
|
+
return { devices: [], deviceCount: 0, pendingUsers: [] };
|
|
730
734
|
}
|
|
731
735
|
});
|
|
732
736
|
}
|
|
@@ -1340,19 +1344,21 @@ var GroupCallEndReason;
|
|
|
1340
1344
|
// Normal events
|
|
1341
1345
|
GroupCallEndReason[GroupCallEndReason["DeviceExplicitlyDisconnected"] = 0] = "DeviceExplicitlyDisconnected";
|
|
1342
1346
|
GroupCallEndReason[GroupCallEndReason["ServerExplicitlyDisconnected"] = 1] = "ServerExplicitlyDisconnected";
|
|
1347
|
+
GroupCallEndReason[GroupCallEndReason["DeniedRequestToJoinCall"] = 2] = "DeniedRequestToJoinCall";
|
|
1348
|
+
GroupCallEndReason[GroupCallEndReason["RemovedFromCall"] = 3] = "RemovedFromCall";
|
|
1343
1349
|
// Things that can go wrong
|
|
1344
|
-
GroupCallEndReason[GroupCallEndReason["CallManagerIsBusy"] =
|
|
1345
|
-
GroupCallEndReason[GroupCallEndReason["SfuClientFailedToJoin"] =
|
|
1346
|
-
GroupCallEndReason[GroupCallEndReason["FailedToCreatePeerConnectionFactory"] =
|
|
1347
|
-
GroupCallEndReason[GroupCallEndReason["FailedToNegotiateSrtpKeys"] =
|
|
1348
|
-
GroupCallEndReason[GroupCallEndReason["FailedToCreatePeerConnection"] =
|
|
1349
|
-
GroupCallEndReason[GroupCallEndReason["FailedToStartPeerConnection"] =
|
|
1350
|
-
GroupCallEndReason[GroupCallEndReason["FailedToUpdatePeerConnection"] =
|
|
1351
|
-
GroupCallEndReason[GroupCallEndReason["FailedToSetMaxSendBitrate"] =
|
|
1352
|
-
GroupCallEndReason[GroupCallEndReason["IceFailedWhileConnecting"] =
|
|
1353
|
-
GroupCallEndReason[GroupCallEndReason["IceFailedAfterConnected"] =
|
|
1354
|
-
GroupCallEndReason[GroupCallEndReason["ServerChangedDemuxId"] =
|
|
1355
|
-
GroupCallEndReason[GroupCallEndReason["HasMaxDevices"] =
|
|
1350
|
+
GroupCallEndReason[GroupCallEndReason["CallManagerIsBusy"] = 4] = "CallManagerIsBusy";
|
|
1351
|
+
GroupCallEndReason[GroupCallEndReason["SfuClientFailedToJoin"] = 5] = "SfuClientFailedToJoin";
|
|
1352
|
+
GroupCallEndReason[GroupCallEndReason["FailedToCreatePeerConnectionFactory"] = 6] = "FailedToCreatePeerConnectionFactory";
|
|
1353
|
+
GroupCallEndReason[GroupCallEndReason["FailedToNegotiateSrtpKeys"] = 7] = "FailedToNegotiateSrtpKeys";
|
|
1354
|
+
GroupCallEndReason[GroupCallEndReason["FailedToCreatePeerConnection"] = 8] = "FailedToCreatePeerConnection";
|
|
1355
|
+
GroupCallEndReason[GroupCallEndReason["FailedToStartPeerConnection"] = 9] = "FailedToStartPeerConnection";
|
|
1356
|
+
GroupCallEndReason[GroupCallEndReason["FailedToUpdatePeerConnection"] = 10] = "FailedToUpdatePeerConnection";
|
|
1357
|
+
GroupCallEndReason[GroupCallEndReason["FailedToSetMaxSendBitrate"] = 11] = "FailedToSetMaxSendBitrate";
|
|
1358
|
+
GroupCallEndReason[GroupCallEndReason["IceFailedWhileConnecting"] = 12] = "IceFailedWhileConnecting";
|
|
1359
|
+
GroupCallEndReason[GroupCallEndReason["IceFailedAfterConnected"] = 13] = "IceFailedAfterConnected";
|
|
1360
|
+
GroupCallEndReason[GroupCallEndReason["ServerChangedDemuxId"] = 14] = "ServerChangedDemuxId";
|
|
1361
|
+
GroupCallEndReason[GroupCallEndReason["HasMaxDevices"] = 15] = "HasMaxDevices";
|
|
1356
1362
|
})(GroupCallEndReason = exports.GroupCallEndReason || (exports.GroupCallEndReason = {}));
|
|
1357
1363
|
var CallMessageUrgency;
|
|
1358
1364
|
(function (CallMessageUrgency) {
|
|
@@ -1518,6 +1524,22 @@ class GroupCall {
|
|
|
1518
1524
|
this._callManager.requestVideo(this._clientId, resolutions, activeSpeakerHeight);
|
|
1519
1525
|
}
|
|
1520
1526
|
// Called by UI
|
|
1527
|
+
approveUser(otherUserId) {
|
|
1528
|
+
this._callManager.approveUser(this._clientId, otherUserId);
|
|
1529
|
+
}
|
|
1530
|
+
// Called by UI
|
|
1531
|
+
denyUser(otherUserId) {
|
|
1532
|
+
this._callManager.denyUser(this._clientId, otherUserId);
|
|
1533
|
+
}
|
|
1534
|
+
// Called by UI
|
|
1535
|
+
removeClient(otherClientDemuxId) {
|
|
1536
|
+
this._callManager.removeClient(this._clientId, otherClientDemuxId);
|
|
1537
|
+
}
|
|
1538
|
+
// Called by UI
|
|
1539
|
+
blockClient(otherClientDemuxId) {
|
|
1540
|
+
this._callManager.blockClient(this._clientId, otherClientDemuxId);
|
|
1541
|
+
}
|
|
1542
|
+
// Called by UI
|
|
1521
1543
|
setGroupMembers(members) {
|
|
1522
1544
|
this._callManager.setGroupMembers(this._clientId, members);
|
|
1523
1545
|
}
|
|
@@ -130,12 +130,15 @@ class GumVideoCapturer {
|
|
|
130
130
|
deviceId: (_a = options.preferredDeviceId) !== null && _a !== void 0 ? _a : this.preferredDeviceId,
|
|
131
131
|
width: {
|
|
132
132
|
max: options.maxWidth,
|
|
133
|
+
ideal: options.maxWidth,
|
|
133
134
|
},
|
|
134
135
|
height: {
|
|
135
136
|
max: options.maxHeight,
|
|
137
|
+
ideal: options.maxHeight,
|
|
136
138
|
},
|
|
137
139
|
frameRate: {
|
|
138
140
|
max: options.maxFramerate,
|
|
141
|
+
ideal: options.maxFramerate,
|
|
139
142
|
},
|
|
140
143
|
},
|
|
141
144
|
};
|
|
@@ -271,11 +274,15 @@ class GumVideoCapturer {
|
|
|
271
274
|
index_1.RingRTC.logWarn(`Unsupported video frame format: ${frame.format}`);
|
|
272
275
|
break;
|
|
273
276
|
}
|
|
277
|
+
const visibleRect = frame.visibleRect;
|
|
278
|
+
if (!visibleRect) {
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
274
281
|
yield frame.copyTo(buffer);
|
|
275
282
|
if (sender !== this.sender) {
|
|
276
283
|
break;
|
|
277
284
|
}
|
|
278
|
-
sender.sendVideoFrame(
|
|
285
|
+
sender.sendVideoFrame(visibleRect.width, visibleRect.height, format, buffer);
|
|
279
286
|
}
|
|
280
287
|
catch (e) {
|
|
281
288
|
index_1.RingRTC.logError(`sendVideoFrame(): ${e}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalapp/ringrtc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.29.1",
|
|
4
4
|
"description": "Signal Messenger voice and video calling library.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"config": {
|
|
25
25
|
"prebuildUrl": "https://build-artifacts.signal.org/libraries/ringrtc-desktop-build-v${npm_package_version}.tar.gz",
|
|
26
|
-
"prebuildChecksum": "
|
|
26
|
+
"prebuildChecksum": "6f6d9cbbccb3e1e63cbf1c0d0ba81fe23ab80b116febc2595773bbdaf12930cc"
|
|
27
27
|
},
|
|
28
28
|
"author": "",
|
|
29
29
|
"license": "AGPL-3.0-only",
|