@dtelecom/livekit-client 1.12.8 → 1.12.9

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;
@@ -20641,21 +20641,29 @@ class RemoteVideoTrack extends RemoteTrack {
20641
20641
  */
20642
20642
  observeElementInfo(elementInfo) {
20643
20643
  if (this.adaptiveStreamSettings && this.elementInfos.find(info => info === elementInfo) === undefined) {
20644
- elementInfo.handleResize = () => {
20645
- this.debouncedHandleResize();
20646
- };
20647
- elementInfo.handleVisibilityChanged = () => {
20648
- this.updateVisibility();
20649
- };
20644
+ if (this.adaptiveStreamSettings.updateDimensions) {
20645
+ elementInfo.handleResize = () => {
20646
+ this.debouncedHandleResize();
20647
+ };
20648
+ }
20649
+ if (this.adaptiveStreamSettings.pauseWhenNotVisible) {
20650
+ elementInfo.handleVisibilityChanged = () => {
20651
+ this.updateVisibility();
20652
+ };
20653
+ }
20650
20654
  this.elementInfos.push(elementInfo);
20651
20655
  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();
20656
+ if (this.adaptiveStreamSettings.updateDimensions) {
20657
+ // trigger the first resize update cycle
20658
+ // if the tab is backgrounded, the initial resize event does not fire until
20659
+ // the tab comes into focus for the first time.
20660
+ this.debouncedHandleResize();
20661
+ }
20662
+ if (this.adaptiveStreamSettings.pauseWhenNotVisible) {
20663
+ this.updateVisibility();
20664
+ }
20657
20665
  } else {
20658
- livekitLogger.warn('visibility resize observer not triggered');
20666
+ livekitLogger.warn('visibility and resize observer not triggered');
20659
20667
  }
20660
20668
  }
20661
20669
  /**