@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.
- package/dist/livekit-client.esm.mjs +23 -14
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/types.d.ts +8 -0
- package/dist/src/room/track/types.d.ts.map +1 -1
- package/dist/src/test/mocks.d.ts +1 -0
- package/dist/src/test/mocks.d.ts.map +1 -1
- package/dist/ts4.2/src/room/track/types.d.ts +8 -0
- package/dist/ts4.2/src/test/mocks.d.ts +1 -0
- package/package.json +1 -1
- package/src/room/track/RemoteVideoTrack.ts +21 -13
- package/src/room/track/types.ts +8 -0
|
@@ -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.
|
|
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
|
-
|
|
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
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
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
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
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
|
/**
|