livekit-client 2.18.5 → 2.18.6

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.
@@ -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.5";const version = version$1;
11747
+ }var version$1 = "2.18.6";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) {
@@ -23180,8 +23180,8 @@ class DataTrackPacketHeader extends Serializable {
23180
23180
  }
23181
23181
  extensionsMetrics() {
23182
23182
  const lengthBytes = this.extensions.toBinaryLengthBytes();
23183
- const lengthWords = Math.ceil(lengthBytes / 4);
23184
- const paddingLengthBytes = lengthWords * 4 - lengthBytes;
23183
+ const lengthWords = Math.ceil((EXT_WORDS_INDICATOR_SIZE + lengthBytes) / 4);
23184
+ const paddingLengthBytes = lengthWords * 4 - EXT_WORDS_INDICATOR_SIZE - lengthBytes;
23185
23185
  return {
23186
23186
  lengthBytes,
23187
23187
  lengthWords,
@@ -23322,7 +23322,7 @@ class DataTrackPacketHeader extends Serializable {
23322
23322
  // field represents the "number of additional bytes" long the extensions section is. This is
23323
23323
  // potentially unintuitive so I wanted to call it out.
23324
23324
  const extensionWords = rtpOrientedExtensionWords + 1;
23325
- let extensionLengthBytes = 4 * extensionWords;
23325
+ let extensionLengthBytes = 4 * extensionWords - EXT_WORDS_INDICATOR_SIZE;
23326
23326
  if (byteIndex + extensionLengthBytes > dataView.byteLength) {
23327
23327
  throw DataTrackDeserializeError.headerOverrun();
23328
23328
  }