@whereby.com/media 11.2.0 → 11.2.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.
package/dist/index.cjs CHANGED
@@ -4401,6 +4401,7 @@ class VegaRtcManager {
4401
4401
  this._sndTransportIceRestartPromise = null;
4402
4402
  this._rcvTransportIceRestartPromise = null;
4403
4403
  this._colocation = null;
4404
+ this._isAudioOnlyMode = false;
4404
4405
  this._audioTrackOnEnded = () => {
4405
4406
  rtcStats.sendEvent("audio_ended", { unloading });
4406
4407
  this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
@@ -4675,6 +4676,8 @@ class VegaRtcManager {
4675
4676
  });
4676
4677
  if (this._colocation)
4677
4678
  this._vegaConnection.message("setColocation", { colocation: this._colocation });
4679
+ if (this._isAudioOnlyMode)
4680
+ this._vegaConnection.message("enableAudioOnly");
4678
4681
  yield Promise.all([this._createTransport(true), this._createTransport(false)]);
4679
4682
  const mediaPromises = [];
4680
4683
  if (this._micTrack && !this._micProducer && !this._micProducerPromise)
@@ -5403,6 +5406,7 @@ class VegaRtcManager {
5403
5406
  }
5404
5407
  setAudioOnly(audioOnly) {
5405
5408
  var _a;
5409
+ this._isAudioOnlyMode = audioOnly;
5406
5410
  (_a = this._vegaConnection) === null || _a === void 0 ? void 0 : _a.message(audioOnly ? "enableAudioOnly" : "disableAudioOnly");
5407
5411
  }
5408
5412
  setRemoteScreenshareVideoTrackIds() { }
package/dist/index.d.cts CHANGED
@@ -531,6 +531,7 @@ interface RtcManager {
531
531
  isSfu: boolean;
532
532
  }): boolean;
533
533
  setEventClaim?(eventClaim: string): void;
534
+ setAudioOnly(audioOnly: boolean): void;
534
535
  setRemoteScreenshareVideoTrackIds(remoteScreenshareVideoTrackIds: string[]): void;
535
536
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
536
537
  removeRemoteClientMediaPrefs(clientId: string): void;
@@ -2145,6 +2146,7 @@ declare class VegaRtcManager implements RtcManager {
2145
2146
  _sndTransportIceRestartPromise: any;
2146
2147
  _rcvTransportIceRestartPromise: any;
2147
2148
  _colocation: any;
2149
+ _isAudioOnlyMode: boolean;
2148
2150
  _audioTrackOnEnded: any;
2149
2151
  _videoTrackOnEnded: any;
2150
2152
  _socketListenerDeregisterFunctions: any;
package/dist/index.d.mts CHANGED
@@ -531,6 +531,7 @@ interface RtcManager {
531
531
  isSfu: boolean;
532
532
  }): boolean;
533
533
  setEventClaim?(eventClaim: string): void;
534
+ setAudioOnly(audioOnly: boolean): void;
534
535
  setRemoteScreenshareVideoTrackIds(remoteScreenshareVideoTrackIds: string[]): void;
535
536
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
536
537
  removeRemoteClientMediaPrefs(clientId: string): void;
@@ -2145,6 +2146,7 @@ declare class VegaRtcManager implements RtcManager {
2145
2146
  _sndTransportIceRestartPromise: any;
2146
2147
  _rcvTransportIceRestartPromise: any;
2147
2148
  _colocation: any;
2149
+ _isAudioOnlyMode: boolean;
2148
2150
  _audioTrackOnEnded: any;
2149
2151
  _videoTrackOnEnded: any;
2150
2152
  _socketListenerDeregisterFunctions: any;
package/dist/index.d.ts CHANGED
@@ -531,6 +531,7 @@ interface RtcManager {
531
531
  isSfu: boolean;
532
532
  }): boolean;
533
533
  setEventClaim?(eventClaim: string): void;
534
+ setAudioOnly(audioOnly: boolean): void;
534
535
  setRemoteScreenshareVideoTrackIds(remoteScreenshareVideoTrackIds: string[]): void;
535
536
  setRemoteClientMediaPrefs(clientId: string, mediaPrefs: MediaPrefs): void;
536
537
  removeRemoteClientMediaPrefs(clientId: string): void;
