@signalapp/ringrtc 2.26.2 → 2.26.4

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.
@@ -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 */
@@ -178,6 +178,16 @@ class GumVideoCapturer {
178
178
  }
179
179
  return;
180
180
  }
181
+ if (this.mediaStream !== undefined &&
182
+ this.mediaStream.getVideoTracks().length > 0) {
183
+ // We have a stream and track for the requested camera already. Stop
184
+ // the duplicate track that we just started.
185
+ index_1.RingRTC.logWarn('startCapturing(): dropping duplicate call to startCapturing');
186
+ for (const track of mediaStream.getVideoTracks()) {
187
+ track.stop();
188
+ }
189
+ return;
190
+ }
181
191
  this.mediaStream = mediaStream;
182
192
  if (!this.spawnedSenderRunning &&
183
193
  this.mediaStream != undefined &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalapp/ringrtc",
3
- "version": "2.26.2",
3
+ "version": "2.26.4",
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": "da18a941541930f29418b67b7091d8508e991ae0cf39e8b9e71580962a0c0aa5"
26
+ "prebuildChecksum": "6152f6a46abca73e62644fc82e36b2ffa7927cbae1f671a2ba04a7519eb670a1"
27
27
  },
28
28
  "author": "",
29
29
  "license": "AGPL-3.0-only",