livekit-client 2.18.5 → 2.18.7
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 +12 -8
- 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/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/processor/types.d.ts +2 -0
- package/dist/src/room/track/processor/types.d.ts.map +1 -1
- package/dist/ts4.2/room/track/processor/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/room/data-track/packet/index.test.ts +16 -21
- package/src/room/data-track/packet/index.ts +3 -3
- package/src/room/participant/publishUtils.ts +2 -2
- package/src/room/track/LocalAudioTrack.ts +1 -0
- package/src/room/track/LocalTrack.ts +2 -0
- package/src/room/track/processor/types.ts +2 -0
|
@@ -11744,7 +11744,7 @@ function getMatch(exp, ua) {
|
|
|
11744
11744
|
}
|
|
11745
11745
|
function getOSVersion(ua) {
|
|
11746
11746
|
return ua.includes('mac os') ? getMatch(/\(.+?(\d+_\d+(:?_\d+)?)/, ua, 1).replace(/_/g, '.') : undefined;
|
|
11747
|
-
}var version$1 = "2.18.
|
|
11747
|
+
}var version$1 = "2.18.7";const version = version$1;
|
|
11748
11748
|
const protocolVersion = 16;/** Base error that all LiveKit specific custom errors inherit from. */
|
|
11749
11749
|
class LivekitError extends Error {
|
|
11750
11750
|
constructor(code, message, options) {
|
|
@@ -18446,7 +18446,8 @@ class LocalTrack extends Track {
|
|
|
18446
18446
|
yield this.processor.restart({
|
|
18447
18447
|
track: newTrack,
|
|
18448
18448
|
kind: this.kind,
|
|
18449
|
-
element: this.processorElement
|
|
18449
|
+
element: this.processorElement,
|
|
18450
|
+
localTrack: this
|
|
18450
18451
|
});
|
|
18451
18452
|
processedTrack = this.processor.processedTrack;
|
|
18452
18453
|
}
|
|
@@ -18784,7 +18785,8 @@ class LocalTrack extends Track {
|
|
|
18784
18785
|
kind: _this3.kind,
|
|
18785
18786
|
track: _this3._mediaStreamTrack,
|
|
18786
18787
|
element: processorElement,
|
|
18787
|
-
audioContext: _this3.audioContext
|
|
18788
|
+
audioContext: _this3.audioContext,
|
|
18789
|
+
localTrack: _this3
|
|
18788
18790
|
};
|
|
18789
18791
|
yield processor.init(processorOptions);
|
|
18790
18792
|
_this3.log.debug('processor initialized', _this3.logContext);
|
|
@@ -19084,7 +19086,8 @@ class LocalTrack extends Track {
|
|
|
19084
19086
|
kind: this.kind,
|
|
19085
19087
|
track: this._mediaStreamTrack,
|
|
19086
19088
|
// RN won't have or use AudioContext
|
|
19087
|
-
audioContext: this.audioContext
|
|
19089
|
+
audioContext: this.audioContext,
|
|
19090
|
+
localTrack: this
|
|
19088
19091
|
};
|
|
19089
19092
|
this.log.debug("setting up audio processor ".concat(processor.name), this.logContext);
|
|
19090
19093
|
yield processor.init(processorOptions);
|
|
@@ -19407,7 +19410,8 @@ function encodingsFromPresets(width, height, presets, sourceFramerate) {
|
|
|
19407
19410
|
if (maxFramerate) {
|
|
19408
19411
|
encoding.maxFramerate = maxFramerate;
|
|
19409
19412
|
}
|
|
19410
|
-
const
|
|
19413
|
+
const browser = getBrowser();
|
|
19414
|
+
const canSetPriority = (browser === null || browser === void 0 ? void 0 : browser.name) === 'Firefox' && browser.os !== 'iOS' || idx === 0;
|
|
19411
19415
|
if (preset.encoding.priority && canSetPriority) {
|
|
19412
19416
|
encoding.priority = preset.encoding.priority;
|
|
19413
19417
|
encoding.networkPriority = preset.encoding.priority;
|
|
@@ -23180,8 +23184,8 @@ class DataTrackPacketHeader extends Serializable {
|
|
|
23180
23184
|
}
|
|
23181
23185
|
extensionsMetrics() {
|
|
23182
23186
|
const lengthBytes = this.extensions.toBinaryLengthBytes();
|
|
23183
|
-
const lengthWords = Math.ceil(lengthBytes / 4);
|
|
23184
|
-
const paddingLengthBytes = lengthWords * 4 - lengthBytes;
|
|
23187
|
+
const lengthWords = Math.ceil((EXT_WORDS_INDICATOR_SIZE + lengthBytes) / 4);
|
|
23188
|
+
const paddingLengthBytes = lengthWords * 4 - EXT_WORDS_INDICATOR_SIZE - lengthBytes;
|
|
23185
23189
|
return {
|
|
23186
23190
|
lengthBytes,
|
|
23187
23191
|
lengthWords,
|
|
@@ -23322,7 +23326,7 @@ class DataTrackPacketHeader extends Serializable {
|
|
|
23322
23326
|
// field represents the "number of additional bytes" long the extensions section is. This is
|
|
23323
23327
|
// potentially unintuitive so I wanted to call it out.
|
|
23324
23328
|
const extensionWords = rtpOrientedExtensionWords + 1;
|
|
23325
|
-
let extensionLengthBytes = 4 * extensionWords;
|
|
23329
|
+
let extensionLengthBytes = 4 * extensionWords - EXT_WORDS_INDICATOR_SIZE;
|
|
23326
23330
|
if (byteIndex + extensionLengthBytes > dataView.byteLength) {
|
|
23327
23331
|
throw DataTrackDeserializeError.headerOverrun();
|
|
23328
23332
|
}
|