@signalapp/ringrtc 2.26.0 → 2.26.3

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { RingRTCType } from './ringrtc/Service';
2
- export { AudioDevice, BandwidthMode, Call, CallEndedReason, CallId, CallLogLevel, CallMessageUrgency, CallSettings, CallState, CallingMessage, ConnectionState, DeviceId, GroupCall, GroupCallEndReason, GroupCallObserver, GroupMemberInfo, HangupMessage, HangupType, HttpMethod, JoinState, LocalDeviceState, OfferType, OpaqueMessage, PeekInfo, RemoteDeviceState, RingCancelReason, RingRTCType, RingUpdate, UserId, VideoCapturer, VideoRenderer, VideoRequest, callIdFromEra, callIdFromRingId, } from './ringrtc/Service';
2
+ export { AnswerMessage, AudioDevice, BandwidthMode, BusyMessage, Call, CallEndedReason, CallId, CallLogLevel, CallMessageUrgency, CallSettings, CallState, CallingMessage, ConnectionState, DeviceId, GroupCall, GroupCallEndReason, GroupCallObserver, GroupMemberInfo, HangupMessage, HangupType, HttpMethod, IceCandidateMessage, JoinState, LocalDeviceState, OfferMessage, OfferType, OpaqueMessage, PeekInfo, RemoteDeviceState, RingCancelReason, RingRTCType, RingUpdate, UserId, VideoCapturer, VideoRenderer, VideoRequest, callIdFromEra, callIdFromRingId, } from './ringrtc/Service';
3
3
  export { CanvasVideoRenderer, GumVideoCapturer, VideoFrameSource, MAX_VIDEO_CAPTURE_AREA, MAX_VIDEO_CAPTURE_BUFFER_SIZE, MAX_VIDEO_CAPTURE_HEIGHT, MAX_VIDEO_CAPTURE_WIDTH, } from './ringrtc/VideoSupport';
4
4
  export declare const RingRTC: RingRTCType;
package/dist/index.js CHANGED
@@ -4,10 +4,12 @@
4
4
  // SPDX-License-Identifier: AGPL-3.0-only
5
5
  //
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.RingRTC = exports.MAX_VIDEO_CAPTURE_WIDTH = exports.MAX_VIDEO_CAPTURE_HEIGHT = exports.MAX_VIDEO_CAPTURE_BUFFER_SIZE = exports.MAX_VIDEO_CAPTURE_AREA = exports.GumVideoCapturer = exports.CanvasVideoRenderer = exports.callIdFromRingId = exports.callIdFromEra = exports.VideoRequest = exports.RingUpdate = exports.RingRTCType = exports.RingCancelReason = exports.RemoteDeviceState = exports.PeekInfo = exports.OpaqueMessage = exports.OfferType = exports.LocalDeviceState = exports.JoinState = exports.HttpMethod = exports.HangupType = exports.HangupMessage = exports.GroupMemberInfo = exports.GroupCallEndReason = exports.GroupCall = exports.ConnectionState = exports.CallingMessage = exports.CallState = exports.CallMessageUrgency = exports.CallLogLevel = exports.CallEndedReason = exports.Call = exports.BandwidthMode = void 0;
7
+ exports.RingRTC = exports.MAX_VIDEO_CAPTURE_WIDTH = exports.MAX_VIDEO_CAPTURE_HEIGHT = exports.MAX_VIDEO_CAPTURE_BUFFER_SIZE = exports.MAX_VIDEO_CAPTURE_AREA = exports.GumVideoCapturer = exports.CanvasVideoRenderer = exports.callIdFromRingId = exports.callIdFromEra = exports.VideoRequest = exports.RingUpdate = exports.RingRTCType = exports.RingCancelReason = exports.RemoteDeviceState = exports.PeekInfo = exports.OpaqueMessage = exports.OfferType = exports.OfferMessage = exports.LocalDeviceState = exports.JoinState = exports.IceCandidateMessage = exports.HttpMethod = exports.HangupType = exports.HangupMessage = exports.GroupMemberInfo = exports.GroupCallEndReason = exports.GroupCall = exports.ConnectionState = exports.CallingMessage = exports.CallState = exports.CallMessageUrgency = exports.CallLogLevel = exports.CallEndedReason = exports.Call = exports.BusyMessage = exports.BandwidthMode = exports.AnswerMessage = void 0;
8
8
  const Service_1 = require("./ringrtc/Service");
9
9
  var Service_2 = require("./ringrtc/Service");
10
+ Object.defineProperty(exports, "AnswerMessage", { enumerable: true, get: function () { return Service_2.AnswerMessage; } });
10
11
  Object.defineProperty(exports, "BandwidthMode", { enumerable: true, get: function () { return Service_2.BandwidthMode; } });
