@signalapp/ringrtc 2.37.1 → 2.39.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.
@@ -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.37.1
672
+ ## libsignal-core 0.1.0, partial-default-derive 0.1.0, regex-aot 0.1.0, ringrtc 2.39.0
673
673
 
674
674
  ```
675
675
  GNU AFFERO GENERAL PUBLIC LICENSE
@@ -1434,7 +1434,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1434
1434
 
1435
1435
  ```
1436
1436
 
1437
- ## libloading 0.6.7
1437
+ ## libloading 0.8.1
1438
1438
 
1439
1439
  ```
1440
1440
  Copyright © 2015, Simonas Kazlauskas
@@ -1631,7 +1631,7 @@ DEALINGS IN THE SOFTWARE.
1631
1631
 
1632
1632
  ```
1633
1633
 
1634
- ## bitflags 2.4.1, log 0.4.20, regex 1.10.2, regex-automata 0.4.3, regex-syntax 0.8.2, semver 0.9.0
1634
+ ## bitflags 2.4.1, log 0.4.20, regex 1.10.2, regex-automata 0.4.3, regex-syntax 0.8.2
1635
1635
 
1636
1636
  ```
1637
1637
  Copyright (c) 2014 The Rust Project Developers
@@ -1756,7 +1756,7 @@ DEALINGS IN THE SOFTWARE.
1756
1756
 
1757
1757
  ```
1758
1758
 
1759
- ## neon 0.10.1, neon-build 0.10.1, neon-macros 0.10.1, neon-runtime 0.10.1
1759
+ ## neon-macros 1.0.0
1760
1760
 
1761
1761
  ```
1762
1762
  Copyright (c) 2015 David Herman
@@ -2051,37 +2051,6 @@ DEALINGS IN THE SOFTWARE.
2051
2051
 
2052
2052
  ```
2053
2053
 
2054
- ## semver-parser 0.7.0
2055
-
2056
- ```
2057
- Copyright (c) 2016 Steve Klabnik
2058
-
2059
- Permission is hereby granted, free of charge, to any
2060
- person obtaining a copy of this software and associated
2061
- documentation files (the "Software"), to deal in the
2062
- Software without restriction, including without
2063
- limitation the rights to use, copy, modify, merge,
2064
- publish, distribute, sublicense, and/or sell copies of
2065
- the Software, and to permit persons to whom the Software
2066
- is furnished to do so, subject to the following
2067
- conditions:
2068
-
2069
- The above copyright notice and this permission notice
2070
- shall be included in all copies or substantial portions
2071
- of the Software.
2072
-
2073
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
2074
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
2075
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
2076
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
2077
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
2078
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2079
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
2080
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2081
- DEALINGS IN THE SOFTWARE.
2082
-
2083
- ```
2084
-
2085
2054
  ## rustc_version 0.4.0
2086
2055
 
2087
2056
  ```
@@ -3109,7 +3078,7 @@ SOFTWARE.
3109
3078
 
3110
3079
  ```
3111
3080
 
3112
- ## curve25519-dalek-derive 0.1.0
3081
+ ## curve25519-dalek-derive 0.1.0, neon 1.0.0
3113
3082
 
3114
3083
  ```
3115
3084
  MIT License
@@ -3149,7 +3118,7 @@ SOFTWARE.
3149
3118
 
3150
3119
  ```
3151
3120
 