@@ -2145,6 +2146,7 @@ declare class VegaRtcManager implements RtcManager {
2145
2146
  _sndTransportIceRestartPromise: any;
2146
2147
  _rcvTransportIceRestartPromise: any;
2147
2148
  _colocation: any;
2149
+ _isAudioOnlyMode: boolean;
2148
2150
  _audioTrackOnEnded: any;
2149
2151
  _videoTrackOnEnded: any;
2150
2152
  _socketListenerDeregisterFunctions: any;
package/dist/index.mjs CHANGED
@@ -4381,6 +4381,7 @@ class VegaRtcManager {
4381
4381
  this._sndTransportIceRestartPromise = null;
4382
4382
  this._rcvTransportIceRestartPromise = null;
4383
4383
  this._colocation = null;
4384
+ this._isAudioOnlyMode = false;
4384
4385
  this._audioTrackOnEnded = () => {
4385
4386
  rtcStats.sendEvent("audio_ended", { unloading });
4386
4387
  this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
@@ -4655,6 +4656,8 @@ class VegaRtcManager {
4655
4656
  });
4656
4657
  if (this._colocation)
4657
4658
  this._vegaConnection.message("setColocation", { colocation: this._colocation });
4659
+ if (this._isAudioOnlyMode)
4660
+ this._vegaConnection.message("enableAudioOnly");
4658
4661
  yield Promise.all([this._createTransport(true), this._createTransport(false)]);
4659
4662
  const mediaPromises = [];
4660
4663
  if (this._micTrack && !this._micProducer && !this._micProducerPromise)
@@ -5383,6 +5386,7 @@ class VegaRtcManager {
5383
5386
  }
5384
5387
  setAudioOnly(audioOnly) {
5385
5388
  var _a;
5389
+ this._isAudioOnlyMode = audioOnly;
5386
5390
  (_a = this._vegaConnection) === null || _a === void 0 ? void 0 : _a.message(audioOnly ? "enableAudioOnly" : "disableAudioOnly");
5387
5391
  }
5388
5392
  setRemoteScreenshareVideoTrackIds() { }
@@ -4381,6 +4381,7 @@ class VegaRtcManager {
4381
4381
  this._sndTransportIceRestartPromise = null;
4382
4382
  this._rcvTransportIceRestartPromise = null;
4383
4383
  this._colocation = null;
4384
+ this._isAudioOnlyMode = false;
4384
4385
  this._audioTrackOnEnded = () => {
4385
4386
  rtcStats.sendEvent("audio_ended", { unloading });
4386
4387
  this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
@@ -4655,6 +4656,8 @@ class VegaRtcManager {
4655
4656
  });
4656
4657
  if (this._colocation)
4657
4658
  this._vegaConnection.message("setColocation", { colocation: this._colocation });
4659
+ if (this._isAudioOnlyMode)
4660
+ this._vegaConnection.message("enableAudioOnly");
4658
4661
  yield Promise.all([this._createTransport(true), this._createTransport(false)]);
4659
4662
  const mediaPromises = [];
4660
4663
  if (this._micTrack && !this._micProducer && !this._micProducerPromise)
@@ -5383,6 +5386,7 @@ class VegaRtcManager {
5383
5386
  }
5384
5387
  setAudioOnly(audioOnly) {
5385
5388
  var _a;
5389
+ this._isAudioOnlyMode = audioOnly;
5386
5390
  (_a = this._vegaConnection) === null || _a === void 0 ? void 0 : _a.message(audioOnly ? "enableAudioOnly" : "disableAudioOnly");
5387
5391
  }
5388
5392
  setRemoteScreenshareVideoTrackIds() { }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@whereby.com/media",
3
3
  "description": "Media library for Whereby",
4
- "version": "11.2.0",
4
+ "version": "11.2.1",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/whereby/sdk",
7
7
  "repository": {
@@ -64,8 +64,8 @@
64
64
  "typescript": "^5.8.3",
65
65
  "@whereby.com/eslint-config": "0.1.0",
66
66
  "@whereby.com/jest-config": "0.1.0",
67
- "@whereby.com/rollup-config": "0.1.1",
68
67
  "@whereby.com/prettier-config": "0.1.0",
68
+ "@whereby.com/rollup-config": "0.1.1",
69
69
  "@whereby.com/tsconfig": "0.1.0"
70
70
  },
71
71
  "engines": {