@dtelecom/livekit-client 1.12.8 → 1.12.10

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.
@@ -14198,7 +14198,7 @@ function getMatch(exp, ua) {
14198
14198
  return match && match.length >= id && match[id] || '';
14199
14199
  }
14200
14200
 
14201
- var version$1 = "1.12.8";
14201
+ var version$1 = "1.12.9";
14202
14202
 
14203
14203
  const version = version$1;
14204
14204
  const protocolVersion = 9;
@@ -20600,7 +20600,8 @@ class RemoteVideoTrack extends RemoteTrack {
20600
20600
  this.adaptiveStreamSettings = adaptiveStreamSettings;
20601
20601
  }
20602
20602
  get isAdaptiveStream() {
20603
- return this.adaptiveStreamSettings !== undefined;
20603
+ var _a;
20604
+ return !!((_a = this.adaptiveStreamSettings) === null || _a === void 0 ? void 0 : _a.updateDimensions);
20604
20605
  }
20605
20606
  /**
20606
20607
  * Note: When using adaptiveStream, you need to use remoteVideoTrack.attach() to add the track to a HTMLVideoElement, otherwise your video tracks might never start
@@ -20641,21 +20642,29 @@ class RemoteVideoTrack extends RemoteTrack {
20641
20642
  */
20642
20643
  observeElementInfo(elementInfo) {
20643
20644
  if (this.adaptiveStreamSettings && this.elementInfos.find(info => info === elementInfo) === undefined) {
20644
- elementInfo.handleResize = () => {
20645
- this.debouncedHandleResize();
20646
- };
20647
- elementInfo.handleVisibilityChanged = () => {
20648
- this.updateVisibility();
20649
- };
20645
+ if (this.adaptiveStreamSettings.updateDimensions) {
20646
+ elementInfo.handleResize = () => {
20647
+ this.debouncedHandleResize();
20648
+ };
20649
+ }
20650
+ if (this.adaptiveStreamSettings.pauseWhenNotVisible) {
20651
+ elementInfo.handleVisibilityChanged = () => {
20652
+ this.updateVisibility();
20653
+ };
20654
+ }
20650
20655
  this.elementInfos.push(elementInfo);
20651
20656
  elementInfo.observe();
20652
- // trigger the first resize update cycle
20653
- // if the tab is backgrounded, the initial resize event does not fire until
20654
- // the tab comes into focus for the first time.
20655
- this.debouncedHandleResize();
20656
- this.updateVisibility();
20657
+ if (this.adaptiveStreamSettings.updateDimensions) {
20658
+ // trigger the first resize update cycle
20659
+ // if the tab is backgrounded, the initial resize event does not fire until
20660
+ // the tab comes into focus for the first time.
20661
+ this.debouncedHandleResize();
20662
+ }
20663
+ if (this.adaptiveStreamSettings.pauseWhenNotVisible) {
20664
+ this.updateVisibility();
20665
+ }
20657
20666
  } else {
20658
- livekitLogger.warn('visibility resize observer not triggered');
20667
+ livekitLogger.warn('visibility and resize observer not triggered');
20659
20668
  }
20660
20669
  }
20661
20670
  /**