3152
- ## anyhow 1.0.75, fastrand 2.0.1, home 0.5.5, itoa 1.0.10, linux-raw-sys 0.4.12, num_enum 0.6.1, num_enum 0.7.1, num_enum_derive 0.6.1, num_enum_derive 0.7.1, once_cell 1.19.0, pin-project-lite 0.2.13, prettyplease 0.2.15, proc-macro-crate 1.3.1, proc-macro-crate 2.0.1, proc-macro2 1.0.70, quote 1.0.33, rustix 0.38.28, semver 1.0.20, serde 1.0.193, serde_derive 1.0.193, serde_json 1.0.108, syn 1.0.109, syn 2.0.41, syn-mid 0.5.4, thiserror 1.0.50, thiserror-impl 1.0.50, unicode-ident 1.0.12
3121
+ ## anyhow 1.0.75, fastrand 2.0.1, home 0.5.5, itoa 1.0.10, linux-raw-sys 0.4.12, num_enum 0.6.1, num_enum 0.7.1, num_enum_derive 0.6.1, num_enum_derive 0.7.1, once_cell 1.19.0, pin-project-lite 0.2.13, prettyplease 0.2.15, proc-macro-crate 1.3.1, proc-macro-crate 2.0.1, proc-macro2 1.0.70, quote 1.0.33, rustix 0.38.28, semver 1.0.20, send_wrapper 0.6.0, serde 1.0.193, serde_derive 1.0.193, serde_json 1.0.108, syn 1.0.109, syn 2.0.41, syn-mid 0.6.0, thiserror 1.0.50, thiserror-impl 1.0.50, unicode-ident 1.0.12
3153
3122
 
