livekit-client 2.0.9 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +14 -6
- 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/stats.d.ts +6 -3
- package/dist/src/room/stats.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/ts4.2/src/room/stats.d.ts +6 -3
- package/package.json +1 -1
- package/src/room/stats.ts +9 -3
- package/src/room/track/LocalTrack.ts +4 -2
- package/src/room/track/LocalVideoTrack.ts +9 -4
@@ -13474,7 +13474,7 @@ function getMatch(exp, ua) {
|
|
13474
13474
|
return match && match.length >= id && match[id] || '';
|
13475
13475
|
}
|
13476
13476
|
|
13477
|
-
var version$1 = "2.0.
|
13477
|
+
var version$1 = "2.0.10";
|
13478
13478
|
|
13479
13479
|
const version = version$1;
|
13480
13480
|
const protocolVersion = 12;
|
@@ -15038,6 +15038,7 @@ class LocalTrack extends Track {
|
|
15038
15038
|
const unlock = yield this.processorLock.lock();
|
15039
15039
|
try {
|
15040
15040
|
this.log.debug('setting up processor', this.logContext);
|
15041
|
+
this.processorElement = (_a = this.processorElement) !== null && _a !== void 0 ? _a : document.createElement(this.kind);
|
15041
15042
|
const processorOptions = {
|
15042
15043
|
kind: this.kind,
|
15043
15044
|
track: this._mediaStreamTrack,
|
@@ -15051,7 +15052,6 @@ class LocalTrack extends Track {
|
|
15051
15052
|
if (this.kind === 'unknown') {
|
15052
15053
|
throw TypeError('cannot set processor on track of unknown kind');
|
15053
15054
|
}
|
15054
|
-
this.processorElement = (_a = this.processorElement) !== null && _a !== void 0 ? _a : document.createElement(this.kind);
|
15055
15055
|
attachToElement(this._mediaStreamTrack, this.processorElement);
|
15056
15056
|
this.processorElement.muted = true;
|
15057
15057
|
this.processorElement.play().catch(error => this.log.error('failed to play processor element', Object.assign(Object.assign({}, this.logContext), {
|
@@ -19535,17 +19535,20 @@ class LocalVideoTrack extends LocalTrack {
|
|
19535
19535
|
streamId: v.id,
|
19536
19536
|
frameHeight: v.frameHeight,
|
19537
19537
|
frameWidth: v.frameWidth,
|
19538
|
+
framesPerSecond: v.framesPerSecond,
|
19539
|
+
framesSent: v.framesSent,
|
19538
19540
|
firCount: v.firCount,
|
19539
19541
|
pliCount: v.pliCount,
|
19540
19542
|
nackCount: v.nackCount,
|
19541
19543
|
packetsSent: v.packetsSent,
|
19542
19544
|
bytesSent: v.bytesSent,
|
19543
|
-
|
19544
|
-
|
19545
|
+
qualityLimitationReason: v.qualityLimitationReason,
|
19546
|
+
qualityLimitationDurations: v.qualityLimitationDurations,
|
19547
|
+
qualityLimitationResolutionChanges: v.qualityLimitationResolutionChanges,
|
19545
19548
|
rid: (_a = v.rid) !== null && _a !== void 0 ? _a : v.id,
|
19546
19549
|
retransmittedPacketsSent: v.retransmittedPacketsSent,
|
19547
|
-
|
19548
|
-
|
19550
|
+
targetBitrate: v.targetBitrate,
|
19551
|
+
timestamp: v.timestamp
|
19549
19552
|
};
|
19550
19553
|
// locate the appropriate remote-inbound-rtp item
|
19551
19554
|
const r = stats.get(v.remoteId);
|
@@ -19557,6 +19560,11 @@ class LocalVideoTrack extends LocalTrack {
|
|
19557
19560
|
items.push(vs);
|
19558
19561
|
}
|
19559
19562
|
});
|
19563
|
+
// make sure highest res layer is always first
|
19564
|
+
items.sort((a, b) => {
|
19565
|
+
var _a, _b;
|
19566
|
+
return ((_a = b.frameWidth) !== null && _a !== void 0 ? _a : 0) - ((_b = a.frameWidth) !== null && _b !== void 0 ? _b : 0);
|
19567
|
+
});
|
19560
19568
|
return items;
|
19561
19569
|
});
|
19562
19570
|
}
|