@signalapp/ringrtc 2.38.0 → 2.39.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.
@@ -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.38.0
672
+ ## libsignal-core 0.1.0, partial-default-derive 0.1.0, regex-aot 0.1.0, ringrtc 2.39.1
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;
@@ -622,6 +624,7 @@ export interface CallManager {
622
624
  readCallLink(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer): void;
623
625
  createCallLink(requestId: number, sfuUrl: string, createCredentialPresentation: Buffer, linkRootKey: Buffer, adminPasskey: Buffer, callLinkPublicParams: Buffer): void;
624
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;
625
628
  peekGroupCall(requestId: number, sfu_url: string, membership_proof: Buffer, group_members: Array<GroupMemberInfo>): void;
626
629
  peekCallLinkCall(requestId: number, sfuUrl: string, authCredentialPresentation: Buffer, linkRootKey: Buffer): void;
627
630
  getAudioInputs(): Array<AudioDevice>;
@@ -34,6 +34,7 @@ class NativeCallManager {
34
34
  'RingRTC-AnyAddressPortsKillSwitch': 'Enabled',
35
35
  'WebRTC-Audio-OpusSetSignalVoiceWithDtx': 'Enabled',
36
36
  'RingRTC-PruneTurnPorts': 'Enabled',
37
+ 'WebRTC-Bwe-ProbingConfiguration': 'skip_if_est_larger_than_fraction_of_max:0.99',
37
38
  }, config.field_trials);
38
39
  /* eslint-disable prefer-template */
39
40
  const fieldTrialsString = Object.entries(fieldTrials)
@@ -128,6 +129,7 @@ NativeCallManager.prototype.setMembershipProof =
128
129
  NativeCallManager.prototype.readCallLink = Native_1.default.cm_readCallLink;
129
130
  NativeCallManager.prototype.createCallLink = Native_1.default.cm_createCallLink;
130
131
  NativeCallManager.prototype.updateCallLink = Native_1.default.cm_updateCallLink;
132
+ NativeCallManager.prototype.deleteCallLink = Native_1.default.cm_deleteCallLink;
131
133
  NativeCallManager.prototype.peekGroupCall = Native_1.default.cm_peekGroupCall;
132
134
  NativeCallManager.prototype.peekCallLinkCall =
133
135
  Native_1.default.cm_peekCallLinkCall;
@@ -237,6 +239,7 @@ class RingRTCType {
237
239
  this._groupCallByClientId = new Map();
238
240
  this._peekRequests = new Requests();
239
241
  this._callLinkRequests = new Requests();
242
+ this._emptyRequests = new Requests();
240
243
  this._callInfoByCallId = new Map();
241
244
  }
242
245
  setConfig(config) {
@@ -624,11 +627,11 @@ class RingRTCType {
624
627
  return promise;
625
628
  }
626
629
  /**
627
- * Asynchronous request to revoke or un-revoke a call link.
630
+ * Asynchronous request to delete a call link.
628
631
  *
629
632
  * Possible failure codes include:
630
- * - 401: the room does not exist (and this is the wrong API to create a new room)
631
633
  * - 403: the admin passkey is incorrect
634
+ * - 409: conflict - there is an ongoing call for this room.
632
635
  *
633
636
  * This request is idempotent; if it fails due to a network issue, it is safe to retry.
634
637
  *
@@ -636,13 +639,12 @@ class RingRTCType {
636
639
  * @param authCredentialPresentation - a serialized CallLinkAuthCredentialPresentation
637
640
  * @param linkRootKey - the root key for the call link
638
641
  * @param adminPasskey - the passkey specified when the link was created
639
- * @param revoked - whether the link should now be revoked
640
642
  */
641
- updateCallLinkRevocation(sfuUrl, authCredentialPresentation, linkRootKey, adminPasskey, revoked) {
642
- const [requestId, promise] = this._callLinkRequests.add();
643
+ deleteCallLink(sfuUrl, authCredentialPresentation, linkRootKey, adminPasskey) {
644
+ const [requestId, promise] = this._emptyRequests.add();
643
645
  // Response comes back via handleCallLinkResponse
644
646
  sillyDeadlockProtection(() => {
645
- this.callManager.updateCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, adminPasskey, undefined, undefined, revoked);
647
+ this.callManager.deleteCallLink(requestId, sfuUrl, authCredentialPresentation, linkRootKey.bytes, adminPasskey);
646
648
  });
647
649
  return promise;
648
650
  }
@@ -876,6 +878,21 @@ class RingRTCType {
876
878
  });
877
879
  }
878
880
  // Called by Rust
881
+ handleEmptyResponse(requestId, statusCode, state) {
882
+ sillyDeadlockProtection(() => {
883
+ let result;
884
+ if (state !== undefined) {
885
+ result = { success: true, value: undefined };
886
+ }
887
+ else {
888
+ result = { success: false, errorStatusCode: statusCode };
889
+ }
890
+ if (!this._emptyRequests.resolve(requestId, result)) {
891
+ this.logWarn(`Invalid request ID for handleEmptyResponse: ${requestId}`);
892
+ }
893
+ });
894
+ }
895
+ // Called by Rust
879
896
  handleEnded(clientId, reason) {
880
897
  sillyDeadlockProtection(() => {
881
898
  const groupCall = this._groupCallByClientId.get(clientId);
@@ -888,10 +905,9 @@ class RingRTCType {
888
905
  });
889
906
  }
890
907
  // Called by Rust
891
- groupCallRingUpdate(groupId, ringIdString, sender, state) {
908
+ groupCallRingUpdate(groupId, ringId, sender, state) {
892
909
  sillyDeadlockProtection(() => {
893
910
  if (this.handleGroupCallRingUpdate) {
894
- const ringId = BigInt(ringIdString);
895
911
  this.handleGroupCallRingUpdate(groupId, ringId, sender, state);
896
912
  }
897
913
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/ringrtc",
3
- "version": "2.38.0",
3
+ "version": "2.39.1",
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": "5168544dd09b8fc1d9981736ce5b066c1619f2de4220467e24b9a8cfbd19edc7"
28
+ "prebuildChecksum": "73a191ff31639b305dcdc86d3e1bb648123691cb6089a0a70889beb0175e0c5d"
29
29
  },
30
30
  "author": "",
31
31
  "license": "AGPL-3.0-only",