@signalapp/ringrtc 2.25.0 → 2.25.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.
@@ -4,8 +4,8 @@ declare class Config {
4
4
  use_new_audio_device_module: boolean;
5
5
  field_trials: Record<string, string> | undefined;
6
6
  }
7
- declare type GroupId = Buffer;
8
- declare type GroupCallUserId = Buffer;
7
+ type GroupId = Buffer;
8
+ type GroupCallUserId = Buffer;
9
9
  export declare class PeekDeviceInfo {
10
10
  demuxId: number;
11
11
  userId?: GroupCallUserId;
@@ -36,8 +36,8 @@ export declare class NetworkRoute {
36
36
  localAdapterType: NetworkAdapterType;
37
37
  constructor();
38
38
  }
39
- export declare type RawAudioLevel = number;
40
- export declare type NormalizedAudioLevel = number;
39
+ export type RawAudioLevel = number;
40
+ export type NormalizedAudioLevel = number;
41
41
  export declare class ReceivedAudioLevel {
42
42
  demuxId: number;
43
43
  level: RawAudioLevel;
@@ -200,7 +200,7 @@ export declare class Call {
200
200
  updateBandwidthMode(bandwidthMode: BandwidthMode): void;
201
201
  private enableOrDisableRenderer;
202
202
  }
203
- export declare type GroupCallClientId = number;
203
+ export type GroupCallClientId = number;
204
204
  export declare enum ConnectionState {
205
205
  NotConnected = 0,
206
206
  Connecting = 1,
@@ -342,12 +342,12 @@ declare class GroupCallVideoFrameSource {
342
342
  constructor(callManager: CallManager, groupCall: GroupCall, remoteDemuxId: number);
343
343
  receiveVideoFrame(buffer: Buffer, maxWidth: number, maxHeight: number): [number, number] | undefined;
344
344
  }
345
- declare type ProtobufBuffer = Buffer | {
345
+ type ProtobufBuffer = Buffer | {
346
346
  toArrayBuffer: () => ArrayBuffer;
347
347
  };
348
- export declare type UserId = string;
349
- export declare type DeviceId = number;
350
- export declare type CallId = any;
348
+ export type UserId = string;
349
+ export type DeviceId = number;
350
+ export type CallId = any;
351
351
  export declare class CallingMessage {
352
352
  offer?: OfferMessage;
353
353
  answer?: AnswerMessage;
@@ -5,7 +5,11 @@
5
5
  //
6
6
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
7
  if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
9
13
  }) : (function(o, m, k, k2) {
10
14
  if (k2 === undefined) k2 = k;
11
15
  o[k2] = m[k];
@@ -64,6 +68,11 @@ class NativeCallManager {
64
68
  configurable: true,
65
69
  get() {
66
70
  const callEndpoint = Native.createCallEndpoint(this, config.use_new_audio_device_module, fieldTrialsString);
71
+ if (process.platform === 'darwin') {
72
+ // Preload devices to work around
73
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1287628
74
+ window.navigator.mediaDevices.enumerateDevices();
75
+ }
67
76
  Object.defineProperty(this, Native.callEndpointPropertyKey, {
68
77
  configurable: true,
69
78
  value: callEndpoint,
@@ -231,6 +240,10 @@ class CallInfo {
231
240
  }
232
241
  }
233
242
  class RingRTCType {
243
+ getCallInfoKey(callId) {
244
+ // CallId is u64 so use a string key instead.
245
+ return callId.high.toString() + callId.low.toString();
246
+ }
234
247
  constructor() {
235
248
  // Set by UX
236
249
  this.handleOutgoingSignaling = null;
@@ -248,10 +261,6 @@ class RingRTCType {
248
261
  this._peekRequests = new Requests();
249
262
  this._callInfoByCallId = new Map();
250
263
  }
251
- getCallInfoKey(callId) {
252
- // CallId is u64 so use a string key instead.
253
- return callId.high.toString() + callId.low.toString();
254
- }
255
264
  setConfig(config) {
256
265
  this.callManager.setConfig(config);
257
266
  }
@@ -1227,6 +1236,9 @@ class VideoRequest {
1227
1236
  }
1228
1237
  exports.VideoRequest = VideoRequest;
1229
1238
  class GroupCall {
1239
+ get clientId() {
1240
+ return this._clientId;
1241
+ }
1230
1242
  // Called by UI via RingRTC object
1231
1243
  constructor(callManager, groupId, sfuUrl, hkdfExtraInfo, audioLevelsIntervalMillis, observer) {
1232
1244
  this._callManager = callManager;
@@ -1234,9 +1246,6 @@ class GroupCall {
1234
1246
  this._localDeviceState = new LocalDeviceState();
1235
1247
  this._clientId = this._callManager.createGroupCallClient(groupId, sfuUrl, hkdfExtraInfo, audioLevelsIntervalMillis || 0);
1236
1248
  }
1237
- get clientId() {
1238
- return this._clientId;
1239
- }
1240
1249
  // Called by UI
1241
1250
  connect() {
1242
1251
  this._callManager.connect(this._clientId);
@@ -23,6 +23,12 @@ const long_1 = __importDefault(require("long"));
23
23
  const Utils_1 = require("./Utils");
24
24
  // This class mimics the Desktop Client CallingClass in ts/services/calling.ts to facilitate testing
25
25
  class CallingClass {
26
+ set delayIncomingCallSettingsRequest(value) {
27
+ this._delayIncomingCallSettingsRequest = value;
28
+ }
29
+ set delayOutgoingCallSettingsRequest(value) {
30
+ this._delayIncomingCallSettingsRequest = value;
31
+ }
26
32
  constructor(name, id) {
27
33
  this._name = name;
28
34
  this._id = id;
@@ -30,12 +36,6 @@ class CallingClass {
30
36
  this._delayIncomingCallSettingsRequest = 0;
31
37
  this._delayOutgoingCallSettingsRequest = 0;
32
38
  }
33
- set delayIncomingCallSettingsRequest(value) {
34
- this._delayIncomingCallSettingsRequest = value;
35
- }
36
- set delayOutgoingCallSettingsRequest(value) {
37
- this._delayIncomingCallSettingsRequest = value;
38
- }
39
39
  setupCallCallbacks(call) {
40
40
  // eslint-disable-next-line no-param-reassign
41
41
  call.handleStateChanged = () => __awaiter(this, void 0, void 0, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/ringrtc",
3
- "version": "2.25.0",
3
+ "version": "2.25.1",
4
4
  "description": "Signal Messenger voice and video calling library.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "scripts": {
12
12
  "build": "tsc",
13
13
  "clean": "rimraf dist",
14
- "test": "electron-mocha --recursive dist/test --timeout 10000",
14
+ "test": "electron-mocha --renderer --recursive dist/test --timeout 10000",
15
15
  "eslint": "eslint --cache .",
16
16
  "lint": "yarn format --list-different && yarn eslint",
17
17
  "format": "prettier --write \"*.{css,js,json,md,scss,ts,tsx}\" \"./**/*.{css,js,json,md,scss,ts,tsx}\"",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "config": {
22
22
  "prebuildUrl": "https://build-artifacts.signal.org/libraries/ringrtc-desktop-build-v${npm_package_version}.tar.gz",
23
- "prebuildChecksum": "99767cde606a663ef881deaa1d3dec8976e2c52981d808c5c95397e773810f22"
23
+ "prebuildChecksum": "eea4b238619ac1c259b703d7c66a57b6436ea63496fff03a0dd407b410507700"
24
24
  },
25
25
  "author": "",
26
26
  "license": "AGPL-3.0-only",
@@ -28,33 +28,33 @@
28
28
  "tar": "^6.1.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@types/chai": "4.2.18",
32
- "@types/chai-as-promised": "^7.1.3",
33
- "@types/dom-mediacapture-transform": "0.1.2",
34
- "@types/long": "4.0.1",
35
- "@types/mocha": "5.2.7",
36
- "@types/node": "14.14.37",
37
- "@types/offscreencanvas": "^2019.6.4",
38
- "@types/react": "16.8.5",
31
+ "@types/chai": "4.3.4",
32
+ "@types/chai-as-promised": "^7.1.5",
33
+ "@types/dom-mediacapture-transform": "0.1.4",
34
+ "@types/long": "5.0.0",
35
+ "@types/mocha": "10.0.1",
36
+ "@types/node": "18.14.0",
37
+ "@types/offscreencanvas": "^2019.7.0",
38
+ "@types/react": "18.0.28",
39
39
  "@types/sinon-chai": "^3.2.9",
40
- "chai": "4.3.5",
40
+ "chai": "4.3.7",
41
41
  "chai-as-promised": "^7.1.1",
42
- "electron": "15.3.2",
42
+ "electron": "22.2.0",
43
43
  "electron-mocha": "11.0.2",
44
- "eslint": "7.32.0",
45
- "eslint-config-airbnb-typescript-prettier": "4.2.0",
46
- "eslint-config-prettier": "6.15.0",
47
- "eslint-plugin-import": "2.25.4",
48
- "eslint-plugin-mocha": "9.0.0",
44
+ "eslint": "8.34.0",
45
+ "eslint-config-airbnb-typescript-prettier": "5.0.0",
46
+ "eslint-config-prettier": "8.6.0",
47
+ "eslint-plugin-import": "2.27.5",
48
+ "eslint-plugin-mocha": "10.1.0",
49
49
  "eslint-plugin-more": "1.0.5",
50
- "eslint-plugin-react": "7.28.0",
51
- "long": "4.0.0",
52
- "mocha": "9.2.0",
53
- "prettier": "^2.5.1",
54
- "rimraf": "3.0.2",
50
+ "eslint-plugin-react": "7.32.2",
51
+ "long": "5.2.1",
52
+ "mocha": "10.2.0",
53
+ "prettier": "^2.8.4",
54
+ "rimraf": "4.1.2",
55
55
  "sinon": "^15.0.1",
56
56
  "sinon-chai": "^3.7.0",
57
- "typescript": "4.5.2",
58
- "yarn-audit-fix": "^9.2.2"
57
+ "typescript": "4.9.3",
58
+ "yarn-audit-fix": "^9.3.9"
59
59
  }
60
60
  }