12
+ Object.defineProperty(exports, "BusyMessage", { enumerable: true, get: function () { return Service_2.BusyMessage; } });
11
13
  Object.defineProperty(exports, "Call", { enumerable: true, get: function () { return Service_2.Call; } });
12
14
  Object.defineProperty(exports, "CallEndedReason", { enumerable: true, get: function () { return Service_2.CallEndedReason; } });
13
15
  Object.defineProperty(exports, "CallLogLevel", { enumerable: true, get: function () { return Service_2.CallLogLevel; } });
@@ -21,8 +23,10 @@ Object.defineProperty(exports, "GroupMemberInfo", { enumerable: true, get: funct
21
23
  Object.defineProperty(exports, "HangupMessage", { enumerable: true, get: function () { return Service_2.HangupMessage; } });
22
24
  Object.defineProperty(exports, "HangupType", { enumerable: true, get: function () { return Service_2.HangupType; } });
23
25
  Object.defineProperty(exports, "HttpMethod", { enumerable: true, get: function () { return Service_2.HttpMethod; } });
26
+ Object.defineProperty(exports, "IceCandidateMessage", { enumerable: true, get: function () { return Service_2.IceCandidateMessage; } });
24
27
  Object.defineProperty(exports, "JoinState", { enumerable: true, get: function () { return Service_2.JoinState; } });
25
28
  Object.defineProperty(exports, "LocalDeviceState", { enumerable: true, get: function () { return Service_2.LocalDeviceState; } });
29
+ Object.defineProperty(exports, "OfferMessage", { enumerable: true, get: function () { return Service_2.OfferMessage; } });
26
30
  Object.defineProperty(exports, "OfferType", { enumerable: true, get: function () { return Service_2.OfferType; } });
27
31
  Object.defineProperty(exports, "OpaqueMessage", { enumerable: true, get: function () { return Service_2.OpaqueMessage; } });
28
32
  Object.defineProperty(exports, "PeekInfo", { enumerable: true, get: function () { return Service_2.PeekInfo; } });
@@ -366,34 +366,34 @@ export declare class CallingMessage {
366
366
  destinationDeviceId?: DeviceId;
367
367
  }
368
368
  export declare class OfferMessage {
369
- callId?: CallId;
370
- type?: OfferType;
371
- opaque?: ProtobufBuffer;
372
- sdp?: string;
369
+ callId: CallId;
370
+ type: OfferType;
371
+ opaque: ProtobufBuffer;
372
+ constructor(callId: CallId, type: OfferType, opaque: ProtobufBuffer);
373
373
  }
374
374
  export declare enum OfferType {
375
375
  AudioCall = 0,
376
376
  VideoCall = 1
377
377
  }
378
378
  export declare class AnswerMessage {
379
- callId?: CallId;
380
- opaque?: ProtobufBuffer;
381
- sdp?: string;
379
+ callId: CallId;
380
+ opaque: ProtobufBuffer;
381
+ constructor(callId: CallId, opaque: ProtobufBuffer);
382
382
  }
383
383
  export declare class IceCandidateMessage {
384
- callId?: CallId;
385
- mid?: string;
386
- line?: number;
387
- opaque?: ProtobufBuffer;
388
- sdp?: string;
384
+ callId: CallId;
385
+ opaque: ProtobufBuffer;
386
+ constructor(callId: CallId, opaque: ProtobufBuffer);
389
387
  }
390
388
  export declare class BusyMessage {
391
- callId?: CallId;
389
+ callId: CallId;
390
+ constructor(callId: CallId);
392
391
  }
393
392
  export declare class HangupMessage {
394
- callId?: CallId;
395
- type?: HangupType;
396
- deviceId?: DeviceId;
393
+ callId: CallId;
394
+ type: HangupType;
395
+ deviceId: DeviceId;
396
+ constructor(callId: CallId, type: HangupType, deviceId: DeviceId);
397
397
  }
398
398
  export declare class OpaqueMessage {
399
399
  data?: ProtobufBuffer;
@@ -65,8 +65,9 @@ class NativeCallManager {
65
65
  this.createCallEndpoint(config);
66
66
  }
67
67
  createCallEndpoint(config) {
68
+ const fieldTrials = Object.assign({ 'RingRTC-AnyAddressPortsKillSwitch': 'Enabled' }, config.field_trials);
68
69
  /* eslint-disable prefer-template */
69
- const fieldTrialsString = Object.entries(config.field_trials || {})
70
+ const fieldTrialsString = Object.entries(fieldTrials)
70
71
  .map(([k, v]) => `${k}/${v}`)
71
72
  .join('/') + '/';
72
73
  /* eslint-enable prefer-template */
@@ -488,18 +489,13 @@ class RingRTCType {
488
489
  // Called by Rust
489
490
  onSendOffer(remoteUserId, remoteDeviceId, callId, broadcast, offerType, opaque) {
490
491
  const message = new CallingMessage();
491
- message.offer = new OfferMessage();
492
- message.offer.callId = callId;
493
- message.offer.type = offerType;
494
- message.offer.opaque = opaque;
492
+ message.offer = new OfferMessage(callId, offerType, opaque);
495
493
  this.sendSignaling(remoteUserId, remoteDeviceId, callId, broadcast, message);
496
494
  }
497
495
  // Called by Rust
498
496
  onSendAnswer(remoteUserId, remoteDeviceId, callId, broadcast, opaque) {
499
497
  const message = new CallingMessage();
500
- message.answer = new AnswerMessage();
501
- message.answer.callId = callId;
502
- message.answer.opaque = opaque;
498
+ message.answer = new AnswerMessage(callId, opaque);
503
499
  this.sendSignaling(remoteUserId, remoteDeviceId, callId, broadcast, message);
504
500
  }
505
501
  // Called by Rust
@@ -507,9 +503,7 @@ class RingRTCType {
507
503
  const message = new CallingMessage();
508
504
  message.iceCandidates = [];
509
505
  for (const candidate of candidates) {
510
- const copy = new IceCandidateMessage();
511
- copy.callId = callId;
512
- copy.opaque = candidate;
506
+ const copy = new IceCandidateMessage(callId, candidate);
513
507
  message.iceCandidates.push(copy);
514
508
  }
515
509
  this.sendSignaling(remoteUserId, remoteDeviceId, callId, broadcast, message);
@@ -517,17 +511,13 @@ class RingRTCType {
517
511
  // Called by Rust
518
512
  onSendHangup(remoteUserId, remoteDeviceId, callId, broadcast, hangupType, deviceId) {
519
513
  const message = new CallingMessage();
520
- message.hangup = new HangupMessage();
521
- message.hangup.callId = callId;
522
- message.hangup.type = hangupType;
523
- message.hangup.deviceId = deviceId || 0;
514
+ message.hangup = new HangupMessage(callId, hangupType, deviceId || 0);
524
515
  this.sendSignaling(remoteUserId, remoteDeviceId, callId, broadcast, message);
525
516
  }
526
517
  // Called by Rust
527
518
  onSendBusy(remoteUserId, remoteDeviceId, callId, broadcast) {
528
519
  const message = new CallingMessage();
529
- message.busy = new BusyMessage();
530
- message.busy.callId = callId;
520
+ message.busy = new BusyMessage(callId);
531
521
  this.sendSignaling(remoteUserId, remoteDeviceId, callId, broadcast, message);
532
522
  }
533
523
  sendSignaling(remoteUserId, remoteDeviceId, callId, broadcast, message) {
@@ -1443,6 +1433,11 @@ class CallingMessage {
1443
1433
  }
1444
1434
  exports.CallingMessage = CallingMessage;
1445
1435
  class OfferMessage {
1436
+ constructor(callId, type, opaque) {
1437
+ this.callId = callId;
1438
+ this.type = type;
1439
+ this.opaque = opaque;
1440
+ }
1446
1441
  }
1447
1442
  exports.OfferMessage = OfferMessage;
1448
1443
  var OfferType;
@@ -1451,15 +1446,31 @@ var OfferType;
1451
1446
  OfferType[OfferType["VideoCall"] = 1] = "VideoCall";
1452
1447
  })(OfferType = exports.OfferType || (exports.OfferType = {}));
1453
1448
  class AnswerMessage {
1449
+ constructor(callId, opaque) {
1450
+ this.callId = callId;
1451
+ this.opaque = opaque;
1452
+ }
1454
1453
  }
1455
1454
  exports.AnswerMessage = AnswerMessage;
1456
1455
  class IceCandidateMessage {
1456
+ constructor(callId, opaque) {
1457
+ this.callId = callId;
1458
+ this.opaque = opaque;
1459
+ }
1457
1460
  }
1458
1461
  exports.IceCandidateMessage = IceCandidateMessage;
1459
1462
  class BusyMessage {
1463
+ constructor(callId) {
1464
+ this.callId = callId;
1465
+ }
1460
1466
  }
1461
1467
  exports.BusyMessage = BusyMessage;
1462
1468
  class HangupMessage {
1469
+ constructor(callId, type, deviceId) {
1470
+ this.callId = callId;
1471
+ this.type = type;
1472
+ this.deviceId = deviceId;
1473
+ }
1463
1474
  }
1464
1475
  exports.HangupMessage = HangupMessage;
1465
1476
  class OpaqueMessage {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/ringrtc",
3
- "version": "2.26.0",
3
+ "version": "2.26.3",
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": "1e55feb92467730da4b2481e390d4f6257b88e70dcd47c4feff27925f44443a3"
26
+ "prebuildChecksum": "5d580631487a2d988c93c872792d6a4ab91e57f9fad2d2e29ed2991163bc8288"
27
27
  },
28
28
  "author": "",
29
29
  "license": "AGPL-3.0-only",