@whereby.com/media 1.29.0 → 1.31.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.
@@ -90,7 +90,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
90
90
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
91
91
  PERFORMANCE OF THIS SOFTWARE.
92
92
  ***************************************************************************** */
93
- /* global Reflect, Promise, SuppressedError, Symbol */
93
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
94
94
 
95
95
 
96
96
  function __awaiter(thisArg, _arguments, P, generator) {
@@ -597,8 +597,8 @@ const removeNonUpdatedStats = (statsByView, time) => {
597
597
  }
598
598
  });
599
599
  };
600
- function collectStats(state, { logger, interval }, immediate) {
601
- return __awaiter(this, void 0, void 0, function* () {
600
+ function collectStats(state_1, _a, immediate_1) {
601
+ return __awaiter(this, arguments, void 0, function* (state, { logger, interval }, immediate) {
602
602
  const collectStatsBound = collectStats.bind(null, state, { interval, logger });
603
603
  try {
604
604
  const clients = state.getClients();
@@ -1037,32 +1037,6 @@ function addAbsCaptureTimeExtMap(sdp) {
1037
1037
  return addExtMap(sdp, absCaptureTimeUri, true, true);
1038
1038
  }
1039
1039
 
1040
- function isRelayed(pc) {
1041
- return pc.getStats(null).then((result) => {
1042
- let localCandidateType;
1043
- let remoteCandidateType;
1044
- result.forEach((report) => {
1045
- if (report.type === "transport" && report.selectedCandidatePairId) {
1046
- const transport = result.get(report.selectedCandidatePairId);
1047
- if (!transport) {
1048
- return;
1049
- }
1050
- localCandidateType = result.get(transport.localCandidateId).candidateType;
1051
- remoteCandidateType = result.get(transport.remoteCandidateId).candidateType;
1052
- return;
1053
- }
1054
- if (report.type === "candidate-pair" && report.selected) {
1055
- localCandidateType = result.get(report.localCandidateId).candidateType;
1056
- remoteCandidateType = result.get(report.remoteCandidateId).candidateType;
1057
- }
1058
- });
1059
- return (localCandidateType === "relay" ||
1060
- localCandidateType === "relayed" ||
1061
- remoteCandidateType === "relay" ||
1062
- remoteCandidateType === "relayed");
1063
- });
1064
- }
1065
-
1066
1040
  function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
1067
1041
  const sender = pc.getSenders().find((s) => s.track && s.track.kind === "video");
1068
1042
  if (!sender) {
@@ -1086,15 +1060,11 @@ function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
1086
1060
  });
1087
1061
  }
1088
1062
 
1089
- const MAXIMUM_TURN_BANDWIDTH = 1280;
1090
- const MAXIMUM_TURN_BANDWIDTH_UNLIMITED = -1;
1091
- const MEDIA_JITTER_BUFFER_TARGET = 400;
1092
-
1093
1063
  var _a$5;
1094
1064
  const adapter$5 = (_a$5 = adapterRaw.default) !== null && _a$5 !== void 0 ? _a$5 : adapterRaw;
1095
1065
  const logger$a = new Logger();
1096
1066
  class Session {
1097
- constructor({ peerConnectionId, bandwidth, maximumTurnBandwidth, deprioritizeH264Encoding, }) {
1067
+ constructor({ peerConnectionId, bandwidth, deprioritizeH264Encoding, }) {
1098
1068
  this.peerConnectionId = peerConnectionId;
1099
1069
  this.relayCandidateSeen = false;
1100
1070
  this.serverReflexiveCandidateSeen = false;
@@ -1111,7 +1081,6 @@ class Session {
1111
1081
  totalRecv: 0,
1112
1082
  };
1113
1083
  this.bandwidth = bandwidth || 0;
1114
- this.maximumTurnBandwidth = maximumTurnBandwidth;
1115
1084
  this.pending = [];
1116
1085
  this.isOperationPending = false;
1117
1086
  this.streamIds = [];
@@ -1371,19 +1340,6 @@ class Session {
1371
1340
  });
1372
1341
  }
1373
1342
  }
1374
- maybeRestrictRelayBandwidth() {
1375
- if (this.maximumTurnBandwidth === MAXIMUM_TURN_BANDWIDTH_UNLIMITED) {
1376
- return;
1377
- }
1378
- if (!this.pc.getStats) {
1379
- return;
1380
- }
1381
- isRelayed(this.pc).then((isRelayed) => {
1382
- if (isRelayed && this.bandwidth === 0) {
1383
- this.changeBandwidth(this.maximumTurnBandwidth);
1384
- }
1385
- });
1386
- }
1387
1343
  changeBandwidth(bandwidth) {
1388
1344
  if (bandwidth === this.bandwidth) {
1389
1345
  return;
@@ -1414,6 +1370,8 @@ class Session {
1414
1370
  }
1415
1371
  }
1416
1372
 
1373
+ const MEDIA_JITTER_BUFFER_TARGET = 400;
1374
+
1417
1375
  var _a$4;
1418
1376
  const adapter$4 = (_a$4 = adapterRaw.default) !== null && _a$4 !== void 0 ? _a$4 : adapterRaw;
1419
1377
  function detectMicrophoneNotWorking(pc) {
@@ -1958,9 +1916,9 @@ class Safari17 extends HandlerInterface {
1958
1916
  return this._pc.getStats();
1959
1917
  });
1960
1918
  }
1961
- send({ track, encodings, codecOptions, codec, onRtpSender }) {
1962
- var _a;
1963
- return __awaiter(this, void 0, void 0, function* () {
1919
+ send(_a) {
1920
+ return __awaiter(this, arguments, void 0, function* ({ track, encodings, codecOptions, codec, onRtpSender }) {
1921
+ var _b;
1964
1922
  this.assertNotClosed();
1965
1923
  this.assertSendDirection();
1966
1924
  logger$9.debug("send() [kind:%s, track.id:%s]", track.kind, track.id);
@@ -2008,7 +1966,7 @@ class Safari17 extends HandlerInterface {
2008
1966
  let offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];
2009
1967
  if (!this._transportReady) {
2010
1968
  yield this.setupTransport({
2011
- localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : "client",
1969
+ localDtlsRole: (_b = this._forcedLocalDtlsRole) !== null && _b !== void 0 ? _b : "client",
2012
1970
  localSdpObject,
2013
1971
  });
2014
1972
  }
@@ -2184,9 +2142,9 @@ class Safari17 extends HandlerInterface {
2184
2142
  return transceiver.sender.getStats();
2185
2143
  });
2186
2144
  }
2187
- sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol, }) {
2188
- var _a;
2189
- return __awaiter(this, void 0, void 0, function* () {
2145
+ sendDataChannel(_a) {
2146
+ return __awaiter(this, arguments, void 0, function* ({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol, }) {
2147
+ var _b;
2190
2148
  this.assertNotClosed();
2191
2149
  this.assertSendDirection();
2192
2150
  const options = {
@@ -2206,7 +2164,7 @@ class Safari17 extends HandlerInterface {
2206
2164
  const offerMediaObject = localSdpObject.media.find((m) => m.type === "application");
2207
2165
  if (!this._transportReady) {
2208
2166
  yield this.setupTransport({
2209
- localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : "client",
2167
+ localDtlsRole: (_b = this._forcedLocalDtlsRole) !== null && _b !== void 0 ? _b : "client",
2210
2168
  localSdpObject,
2211
2169
  });
2212
2170
  }
@@ -2228,8 +2186,8 @@ class Safari17 extends HandlerInterface {
2228
2186
  });
2229
2187
  }
2230
2188
  receive(optionsList) {
2231
- var _a, _b;
2232
2189
  return __awaiter(this, void 0, void 0, function* () {
2190
+ var _a, _b;
2233
2191
  this.assertNotClosed();
2234
2192
  this.assertRecvDirection();
2235
2193
  const results = [];
@@ -2376,9 +2334,9 @@ class Safari17 extends HandlerInterface {
2376
2334
  return transceiver.receiver.getStats();
2377
2335
  });
2378
2336
  }
2379
- receiveDataChannel({ sctpStreamParameters, label, protocol, }) {
2380
- var _a;
2381
- return __awaiter(this, void 0, void 0, function* () {
2337
+ receiveDataChannel(_a) {
2338
+ return __awaiter(this, arguments, void 0, function* ({ sctpStreamParameters, label, protocol, }) {
2339
+ var _b;
2382
2340
  this.assertNotClosed();
2383
2341
  this.assertRecvDirection();
2384
2342
  const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;
@@ -2401,7 +2359,7 @@ class Safari17 extends HandlerInterface {
2401
2359
  if (!this._transportReady) {
2402
2360
  const localSdpObject = sdpTransform.parse(answer.sdp);
2403
2361
  yield this.setupTransport({
2404
- localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : "client",
2362
+ localDtlsRole: (_b = this._forcedLocalDtlsRole) !== null && _b !== void 0 ? _b : "client",
2405
2363
  localSdpObject,
2406
2364
  });
2407
2365
  }
@@ -2412,8 +2370,8 @@ class Safari17 extends HandlerInterface {
2412
2370
  return { dataChannel };
2413
2371
  });
2414
2372
  }
2415
- setupTransport({ localDtlsRole, localSdpObject, }) {
2416
- return __awaiter(this, void 0, void 0, function* () {
2373
+ setupTransport(_a) {
2374
+ return __awaiter(this, arguments, void 0, function* ({ localDtlsRole, localSdpObject, }) {
2417
2375
  if (!localSdpObject) {
2418
2376
  localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);
2419
2377
  }
@@ -2722,8 +2680,8 @@ class ReconnectManager extends EventEmitter {
2722
2680
  socket.on(PROTOCOL_RESPONSES.SCREENSHARE_STOPPED, (payload) => this._onScreenshareChanged(payload, false));
2723
2681
  }
2724
2682
  _onRoomJoined(payload) {
2725
- var _a;
2726
2683
  return __awaiter(this, void 0, void 0, function* () {
2684
+ var _a;
2727
2685
  this.reconnectThresholdInMs = (payload.disconnectTimeout || 0) * 0.8;
2728
2686
  if (payload === null || payload === void 0 ? void 0 : payload.error) {
2729
2687
  this.emit(PROTOCOL_RESPONSES.ROOM_JOINED, payload);
@@ -3232,9 +3190,6 @@ class P2pRtcManager {
3232
3190
  supportsScreenShareAudio() {
3233
3191
  return true;
3234
3192
  }
3235
- maybeRestrictRelayBandwidth(session) {
3236
- session.maybeRestrictRelayBandwidth();
3237
- }
3238
3193
  addNewStream(streamId, stream, audioPaused, videoPaused, beforeEffectTracks = []) {
3239
3194
  if (stream === this.localStreams[streamId]) {
3240
3195
  return;
@@ -3505,9 +3460,6 @@ class P2pRtcManager {
3505
3460
  this.peerConnections[peerConnectionId] = session = new Session({
3506
3461
  peerConnectionId,
3507
3462
  bandwidth: initialBandwidth,
3508
- maximumTurnBandwidth: this._features.unlimitedBandwidthWhenUsingRelayP2POn
3509
- ? MAXIMUM_TURN_BANDWIDTH_UNLIMITED
3510
- : MAXIMUM_TURN_BANDWIDTH,
3511
3463
  deprioritizeH264Encoding,
3512
3464
  });
3513
3465
  this.totalSessionsCreated++;
@@ -3612,9 +3564,6 @@ class P2pRtcManager {
3612
3564
  (pc.iceConnectionState.match(/connected|completed/) ||
3613
3565
  (browserName$1 === "chrome" && pc.localDescription && pc.localDescription.type === "answer"))) {
3614
3566
  session.wasEverConnected = true;
3615
- if (this._features.bandwidth !== "false") {
3616
- this.maybeRestrictRelayBandwidth(session);
3617
- }
3618
3567
  }
3619
3568
  if (this._isAudioOnlyMode) {
3620
3569
  session.setAudioOnly(true, this._screenshareVideoTrackIds);
@@ -5217,8 +5166,8 @@ class VegaRtcManager {
5217
5166
  this._emitToPWA(rtcManagerEvents.SFU_CONNECTION_CLOSED);
5218
5167
  }
5219
5168
  _join() {
5220
- var _a, _b;
5221
5169
  return __awaiter(this, void 0, void 0, function* () {
5170
+ var _a, _b;
5222
5171
  logger$3.info("join()");
5223
5172
  this._emitToPWA(rtcManagerEvents.SFU_CONNECTION_OPEN);
5224
5173
  try {
@@ -5251,8 +5200,8 @@ class VegaRtcManager {
5251
5200
  });
5252
5201
  }
5253
5202
  _createTransport(send) {
5254
- var _a;
5255
5203
  return __awaiter(this, void 0, void 0, function* () {
5204
+ var _a;
5256
5205
  const creator = send ? "createSendTransport" : "createRecvTransport";
5257
5206
  const transportOptions = yield this._vegaConnection.request("createTransport", {
5258
5207
  producing: send,
@@ -5307,7 +5256,7 @@ class VegaRtcManager {
5307
5256
  transport.removeListener("connectionstatechange", onConnectionStateListener);
5308
5257
  });
5309
5258
  if (send) {
5310
- transport === null || transport === void 0 ? void 0 : transport.on("produce", ({ kind, rtpParameters, appData, }, callback, errback) => __awaiter(this, void 0, void 0, function* () {
5259
+ transport === null || transport === void 0 ? void 0 : transport.on("produce", (_a, callback_1, errback_1) => __awaiter(this, [_a, callback_1, errback_1], void 0, function* ({ kind, rtpParameters, appData, }, callback, errback) {
5311
5260
  var _b;
5312
5261
  try {
5313
5262
  const { paused } = appData;
@@ -5324,10 +5273,10 @@ class VegaRtcManager {
5324
5273
  errback(error);
5325
5274
  }
5326
5275
  }));
5327
- transport === null || transport === void 0 ? void 0 : transport.on("producedata", ({ appData, sctpStreamParameters, }, callback, errback) => __awaiter(this, void 0, void 0, function* () {
5328
- var _c;
5276
+ transport === null || transport === void 0 ? void 0 : transport.on("producedata", (_a, callback_1, errback_1) => __awaiter(this, [_a, callback_1, errback_1], void 0, function* ({ appData, sctpStreamParameters, }, callback, errback) {
5277
+ var _b;
5329
5278
  try {
5330
- const { id } = yield ((_c = this._vegaConnection) === null || _c === void 0 ? void 0 : _c.request("produceData", {
5279
+ const { id } = yield ((_b = this._vegaConnection) === null || _b === void 0 ? void 0 : _b.request("produceData", {
5331
5280
  transportId: transport.id,
5332
5281
  sctpStreamParameters,
5333
5282
  appData,
@@ -5345,8 +5294,8 @@ class VegaRtcManager {
5345
5294
  }
5346
5295
  });
5347
5296
  }
5348
- _restartIce(transport, retried = 0) {
5349
- return __awaiter(this, void 0, void 0, function* () {
5297
+ _restartIce(transport_1) {
5298
+ return __awaiter(this, arguments, void 0, function* (transport, retried = 0) {
5350
5299
  if (!transport || !("closed" in transport) || !("connectionState" in transport)) {
5351
5300
  logger$3.info("_restartIce: No transport or property closed or connectionState!");
5352
5301
  return;
@@ -5500,8 +5449,8 @@ class VegaRtcManager {
5500
5449
  this._micScoreProducer = null;
5501
5450
  }
5502
5451
  _replaceMicTrack() {
5503
- var _a;
5504
5452
  return __awaiter(this, void 0, void 0, function* () {
5453
+ var _a;
5505
5454
  logger$3.info("_replaceMicTrack()");
5506
5455
  if (!this._micTrack || !this._micProducer || this._micProducer.closed)
5507
5456
  return;
@@ -5570,8 +5519,8 @@ class VegaRtcManager {
5570
5519
  }
5571
5520
  }
5572
5521
  _internalSendWebcam() {
5573
- var _a;
5574
5522
  return __awaiter(this, void 0, void 0, function* () {
5523
+ var _a;
5575
5524
  logger$3.info("_internalSendWebcam()");
5576
5525
  if (!this._sendTransport ||
5577
5526
  this._webcamProducer ||
@@ -5580,7 +5529,7 @@ class VegaRtcManager {
5580
5529
  return;
5581
5530
  }
5582
5531
  this._webcamProducerPromise = (() => __awaiter(this, void 0, void 0, function* () {
5583
- var _b;
5532
+ var _a;
5584
5533
  try {
5585
5534
  const currentPaused = this._webcamPaused;
5586
5535
  const producer = yield this._sendTransport.produce(Object.assign(Object.assign({ track: this._webcamTrack, disableTrackOnPause: false, stopTracks: false }, getMediaSettings("video", false, Object.assign(Object.assign({}, this._features), { vp9On: this._features.sfuVp9On }))), { appData: {
@@ -5602,7 +5551,7 @@ class VegaRtcManager {
5602
5551
  this._webcamProducerPromise = null;
5603
5552
  this._qualityMonitor.removeProducer(this._selfId, producer.id);
5604
5553
  });
5605
- if (this._webcamTrack && this._webcamTrack !== ((_b = this._webcamProducer) === null || _b === void 0 ? void 0 : _b.track)) {
5554
+ if (this._webcamTrack && this._webcamTrack !== ((_a = this._webcamProducer) === null || _a === void 0 ? void 0 : _a.track)) {
5606
5555
  this._webcamProducerPromise = null;
5607
5556
  this._replaceWebcamTrack();
5608
5557
  }
@@ -6204,11 +6153,11 @@ class VegaRtcManager {
6204
6153
  }
6205
6154
  });
6206
6155
  }
6207
- _onConsumerClosed({ consumerId, reason }) {
6208
- var _a;
6209
- return __awaiter(this, void 0, void 0, function* () {
6156
+ _onConsumerClosed(_a) {
6157
+ return __awaiter(this, arguments, void 0, function* ({ consumerId, reason }) {
6158
+ var _b;
6210
6159
  logger$3.info("_onConsumerClosed()", { consumerId, reason });
6211
- (_a = this._consumers.get(consumerId)) === null || _a === void 0 ? void 0 : _a.close();
6160
+ (_b = this._consumers.get(consumerId)) === null || _b === void 0 ? void 0 : _b.close();
6212
6161
  });
6213
6162
  }
6214
6163
  _onConsumerPaused({ consumerId }) {
@@ -6267,8 +6216,8 @@ class VegaRtcManager {
6267
6216
  this._syncIncomingStreamsWithPWA(clientId);
6268
6217
  });
6269
6218
  }
6270
- _onDataConsumerClosed({ dataConsumerId, reason }) {
6271
- return __awaiter(this, void 0, void 0, function* () {
6219
+ _onDataConsumerClosed(_a) {
6220
+ return __awaiter(this, arguments, void 0, function* ({ dataConsumerId, reason }) {
6272
6221
  logger$3.info("_onDataConsumerClosed()", { dataConsumerId, reason });
6273
6222
  const consumer = this._dataConsumers.get(dataConsumerId);
6274
6223
  consumer === null || consumer === void 0 ? void 0 : consumer.close();
@@ -6670,6 +6619,16 @@ const issueDetectors = [
6670
6619
  },
6671
6620
  noTrackStatsIssueDetector,
6672
6621
  dryTrackIssueDetector,
6622
+ {
6623
+ id: "denoiser-context-suspended",
6624
+ enabled: ({ client, kind }) => { var _a, _b; return client.isLocalClient && kind === "audio" && !!((_b = (_a = client.audio) === null || _a === void 0 ? void 0 : _a.track) === null || _b === void 0 ? void 0 : _b._denoiserCtx); },
6625
+ check: ({ track }) => {
6626
+ var _a;
6627
+ if (!track || !("_denoiserCtx" in track))
6628
+ return false;
6629
+ return ((_a = track._denoiserCtx) === null || _a === void 0 ? void 0 : _a.state) === "suspended";
6630
+ },
6631
+ },
6673
6632
  {
6674
6633
  id: "low-layer0-bitrate",
6675
6634
  enabled: ({ hasLiveTrack, ssrc0, kind, client }) => hasLiveTrack && kind === "video" && !!ssrc0 && !!(ssrc0 === null || ssrc0 === void 0 ? void 0 : ssrc0.height) && !client.isPresentation,
@@ -7308,8 +7267,8 @@ class BandwidthTester extends EventEmitter {
7308
7267
  this.emit("close");
7309
7268
  }
7310
7269
  _start() {
7311
- var _a, _b;
7312
7270
  return __awaiter(this, void 0, void 0, function* () {
7271
+ var _a, _b;
7313
7272
  logger$1.info("_start()");
7314
7273
  this._connectTime = Date.now() - this._startTime;
7315
7274
  if (this._connectTime > 5000) {
@@ -7361,8 +7320,8 @@ class BandwidthTester extends EventEmitter {
7361
7320
  });
7362
7321
  }
7363
7322
  _createTransport(send) {
7364
- var _a;
7365
7323
  return __awaiter(this, void 0, void 0, function* () {
7324
+ var _a;
7366
7325
  const creator = send ? "createSendTransport" : "createRecvTransport";
7367
7326
  const transportOptions = yield this._vegaConnection.request("createTransport", {
7368
7327
  producing: send,
@@ -7381,7 +7340,7 @@ class BandwidthTester extends EventEmitter {
7381
7340
  callback();
7382
7341
  });
7383
7342
  if (send) {
7384
- transport === null || transport === void 0 ? void 0 : transport.on("produce", ({ kind, rtpParameters, appData }, callback, errback) => __awaiter(this, void 0, void 0, function* () {
7343
+ transport === null || transport === void 0 ? void 0 : transport.on("produce", (_a, callback_1, errback_1) => __awaiter(this, [_a, callback_1, errback_1], void 0, function* ({ kind, rtpParameters, appData }, callback, errback) {
7385
7344
  try {
7386
7345
  const { paused } = appData;
7387
7346
  const { id } = yield this._vegaConnection.request("produce", {
@@ -7770,9 +7729,9 @@ function replaceTracksInStream(stream, newStream, only) {
7770
7729
  });
7771
7730
  return replacedTracks;
7772
7731
  }
7773
- function getStream(constraintOpt, { replaceStream, fallback = true } = {}) {
7774
- var _a;
7775
- return __awaiter(this, void 0, void 0, function* () {
7732
+ function getStream(constraintOpt_1) {
7733
+ return __awaiter(this, arguments, void 0, function* (constraintOpt, { replaceStream, fallback = true } = {}) {
7734
+ var _a;
7776
7735
  let error;
7777
7736
  let newConstraints;
7778
7737
  let retryConstraintOpt;
@@ -7988,5 +7947,5 @@ var RtcEventNames;
7988
7947
  RtcEventNames["stream_added"] = "stream_added";
7989
7948
  })(RtcEventNames || (RtcEventNames = {}));
7990
7949
 
7991
- export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, RtcStream, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
7950
+ export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, RtcStream, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
7992
7951
  //# sourceMappingURL=legacy-esm.js.map
package/package.json CHANGED
@@ -1,77 +1,87 @@
1
1
  {
2
- "name": "@whereby.com/media",
3
- "description": "Media library for Whereby",
4
- "version": "1.29.0",
5
- "license": "MIT",
6
- "homepage": "https://github.com/whereby/sdk",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/whereby/sdk.git"
10
- },
11
- "bugs": {
12
- "url": "https://github.com/whereby/sdk/issues"
13
- },
14
- "scripts": {
15
- "clean": "rimraf dist node_modules .turbo",
16
- "build": "rimraf dist && rollup -c rollup.config.js",
17
- "watch": "rimraf dist && rollup -w -c rollup.config.js",
18
- "test": "npm run test:lint && npm run test:unit",
19
- "test:unit": "jest",
20
- "test:lint": "eslint src tests",
21
- "test:unit:coverage": "jest --collectCoverage",
22
- "test:attw": "attw --pack . -f table",
23
- "format:fix": "prettier --write './**/*.{js,ts,yml,json}'",
24
- "format:check": "prettier --check './**/*.{js,ts,yml,json}'"
25
- },
26
- "publishConfig": {
27
- "access": "public"
28
- },
29
- "main": "dist/index.cjs",
30
- "module": "dist/legacy-esm.js",
31
- "types": "dist/index.d.ts",
32
- "exports": {
33
- ".": {
34
- "import": {
35
- "types": "./dist/index.d.mts",
36
- "default": "./dist/index.mjs"
37
- },
38
- "require": {
39
- "types": "./dist/index.d.cts",
40
- "default": "./dist/index.cjs"
41
- }
42
- }
43
- },
44
- "files": [
45
- "dist/**/*.js",
46
- "dist/**/*.mjs",
47
- "dist/**/*.cjs",
48
- "dist/**/*.d.ts",
49
- "dist/**/*.d.mts",
50
- "dist/**/*.d.cts"
51
- ],
52
- "dependencies": {
53
- "@types/ua-parser-js": "^0.7.39",
54
- "check-ip": "^1.1.1",
55
- "events": "^3.3.0",
56
- "ip-address": "^9.0.5",
57
- "mediasoup-client": "3.7.18",
58
- "rtcstats": "github:whereby/rtcstats#5.4.1",
59
- "sdp": "^3.2.0",
60
- "sdp-transform": "^2.14.2",
61
- "socket.io-client": "4.7.2",
62
- "typescript": "^5.3.3",
63
- "ua-parser-js": "^1.0.38",
64
- "uuid": "^9.0.1",
65
- "uuid-validate": "^0.0.3",
66
- "webrtc-adapter": "^9.0.1"
67
- },
68
- "devDependencies": {
69
- "@babel/core": "^7.23.2",
70
- "@babel/preset-env": "^7.23.2",
71
- "jest-websocket-mock": "^2.5.0",
72
- "process": "^0.11.10"
73
- },
74
- "engines": {
75
- "node": ">=16.0.0"
2
+ "name": "@whereby.com/media",
3
+ "description": "Media library for Whereby",
4
+ "version": "1.31.0",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/whereby/sdk",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/whereby/sdk.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/whereby/sdk/issues"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "main": "dist/index.cjs",
18
+ "module": "dist/legacy-esm.js",
19
+ "types": "dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "import": {
23
+ "types": "./dist/index.d.mts",
24
+ "default": "./dist/index.mjs"
25
+ },
26
+ "require": {
27
+ "types": "./dist/index.d.cts",
28
+ "default": "./dist/index.cjs"
29
+ }
76
30
  }
77
- }
31
+ },
32
+ "files": [
33
+ "dist/**/*.js",
34
+ "dist/**/*.mjs",
35
+ "dist/**/*.cjs",
36
+ "dist/**/*.d.ts",
37
+ "dist/**/*.d.mts",
38
+ "dist/**/*.d.cts"
39
+ ],
40
+ "dependencies": {
41
+ "@types/ua-parser-js": "^0.7.39",
42
+ "check-ip": "^1.1.1",
43
+ "events": "^3.3.0",
44
+ "ip-address": "^9.0.5",
45
+ "mediasoup-client": "3.7.18",
46
+ "rtcstats": "github:whereby/rtcstats#5.4.1",
47
+ "sdp": "^3.2.0",
48
+ "sdp-transform": "^2.14.2",
49
+ "socket.io-client": "4.7.2",
50
+ "ua-parser-js": "^1.0.38",
51
+ "uuid": "^9.0.1",
52
+ "uuid-validate": "^0.0.3",
53
+ "webrtc-adapter": "^9.0.1"
54
+ },
55
+ "devDependencies": {
56
+ "@babel/core": "^7.23.2",
57
+ "@babel/preset-env": "^7.23.2",
58
+ "@types/sdp-transform": "^2.4.9",
59
+ "@types/uuid-validate": "^0.0.3",
60
+ "jest-websocket-mock": "^2.5.0",
61
+ "process": "^0.11.10",
62
+ "eslint": "^9.29.0",
63
+ "prettier": "^3.5.3",
64
+ "typescript": "^5.8.3",
65
+ "@whereby.com/eslint-config": "0.1.0",
66
+ "@whereby.com/jest-config": "0.1.0",
67
+ "@whereby.com/prettier-config": "0.1.0",
68
+ "@whereby.com/rollup-config": "0.1.0",
69
+ "@whereby.com/tsconfig": "0.1.0"
70
+ },
71
+ "engines": {
72
+ "node": ">=16.0.0"
73
+ },
74
+ "prettier": "@whereby.com/prettier-config",
75
+ "scripts": {
76
+ "clean": "rimraf dist node_modules .turbo",
77
+ "build": "rimraf dist && rollup -c rollup.config.js",
78
+ "watch": "rimraf dist && rollup -w -c rollup.config.js",
79
+ "test": "npm run test:lint && npm run test:unit",
80
+ "test:unit": "jest",
81
+ "test:lint": "eslint src tests",
82
+ "test:unit:coverage": "jest --collectCoverage",
83
+ "test:attw": "attw --pack . -f table",
84
+ "format:fix": "prettier --write './**/*.{js,ts,yml,json}'",
85
+ "format:check": "prettier --check './**/*.{js,ts,yml,json}'"
86
+ }
87
+ }