3154
3123
  ```
3155
3124
  Permission is hereby granted, free of charge, to any
@@ -55,6 +55,7 @@ export declare class ReceivedAudioLevel {
55
55
  level: RawAudioLevel;
56
56
  constructor(demuxId: number, level: RawAudioLevel);
57
57
  }
58
+ export type EmptyObj = Record<PropertyKey, never>;
58
59
  export type HttpResult<T> = {
59
60
  success: true;
60
61
  value: T;
@@ -68,6 +69,7 @@ export declare class RingRTCType {
68
69
  private _groupCallByClientId;
69
70
  private _peekRequests;
70
71
  private _callLinkRequests;
72
+ private _emptyRequests;
71
73
  private _callInfoByCallId;
72
74
  private getCallInfoKey;
73
75
  handleOutgoingSignaling: ((remoteUserId: UserId, message: CallingMessage) => Promise<boolean>) | null;
@@ -184,11 +186,11 @@ export declare class RingRTCType {
184
186
  */
185
187
  updateCallLinkRestrictions(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, adminPasskey: Buffer, restrictions: Exclude<CallLinkRestrictions, CallLinkRestrictions.Unknown>): Promise<HttpResult<CallLinkState>>;
186
188
  /**
187
- * Asynchronous request to revoke or un-revoke a call link.
189
+ * Asynchronous request to delete a call link.
188
190
  *
189
191
  * Possible failure codes include:
190
- * - 401: the room does not exist (and this is the wrong API to create a new room)
191
192
  * - 403: the admin passkey is incorrect
193
+ * - 409: conflict - there is an ongoing call for this room.
192
194
  *
193
195
  * This request is idempotent; if it fails due to a network issue, it is safe to retry.
194
196
  *
@@ -196,9 +198,8 @@ export declare class RingRTCType {
196
198
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
197
199
  * @param linkRootKey - the root key for the call link
198
200
  * @param adminPasskey - the passkey specified when the link was created
199
- * @param revoked - whether the link should now be revoked
200
201
  */
201
- updateCallLinkRevocation(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, adminPasskey: Buffer, revoked: boolean): Promise<HttpResult<CallLinkState>>;
202
+ deleteCallLink(sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: CallLinkRootKey, adminPasskey: Buffer): Promise<HttpResult<undefined>>;
202
203
  receivedHttpResponse(requestId: number, status: number, body: Buffer): void;
203
204
  httpRequestFailed(requestId: number, debugInfo: string | undefined): void;
204
205
  getGroupCall(groupId: Buffer, sfuUrl: string, hkdfExtraInfo: Buffer, audioLevelsIntervalMillis: number | undefined, observer: GroupCallObserver): GroupCall | undefined;
@@ -223,8 +224,9 @@ export declare class RingRTCType {
223
224
  revoked: boolean;
224
225
  expiration: Date;
225
226
  } | undefined): void;
227
+ handleEmptyResponse(requestId: number, statusCode: number, state: EmptyObj | undefined): void;
226
228
  handleEnded(clientId: GroupCallClientId, reason: GroupCallEndReason): void;
227
- groupCallRingUpdate(groupId: GroupId, ringIdString: string, sender: GroupCallUserId, state: RingUpdate): void;
229
+ groupCallRingUpdate(groupId: GroupId, ringId: bigint, sender: GroupCallUserId, state: RingUpdate): void;
228
230
  onLogMessage(level: number, fileName: string, line: number, message: string): void;
229
231
  logError(message: string): void;
230
232
  logWarn(message: string): void;
@@ -252,7 +254,7 @@ export declare class RingRTCType {
252
254
  setAudioOutput(index: number): void;
253
255
  }
254
256
  export interface CallSettings {
255
- iceServer: IceServer;
257
+ iceServers: Array<IceServer>;
256
258
  hideIp: boolean;
257
259
  dataMode: DataMode;
258
260
  audioLevelsIntervalMillis?: number;
@@ -260,6 +262,7 @@ export interface CallSettings {
260
262
  interface IceServer {
261
263
  username?: string;
262
264
  password?: string;
265
+ /** Provide hostname when urls contain IP addresses instead of hostname */
263
266
  hostname?: string;
264
267
  urls: Array<string>;
265
268
  }
@@ -573,7 +576,7 @@ export interface CallManager {
573
576
  setConfig(config: Config): void;
574
577
  setSelfUuid(uuid: Buffer): void;
575
578
  createOutgoingCall(remoteUserId: UserId, isVideoCall: boolean, localDeviceId: DeviceId): CallId;
576
- proceed(callId: CallId, iceServerUsername: string, iceServerPassword: string, iceServerHostname: string, iceServerUrls: Array<string>, hideIp: boolean, dataMode: DataMode, audioLevelsIntervalMillis: number): void;
579
+ proceed(callId: CallId, iceServers: Array<IceServer>, hideIp: boolean, dataMode: DataMode, audioLevelsIntervalMillis: number): void;
577
580
  accept(callId: CallId): void;
578
581
  ignore(callId: CallId): void;
579
582
  hangup(): void;
@@ -621,6 +624,7 @@ export interface CallManager {
621
624
  readCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer): void;
622
625
  createCallLink(requestId: number, sfuUrl: string, createCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer, callLinkPublicParams: Buffer): void;
623
626
  updateCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer, newName: string | undefined, newRestrictions: number | undefined, newRevoked: boolean | undefined): void;
627
+ deleteCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer): void;
624
628
  peekGroupCall(requestId: number, sfu_url: string, membership_proof: Buffer, group_members: Array<GroupMemberInfo>): void;
625
629
  peekCallLinkCall(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer): void;
626
630
  getAudioInputs(): Array<AudioDevice>;
@@ -33,6 +33,7 @@ class NativeCallManager {
33
33
  const fieldTrials = Object.assign({
34
34
  'RingRTC-AnyAddressPortsKillSwitch': 'Enabled',
35
35
  'WebRTC-Audio-OpusSetSignalVoiceWithDtx': 'Enabled',
36
+ 'RingRTC-PruneTurnPorts': 'Enabled',
36
37
  }, config.field_trials);
37
38
  /* eslint-disable prefer-template */
38
39
  const fieldTrialsString = Object.entries(fieldTrials)
@@ -127,6 +128,7 @@ NativeCallManager.prototype.setMembershipProof =
127
128
  NativeCallManager.prototype.readCallLink = Native_1.default.cm_readCallLink;
128
129
  NativeCallManager.prototype.createCallLink = Native_1.default.cm_createCallLink;
129
130
  NativeCallManager.prototype.updateCallLink = Native_1.default.cm_updateCallLink;
131
+ NativeCallManager.prototype.deleteCallLink = Native_1.default.cm_deleteCallLink;
130
132
  NativeCallManager.prototype.peekGroupCall = Native_1.default.cm_peekGroupCall;
131
133
  NativeCallManager.prototype.peekCallLinkCall =
132
134
  Native_1.default.cm_peekCallLinkCall;
@@ -236,6 +238,7 @@ class RingRTCType {
236
238
  this._groupCallByClientId = new Map();
237
239
  this._peekRequests = new Requests();
238
240
  this._callLinkRequests = new Requests();
241
+ this._emptyRequests = new Requests();
239
242
  this._callInfoByCallId = new Map();
240
243
  }
241
244
  setConfig(config) {
@@ -341,7 +344,7 @@ class RingRTCType {
341
344
  }
342
345
  proceed(callId, settings) {
343
346
  sillyDeadlockProtection(() => {
344
- this.callManager.proceed(callId, settings.iceServer.username || '', settings.iceServer.password || '', settings.iceServer.hostname || '', settings.iceServer.urls, settings.hideIp, settings.dataMode, settings.audioLevelsIntervalMillis || 0);
347
+ this.callManager.proceed(callId, settings.iceServers, settings.hideIp, settings.dataMode, settings.audioLevelsIntervalMillis || 0);
345
348
  });
346
349
  }
347
350
  // Called by Rust
@@ -623,11 +626,11 @@ class RingRTCType {
623
626
  return promise;
624
627
  }
625
628
  /**
626
- * Asynchronous request to revoke or un-revoke a call link.
629
+ * Asynchronous request to delete a call link.
627
630
  *
628
631
  * Possible failure codes include:
629
- * - 401: the room does not exist (and this is the wrong API to create a new room)
630
632
  * - 403: the admin passkey is incorrect
633
+ * - 409: conflict - there is an ongoing call for this room.
631
634
  *
632
635
  * This request is idempotent; if it fails due to a network issue, it is safe to retry.
633
636
  *
@@ -635,13 +638,12 @@ class RingRTCType {
635
638
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
636
639
  * @param linkRootKey - the root key for the call link
637
640
  * @param adminPasskey - the passkey specified when the link was created
638
- * @param revoked - whether the link should now be revoked
639
641
  */
640
- updateCallLinkRevocation(sfuUrl, authCredentialPresentation, linkRootKey, adminPasskey, revoked) {
641
- const [requestId, promise] = this._callLinkRequests.add();
642
+ deleteCallLink(sfuUrl, authCredentialPresentation, linkRootKey, adminPasskey) {
643
+ const [requestId, promise] = this._emptyRequests.add();
642
644
  // Response comes back via handleCallLinkResponse
643
645
  sillyDeadlockProtection(() => {
644
- this.callManager.updateCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, adminPasskey, undefined, undefined, revoked);
646
+ this.callManager.deleteCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, adminPasskey);
645
647
  });
646
648
  return promise;
647
649
  }
@@ -875,6 +877,21 @@ class RingRTCType {
875
877
  });
876
878
  }
877
879
  // Called by Rust
880
+ handleEmptyResponse(requestId, statusCode, state) {
881
+ sillyDeadlockProtection(() => {
882
+ let result;
883
+ if (state !== undefined) {
884
+ result = { success: true, value: undefined };
885
+ }
886
+ else {
887
+ result = { success: false, errorStatusCode: statusCode };
888
+ }
889
+ if (!this._emptyRequests.resolve(requestId, result)) {
890
+ this.logWarn(`Invalid request ID for handleEmptyResponse: ${requestId}`);
891
+ }
892
+ });
893
+ }
894
+ // Called by Rust
878
895
  handleEnded(clientId, reason) {
879
896
  sillyDeadlockProtection(() => {
880
897
  const groupCall = this._groupCallByClientId.get(clientId);
@@ -887,10 +904,9 @@ class RingRTCType {
887
904
  });
888
905
  }
889
906
  // Called by Rust
890
- groupCallRingUpdate(groupId, ringIdString, sender, state) {
907
+ groupCallRingUpdate(groupId, ringId, sender, state) {
891
908
  sillyDeadlockProtection(() => {
892
909
  if (this.handleGroupCallRingUpdate) {
893
- const ringId = BigInt(ringIdString);
894
910
  this.handleGroupCallRingUpdate(groupId, ringId, sender, state);
895
911
  }
896
912
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/ringrtc",
3
- "version": "2.37.1",
3
+ "version": "2.39.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,7 +25,7 @@
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": "1989bca57d789e1ba65c7e7a4d0900bdfd8e3f8b01ff9d6d438ac3417d11d8f8"
28
+ "prebuildChecksum": "eb7753b7467765a606771d0531b5a3aaefb8c24bab849da2b3c78b21f420bb8d"
29
29
  },
30
30
  "author": "",
31
31
  "license": "AGPL-3.0-only",