livekit-client 2.20.0 → 2.20.1
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.e2ee.worker.js +1 -1
- package/dist/livekit-client.e2ee.worker.js.map +1 -1
- package/dist/livekit-client.e2ee.worker.mjs +8 -4
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +156 -16
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.fm.worker.js +1 -1
- package/dist/livekit-client.fm.worker.js.map +1 -1
- package/dist/livekit-client.fm.worker.mjs +8 -0
- package/dist/livekit-client.fm.worker.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/e2ee/E2eeManager.d.ts +1 -0
- package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
- package/dist/src/e2ee/types.d.ts +1 -0
- package/dist/src/e2ee/types.d.ts.map +1 -1
- package/dist/src/e2ee/utils.d.ts +1 -0
- package/dist/src/e2ee/utils.d.ts.map +1 -1
- package/dist/src/e2ee/worker/DataCryptor.d.ts +1 -0
- package/dist/src/e2ee/worker/DataCryptor.d.ts.map +1 -1
- package/dist/src/e2ee/worker/FrameCryptor.d.ts +1 -0
- package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
- package/dist/src/e2ee/worker/naluUtils.d.ts +1 -0
- package/dist/src/e2ee/worker/naluUtils.d.ts.map +1 -1
- package/dist/src/e2ee/worker/sifPayload.d.ts +1 -0
- package/dist/src/e2ee/worker/sifPayload.d.ts.map +1 -1
- package/dist/src/frameMetadata/frameMetadata.d.ts +1 -0
- package/dist/src/frameMetadata/frameMetadata.d.ts.map +1 -1
- package/dist/src/frameMetadata/types.d.ts +1 -0
- package/dist/src/frameMetadata/types.d.ts.map +1 -1
- package/dist/src/room/PCTransport.d.ts +40 -1
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +1 -0
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +1 -0
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/data-track/depacketizer.d.ts.map +1 -1
- package/dist/src/room/data-track/frame.d.ts +1 -0
- package/dist/src/room/data-track/frame.d.ts.map +1 -1
- package/dist/src/room/data-track/outgoing/types.d.ts +1 -0
- package/dist/src/room/data-track/outgoing/types.d.ts.map +1 -1
- package/dist/src/room/data-track/packet/extensions.d.ts +1 -0
- package/dist/src/room/data-track/packet/extensions.d.ts.map +1 -1
- package/dist/src/room/data-track/packet/index.d.ts +1 -0
- package/dist/src/room/data-track/packet/index.d.ts.map +1 -1
- package/dist/src/room/data-track/packet/serializable.d.ts +1 -0
- package/dist/src/room/data-track/packet/serializable.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +1 -0
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +1 -0
- package/dist/src/room/participant/Participant.d.ts.map +1 -1
- package/dist/src/room/track/Track.d.ts +1 -0
- package/dist/src/room/track/Track.d.ts.map +1 -1
- package/dist/src/room/track/record.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts +1 -0
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/type-polyfills/non-shared-typed-arrays.d.ts +2 -0
- package/dist/src/type-polyfills/non-shared-typed-arrays.d.ts.map +1 -0
- package/dist/src/utils/dataPacketBuffer.d.ts +1 -0
- package/dist/src/utils/dataPacketBuffer.d.ts.map +1 -1
- package/dist/ts4.2/e2ee/E2eeManager.d.ts +1 -0
- package/dist/ts4.2/e2ee/types.d.ts +1 -0
- package/dist/ts4.2/e2ee/utils.d.ts +1 -0
- package/dist/ts4.2/e2ee/worker/DataCryptor.d.ts +1 -0
- package/dist/ts4.2/e2ee/worker/FrameCryptor.d.ts +1 -0
- package/dist/ts4.2/e2ee/worker/naluUtils.d.ts +1 -0
- package/dist/ts4.2/e2ee/worker/sifPayload.d.ts +1 -0
- package/dist/ts4.2/frameMetadata/frameMetadata.d.ts +1 -0
- package/dist/ts4.2/frameMetadata/types.d.ts +1 -0
- package/dist/ts4.2/room/PCTransport.d.ts +40 -1
- package/dist/ts4.2/room/RTCEngine.d.ts +1 -0
- package/dist/ts4.2/room/Room.d.ts +1 -0
- package/dist/ts4.2/room/data-track/frame.d.ts +1 -0
- package/dist/ts4.2/room/data-track/outgoing/types.d.ts +1 -0
- package/dist/ts4.2/room/data-track/packet/extensions.d.ts +1 -0
- package/dist/ts4.2/room/data-track/packet/index.d.ts +1 -0
- package/dist/ts4.2/room/data-track/packet/serializable.d.ts +1 -0
- package/dist/ts4.2/room/participant/LocalParticipant.d.ts +1 -0
- package/dist/ts4.2/room/participant/Participant.d.ts +1 -0
- package/dist/ts4.2/room/track/Track.d.ts +1 -0
- package/dist/ts4.2/room/utils.d.ts +1 -0
- package/dist/ts4.2/type-polyfills/non-shared-typed-arrays.d.ts +2 -0
- package/dist/ts4.2/utils/dataPacketBuffer.d.ts +1 -0
- package/package.json +2 -2
- package/src/api/SignalClient.ts +1 -0
- package/src/e2ee/E2eeManager.ts +3 -1
- package/src/e2ee/types.ts +1 -0
- package/src/e2ee/utils.ts +1 -0
- package/src/e2ee/worker/DataCryptor.ts +1 -0
- package/src/e2ee/worker/FrameCryptor.test.ts +1 -0
- package/src/e2ee/worker/FrameCryptor.ts +1 -0
- package/src/e2ee/worker/ParticipantKeyHandler.test.ts +1 -0
- package/src/e2ee/worker/e2ee.worker.ts +1 -0
- package/src/e2ee/worker/naluUtils.ts +1 -0
- package/src/e2ee/worker/sifPayload.ts +1 -0
- package/src/frameMetadata/frameMetadata.test.ts +83 -0
- package/src/frameMetadata/frameMetadata.ts +8 -0
- package/src/frameMetadata/types.ts +1 -0
- package/src/room/PCTransport.test.ts +150 -0
- package/src/room/PCTransport.ts +113 -0
- package/src/room/RTCEngine.ts +1 -0
- package/src/room/Room.ts +1 -0
- package/src/room/data-track/depacketizer.ts +1 -0
- package/src/room/data-track/frame.ts +1 -0
- package/src/room/data-track/outgoing/types.ts +1 -0
- package/src/room/data-track/packet/extensions.ts +1 -0
- package/src/room/data-track/packet/index.ts +1 -0
- package/src/room/data-track/packet/serializable.ts +1 -0
- package/src/room/participant/LocalParticipant.ts +1 -0
- package/src/room/participant/Participant.ts +1 -0
- package/src/room/track/Track.ts +1 -0
- package/src/room/track/record.ts +1 -0
- package/src/room/utils.ts +1 -0
- package/src/type-polyfills/{non-shared-typed-arrays.d.ts → non-shared-typed-arrays.ts} +6 -1
- package/src/utils/dataPacketBuffer.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Track.d.ts","sourceRoot":"","sources":["../../../../src/room/track/Track.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,WAAW,IAAI,gBAAgB,EAC/B,WAAW,EACX,SAAS,EACV,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAY,EAAe,KAAK,gBAAgB,EAAa,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Track.d.ts","sourceRoot":"","sources":["../../../../src/room/track/Track.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAEjB,WAAW,IAAI,gBAAgB,EAC/B,WAAW,EACX,SAAS,EACV,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAY,EAAe,KAAK,gBAAgB,EAAa,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAExF,OAAO,KAAK,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,KAAK,IAAI,CAAC;IAC3D,sBAAsB,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5E,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,mBAAmB,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,eAAe,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,cAAc,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,eAAe,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACtC,oBAAoB,EAAE,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC5E,uBAAuB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5F,cAAc,EAAE,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9E,uBAAuB,EAAE,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACjE,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../src/room/track/record.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../src/room/track/record.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAa3C,QAAA,MAAM,YAAY;;;;CAEuC,CAAC;AAE1D,qBAAa,kBAAkB,CAAC,CAAC,SAAS,UAAU,CAAE,SAAQ,YAAY;IACxE,UAAU,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;gBAE3B,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,oBAAoB;CA8DrD;AAGD,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C"}
|
package/dist/src/room/utils.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChatMessage as ChatMessageModel, ClientInfo, ClientInfo_Capability, DisconnectReason, Transcription as TranscriptionModel } from '@livekit/protocol';
|
|
2
2
|
import { type Throws } from '@livekit/throws-transformer/throws';
|
|
3
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
3
4
|
import TypedPromise from '../utils/TypedPromise';
|
|
4
5
|
import type { BrowserDetails } from '../utils/browserParser';
|
|
5
6
|
import { type ConnectionError } from './errors';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/room/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,gBAAgB,EAC/B,UAAU,EACV,qBAAqB,EAErB,gBAAgB,EAChB,aAAa,IAAI,kBAAkB,EACpC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,UAAU,CAAC;AACvE,OAAO,KAAK,gBAAgB,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,iBAAiB,MAAM,iCAAiC,CAAC;AAErE,OAAO,KAAK,eAAe,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,oBAAo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shared-typed-arrays.d.ts","sourceRoot":"","sources":["../../../src/type-polyfills/non-shared-typed-arrays.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataPacketBuffer.d.ts","sourceRoot":"","sources":["../../../src/utils/dataPacketBuffer.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAwB;IAEtC,OAAO,CAAC,UAAU,CAAK;IAEvB,IAAI,CAAC,IAAI,EAAE,cAAc;IAKzB,GAAG,IAAI,cAAc,GAAG,SAAS;IAQjC,MAAM,IAAI,cAAc,EAAE;IAI1B,aAAa,CAAC,QAAQ,EAAE,MAAM;IAW9B,mBAAmB,CAAC,cAAc,EAAE,MAAM;IAU1C,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
|
1
|
+
{"version":3,"file":"dataPacketBuffer.d.ts","sourceRoot":"","sources":["../../../src/utils/dataPacketBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAErF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAwB;IAEtC,OAAO,CAAC,UAAU,CAAK;IAEvB,IAAI,CAAC,IAAI,EAAE,cAAc;IAKzB,GAAG,IAAI,cAAc,GAAG,SAAS;IAQjC,MAAM,IAAI,cAAc,EAAE;IAI1B,aAAa,CAAC,QAAQ,EAAE,MAAM;IAW9B,mBAAmB,CAAC,cAAc,EAAE,MAAM;IAU1C,IAAI,MAAM,IAAI,MAAM,CAEnB;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type TypedEventEmitter from 'typed-emitter';
|
|
2
2
|
import type RTCEngine from '../room/RTCEngine';
|
|
3
3
|
import type Room from '../room/Room';
|
|
4
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
4
5
|
import type { E2EEManagerCallbacks } from './events';
|
|
5
6
|
import type { DecryptDataResponseMessage, E2EEManagerOptions, EncryptDataResponseMessage } from './types';
|
|
6
7
|
export interface BaseE2EEManager {
|
|
@@ -2,6 +2,7 @@ import type { FrameMetadataPayload } from '../frameMetadata/frameMetadata';
|
|
|
2
2
|
import type { FrameMetadataPublishOptions } from '../frameMetadata/types';
|
|
3
3
|
import type { LogLevel } from '../logger';
|
|
4
4
|
import type { VideoCodec } from '../room/track/options';
|
|
5
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
5
6
|
import type { BaseE2EEManager } from './E2eeManager';
|
|
6
7
|
import type { BaseKeyProvider } from './KeyProvider';
|
|
7
8
|
export interface BaseMessage {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DataPacket } from '@livekit/protocol';
|
|
2
2
|
import { EncryptedPacketPayload } from '@livekit/protocol';
|
|
3
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
3
4
|
import type { KeyProviderOptions } from './types';
|
|
4
5
|
export declare function isE2EESupported(): boolean;
|
|
5
6
|
export declare function isScriptTransformSupported(): boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type TypedEventEmitter from 'typed-emitter';
|
|
2
2
|
import type { FrameMetadataPublishOptions } from '../../frameMetadata/types';
|
|
3
3
|
import type { VideoCodec } from '../../room/track/options';
|
|
4
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
4
5
|
import type { CryptorCallbacks } from '../events';
|
|
5
6
|
import type { KeyProviderOptions } from '../types';
|
|
6
7
|
import type { ParticipantKeyHandler } from './ParticipantKeyHandler';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* NALU (Network Abstraction Layer Unit) utilities for H.264 and H.265 video processing
|
|
3
3
|
* Contains functions for parsing and working with NALUs in video frames
|
|
4
4
|
*/
|
|
5
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
5
6
|
/**
|
|
6
7
|
* Detected codec type from NALU analysis
|
|
7
8
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { VideoCodec } from '../..';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
2
3
|
export declare const VP8KeyFrame8x8: NonSharedUint8Array;
|
|
3
4
|
export declare const H264KeyFrame2x2SPS: NonSharedUint8Array;
|
|
4
5
|
export declare const H264KeyFrame2x2PPS: NonSharedUint8Array;
|
|
@@ -2,6 +2,7 @@ import type { FrameMetadata, FrameMetadataPublishOptions } from './types';
|
|
|
2
2
|
export declare const PACKET_TRAILER_MAGIC: Uint8Array<ArrayBuffer>;
|
|
3
3
|
export declare const PACKET_TRAILER_TIMESTAMP_TAG = 1;
|
|
4
4
|
export declare const PACKET_TRAILER_FRAME_ID_TAG = 2;
|
|
5
|
+
export declare const PACKET_TRAILER_USER_DATA_TAG = 3;
|
|
5
6
|
export declare const PACKET_TRAILER_ENVELOPE_SIZE = 5;
|
|
6
7
|
export interface ExtractPacketTrailerResult {
|
|
7
8
|
data: Uint8Array;
|
|
@@ -2,6 +2,7 @@ import type { FrameMetadataPayload } from './frameMetadata';
|
|
|
2
2
|
export interface FrameMetadata {
|
|
3
3
|
userTimestamp: bigint;
|
|
4
4
|
frameId: number;
|
|
5
|
+
userData?: Uint8Array;
|
|
5
6
|
}
|
|
6
7
|
/** @deprecated Use {@link FrameMetadata} instead. */
|
|
7
8
|
export type PacketTrailerMetadata = FrameMetadata;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MediaAttributes } from 'sdp-transform';
|
|
1
|
+
import type { MediaAttributes, MediaDescription } from 'sdp-transform';
|
|
2
2
|
import type TypedEmitter from 'typed-emitter';
|
|
3
3
|
import type { LoggerOptions } from './types';
|
|
4
4
|
/** @internal */
|
|
@@ -54,6 +54,14 @@ export default class PCTransport extends PCTransport_base {
|
|
|
54
54
|
} | undefined>;
|
|
55
55
|
createAndSendOffer(options?: RTCOfferOptions): Promise<void>;
|
|
56
56
|
createAndSetAnswer(): Promise<RTCSessionDescriptionInit>;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the mids of transceivers that carry no outgoing track on this
|
|
59
|
+
* (publisher) connection: the pre-populated placeholders added by
|
|
60
|
+
* `RTCEngine.applyInitialPublisherLayout`, plus any transceiver that was used
|
|
61
|
+
* for a track and reverted on unpublish. Their codec fmtp is conformed to the
|
|
62
|
+
* published tracks so a shared payload type stays consistent across the bundle.
|
|
63
|
+
*/
|
|
64
|
+
private getPlaceholderMids;
|
|
57
65
|
createDataChannel(label: string, dataChannelDict: RTCDataChannelInit): RTCDataChannel;
|
|
58
66
|
addTransceiver(mediaStreamTrack: MediaStreamTrack, transceiverInit: RTCRtpTransceiverInit): RTCRtpTransceiver;
|
|
59
67
|
addTransceiverOfKind(kind: 'audio' | 'video', transceiverInit: RTCRtpTransceiverInit): RTCRtpTransceiver;
|
|
@@ -76,6 +84,37 @@ export default class PCTransport extends PCTransport_base {
|
|
|
76
84
|
private setMungedSDP;
|
|
77
85
|
private ensureVideoDDExtensionForSVC;
|
|
78
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Returns the mids of transceivers that carry no outgoing track: the
|
|
89
|
+
* pre-populated placeholders added by `RTCEngine.applyInitialPublisherLayout`,
|
|
90
|
+
* plus any transceiver that was used for a track and reverted on unpublish. The
|
|
91
|
+
* `sender.track` check is the reliable signal — an unpublished section keeps its
|
|
92
|
+
* `a=msid` (and its stale send-derived fmtp), so it can't be told apart from a
|
|
93
|
+
* real send by SDP alone. Transceiver mids are stable across renegotiations, so
|
|
94
|
+
* this works for every offer/answer after the first.
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
|
+
export declare function placeholderMidsFromTransceivers(transceivers: readonly RTCRtpTransceiver[]): Set<string>;
|
|
98
|
+
/**
|
|
99
|
+
* Within a BUNDLE group a payload type must map to identical codec parameters
|
|
100
|
+
* across every m-line. When the same payload type carries different fmtp between
|
|
101
|
+
* sections — e.g. opus `usedtx=1` on the published microphone but not on the
|
|
102
|
+
* pre-populated recvonly placeholders, or H.265 with different `level-id` between
|
|
103
|
+
* a published video track and a placeholder — libwebrtc flags a "bundled payload
|
|
104
|
+
* type collision".
|
|
105
|
+
*
|
|
106
|
+
* Rewrite the placeholder sections so every shared payload type carries the
|
|
107
|
+
* same fmtp. Real (non-placeholder) sections always win the canonical value, so
|
|
108
|
+
* a published track's encoder parameters are never altered. When no real
|
|
109
|
+
* section declares a payload type — e.g. a placeholder that was reused for a
|
|
110
|
+
* track and then reverted to recvonly keeps its send-derived `level-id` while
|
|
111
|
+
* fresh placeholders use the default — the placeholders still converge on the
|
|
112
|
+
* first value seen, so two placeholders can't disagree either. Only placeholder
|
|
113
|
+
* sections are ever rewritten, and it is codec-agnostic (opus, H.265, ...).
|
|
114
|
+
* `isPlaceholder` identifies the sections to conform.
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
export declare function conformBundledCodecFmtp(media: MediaDescription[], isPlaceholder: (media: MediaDescription) => boolean): void;
|
|
79
118
|
type PCTransportEventCallbacks = {
|
|
80
119
|
negotiationStarted: () => void;
|
|
81
120
|
negotiationComplete: () => void;
|
|
@@ -5,6 +5,7 @@ import type { SignalOptions } from '../api/SignalClient';
|
|
|
5
5
|
import { SignalClient } from '../api/SignalClient';
|
|
6
6
|
import type { BaseE2EEManager } from '../e2ee/E2eeManager';
|
|
7
7
|
import type { InternalRoomOptions } from '../options';
|
|
8
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
8
9
|
import PCTransport from './PCTransport';
|
|
9
10
|
import { PCTransportManager } from './PCTransportManager';
|
|
10
11
|
import { DataTrackInfo } from './data-track/types';
|
|
@@ -2,6 +2,7 @@ import { DataPacket_Kind, DisconnectReason, Encryption_Type, MetricsBatch, Parti
|
|
|
2
2
|
import 'webrtc-adapter';
|
|
3
3
|
import type TypedEmitter from 'typed-emitter';
|
|
4
4
|
import type { InternalRoomOptions, RoomConnectOptions, RoomOptions } from '../options';
|
|
5
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
5
6
|
import TypedPromise from '../utils/TypedPromise';
|
|
6
7
|
import RTCEngine, { DataChannelKind } from './RTCEngine';
|
|
7
8
|
import type { ByteStreamHandler, TextStreamHandler } from './data-stream/incoming/StreamReader';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
1
2
|
import { DataTrackExtensions } from './packet/extensions';
|
|
2
3
|
/** A pair of payload bytes and packet extensions which can be fed into a {@link DataTrackPacketizer}. */
|
|
3
4
|
export type DataTrackFrame = {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
2
3
|
import { DataTrackDeserializeError, DataTrackDeserializeErrorReason } from './errors';
|
|
3
4
|
import Serializable from './serializable';
|
|
4
5
|
export declare enum DataTrackExtensionTag {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
2
3
|
import { DataTrackHandle } from '../handle';
|
|
3
4
|
import { DataTrackTimestamp, U16_MAX_SIZE, WrapAroundUnsignedInt } from '../utils';
|
|
4
5
|
import { DataTrackDeserializeError, DataTrackSerializeError, DataTrackSerializeErrorReason } from './errors';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
2
3
|
import { DataTrackSerializeError } from './errors';
|
|
3
4
|
/** An abstract class implementing common behavior related to data track binary serialization. */
|
|
4
5
|
export default abstract class Serializable {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Codec, ParticipantInfo } from '@livekit/protocol';
|
|
2
2
|
import type { InternalRoomOptions } from '../../options';
|
|
3
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
3
4
|
import TypedPromise from '../../utils/TypedPromise';
|
|
4
5
|
import type RTCEngine from '../RTCEngine';
|
|
5
6
|
import type OutgoingDataStreamManager from '../data-stream/outgoing/OutgoingDataStreamManager';
|
|
@@ -2,6 +2,7 @@ import type { SipDTMF } from '@livekit/protocol';
|
|
|
2
2
|
import { DataPacket_Kind, Encryption_Type, ParticipantInfo, ParticipantInfo_Kind as ParticipantKind, ParticipantPermission, ConnectionQuality as ProtoQuality, SubscriptionError } from '@livekit/protocol';
|
|
3
3
|
import type TypedEmitter from 'typed-emitter';
|
|
4
4
|
import type { StructuredLogger } from '../../logger';
|
|
5
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
5
6
|
import type LocalTrackPublication from '../track/LocalTrackPublication';
|
|
6
7
|
import type LocalVideoTrack from '../track/LocalVideoTrack';
|
|
7
8
|
import type RemoteTrack from '../track/RemoteTrack';
|
|
@@ -2,6 +2,7 @@ import { AudioTrackFeature, StreamState as ProtoStreamState, TrackSource, TrackT
|
|
|
2
2
|
import type TypedEventEmitter from 'typed-emitter';
|
|
3
3
|
import type { SignalClient } from '../../api/SignalClient';
|
|
4
4
|
import type { StructuredLogger } from '../../logger';
|
|
5
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
5
6
|
import type { LoggerOptions } from '../types';
|
|
6
7
|
import type { TrackProcessor } from './processor/types';
|
|
7
8
|
export declare enum VideoQuality {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChatMessage as ChatMessageModel, ClientInfo, ClientInfo_Capability, DisconnectReason, Transcription as TranscriptionModel } from '@livekit/protocol';
|
|
2
2
|
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
3
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
3
4
|
import TypedPromise from '../utils/TypedPromise';
|
|
4
5
|
import type { BrowserDetails } from '../utils/browserParser';
|
|
5
6
|
import type { ConnectionError } from './errors';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "livekit-client",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.1",
|
|
4
4
|
"description": "JavaScript/TypeScript client SDK for LiveKit",
|
|
5
5
|
"main": "./dist/livekit-client.umd.js",
|
|
6
6
|
"unpkg": "./dist/livekit-client.umd.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"sdp-transform": "^2.15.0",
|
|
58
58
|
"tslib": "2.8.1",
|
|
59
59
|
"typed-emitter": "^2.1.0",
|
|
60
|
-
"webrtc-adapter": "9.0.
|
|
60
|
+
"webrtc-adapter": "9.0.6"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@types/dom-mediacapture-record": "^1"
|
package/src/api/SignalClient.ts
CHANGED
|
@@ -61,6 +61,7 @@ import { ConnectionError } from '../room/errors';
|
|
|
61
61
|
import CriticalTimers from '../room/timers';
|
|
62
62
|
import type { LoggerOptions } from '../room/types';
|
|
63
63
|
import { getClientInfo, isCompressionStreamSupported, isReactNative, sleep } from '../room/utils';
|
|
64
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
64
65
|
import { AsyncQueue } from '../utils/AsyncQueue';
|
|
65
66
|
import { type WebSocketConnection, WebSocketStream } from './WebSocketStream';
|
|
66
67
|
import {
|
package/src/e2ee/E2eeManager.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Encryption_Type, TrackInfo } from '@livekit/protocol';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import type TypedEventEmitter from 'typed-emitter';
|
|
4
|
+
import type { FrameMetadata } from '../frameMetadata/types';
|
|
4
5
|
import { hasFrameMetadataPublishOptions } from '../frameMetadata/utils';
|
|
5
6
|
import log, { LogLevel, workerLogger } from '../logger';
|
|
6
7
|
import type RTCEngine from '../room/RTCEngine';
|
|
@@ -20,6 +21,7 @@ import {
|
|
|
20
21
|
isScriptTransformSupportedForWorker,
|
|
21
22
|
isVideoTrack,
|
|
22
23
|
} from '../room/utils';
|
|
24
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
23
25
|
import type { BaseKeyProvider } from './KeyProvider';
|
|
24
26
|
import { E2EE_FLAG } from './constants';
|
|
25
27
|
import { type E2EEManagerCallbacks, EncryptionEvent, KeyProviderEvent } from './events';
|
|
@@ -246,7 +248,7 @@ export class E2EEManager
|
|
|
246
248
|
trackId: string,
|
|
247
249
|
rtpTimestamp: number,
|
|
248
250
|
ssrc: number,
|
|
249
|
-
metadata:
|
|
251
|
+
metadata: FrameMetadata,
|
|
250
252
|
) {
|
|
251
253
|
if (!this.room) {
|
|
252
254
|
return;
|
package/src/e2ee/types.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { FrameMetadataPayload } from '../frameMetadata/frameMetadata';
|
|
|
2
2
|
import type { FrameMetadataPublishOptions } from '../frameMetadata/types';
|
|
3
3
|
import type { LogLevel } from '../logger';
|
|
4
4
|
import type { VideoCodec } from '../room/track/options';
|
|
5
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
5
6
|
import type { BaseE2EEManager } from './E2eeManager';
|
|
6
7
|
import type { BaseKeyProvider } from './KeyProvider';
|
|
7
8
|
|
package/src/e2ee/utils.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type DataPacket, EncryptedPacketPayload } from '@livekit/protocol';
|
|
2
|
+
import type { NonSharedUint8Array } from '../type-polyfills/non-shared-typed-arrays';
|
|
2
3
|
import { ENCRYPTION_ALGORITHM } from './constants';
|
|
3
4
|
import type { KeyProviderOptions } from './types';
|
|
4
5
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { workerLogger } from '../../logger';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
2
3
|
import { ENCRYPTION_ALGORITHM } from '../constants';
|
|
3
4
|
import { CryptorError, CryptorErrorReason } from '../errors';
|
|
4
5
|
import type { DecodeRatchetOptions, KeySet, RatchetResult } from '../types';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { afterEach, describe, expect, it, vitest } from 'vitest';
|
|
2
2
|
import { appendPacketTrailer, extractPacketTrailer } from '../../frameMetadata/frameMetadata';
|
|
3
3
|
import type { FrameMetadataPublishOptions } from '../../frameMetadata/types';
|
|
4
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
4
5
|
import { IV_LENGTH, KEY_PROVIDER_DEFAULTS } from '../constants';
|
|
5
6
|
import { CryptorEvent } from '../events';
|
|
6
7
|
import type { KeyProviderOptions } from '../types';
|
|
@@ -10,6 +10,7 @@ import { hasFrameMetadataPublishOptions } from '../../frameMetadata/utils';
|
|
|
10
10
|
import { workerLogger } from '../../logger';
|
|
11
11
|
import { type VideoCodec, videoCodecs } from '../../room/track/options';
|
|
12
12
|
import { mimeTypeToVideoCodecString } from '../../room/track/utils';
|
|
13
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
13
14
|
import { ENCRYPTION_ALGORITHM, IV_LENGTH, UNENCRYPTED_BYTES } from '../constants';
|
|
14
15
|
import { CryptorError, CryptorErrorReason } from '../errors';
|
|
15
16
|
import { type CryptorCallbacks, CryptorEvent } from '../events';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it, test, vitest } from 'vitest';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
2
3
|
import { ENCRYPTION_ALGORITHM, KEY_PROVIDER_DEFAULTS } from '../constants';
|
|
3
4
|
import { KeyHandlerEvent } from '../events';
|
|
4
5
|
import { createKeyMaterialFromString, importKey } from '../utils';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { workerLogger } from '../../logger';
|
|
2
2
|
import type { VideoCodec } from '../../room/track/options';
|
|
3
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
3
4
|
import { AsyncQueue } from '../../utils/AsyncQueue';
|
|
4
5
|
import { KEY_PROVIDER_DEFAULTS } from '../constants';
|
|
5
6
|
import { CryptorErrorReason } from '../errors';
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* NALU (Network Abstraction Layer Unit) utilities for H.264 and H.265 video processing
|
|
3
3
|
* Contains functions for parsing and working with NALUs in video frames
|
|
4
4
|
*/
|
|
5
|
+
import type { NonSharedUint8Array } from '../../type-polyfills/non-shared-typed-arrays';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Mask for extracting NALU type from H.264 header byte
|
|
@@ -1,11 +1,57 @@
|
|
|
1
1
|
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
2
2
|
import {
|
|
3
|
+
PACKET_TRAILER_ENVELOPE_SIZE,
|
|
4
|
+
PACKET_TRAILER_FRAME_ID_TAG,
|
|
5
|
+
PACKET_TRAILER_MAGIC,
|
|
6
|
+
PACKET_TRAILER_TIMESTAMP_TAG,
|
|
7
|
+
PACKET_TRAILER_USER_DATA_TAG,
|
|
3
8
|
appendPacketTrailer,
|
|
4
9
|
appendPacketTrailerToEncodedFrame,
|
|
5
10
|
extractPacketTrailer,
|
|
6
11
|
processPacketTrailer,
|
|
7
12
|
} from './frameMetadata';
|
|
8
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Builds a packet trailer (XORed TLVs + envelope) for the given fields. The
|
|
16
|
+
* SDK only writes timestamp/frameId, so this mirrors the native sender's TLV
|
|
17
|
+
* encoding to exercise user_data extraction.
|
|
18
|
+
*/
|
|
19
|
+
function buildTrailer(
|
|
20
|
+
payload: Uint8Array,
|
|
21
|
+
fields: { userTimestamp?: bigint; frameId?: number; userData?: Uint8Array },
|
|
22
|
+
): Uint8Array {
|
|
23
|
+
const tlvs: number[] = [];
|
|
24
|
+
|
|
25
|
+
if (fields.userTimestamp !== undefined) {
|
|
26
|
+
tlvs.push(PACKET_TRAILER_TIMESTAMP_TAG ^ 0xff, 8 ^ 0xff);
|
|
27
|
+
for (let i = 7; i >= 0; i -= 1) {
|
|
28
|
+
tlvs.push(Number((fields.userTimestamp >> BigInt(i * 8)) & BigInt(0xff)) ^ 0xff);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (fields.frameId !== undefined) {
|
|
33
|
+
tlvs.push(PACKET_TRAILER_FRAME_ID_TAG ^ 0xff, 4 ^ 0xff);
|
|
34
|
+
for (let i = 3; i >= 0; i -= 1) {
|
|
35
|
+
tlvs.push(((fields.frameId >> (i * 8)) & 0xff) ^ 0xff);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (fields.userData !== undefined) {
|
|
40
|
+
tlvs.push(PACKET_TRAILER_USER_DATA_TAG ^ 0xff, fields.userData.length ^ 0xff);
|
|
41
|
+
for (const byte of fields.userData) {
|
|
42
|
+
tlvs.push(byte ^ 0xff);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const trailerLength = tlvs.length + PACKET_TRAILER_ENVELOPE_SIZE;
|
|
47
|
+
const result = new Uint8Array(payload.length + trailerLength);
|
|
48
|
+
result.set(payload, 0);
|
|
49
|
+
result.set(tlvs, payload.length);
|
|
50
|
+
result[payload.length + tlvs.length] = trailerLength ^ 0xff;
|
|
51
|
+
result.set(PACKET_TRAILER_MAGIC, payload.length + tlvs.length + 1);
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
|
|
9
55
|
describe('packetTrailer', () => {
|
|
10
56
|
afterEach(() => {
|
|
11
57
|
vi.useRealTimers();
|
|
@@ -47,6 +93,43 @@ describe('packetTrailer', () => {
|
|
|
47
93
|
});
|
|
48
94
|
});
|
|
49
95
|
|
|
96
|
+
it('extracts user_data from a trailer carrying only user_data', () => {
|
|
97
|
+
const payload = Uint8Array.from([1, 2, 3, 4]);
|
|
98
|
+
const userData = Uint8Array.from([0x00, 0x01, 0xfe, 0xff, 0x42]);
|
|
99
|
+
const trailer = buildTrailer(payload, { userData });
|
|
100
|
+
const extracted = extractPacketTrailer(trailer);
|
|
101
|
+
|
|
102
|
+
expect(Array.from(extracted.data)).toEqual(Array.from(payload));
|
|
103
|
+
expect(extracted.metadata?.userTimestamp).toBe(0n);
|
|
104
|
+
expect(extracted.metadata?.frameId).toBe(0);
|
|
105
|
+
expect(extracted.metadata?.userData).toBeInstanceOf(Uint8Array);
|
|
106
|
+
expect(Array.from(extracted.metadata!.userData!)).toEqual(Array.from(userData));
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it('extracts user_data alongside timestamp and frameId', () => {
|
|
110
|
+
const payload = Uint8Array.from([9, 8, 7, 6, 5]);
|
|
111
|
+
const userData = Uint8Array.from([10, 20, 30, 40]);
|
|
112
|
+
const trailer = buildTrailer(payload, {
|
|
113
|
+
userTimestamp: 1_744_249_600_123_456n,
|
|
114
|
+
frameId: 42,
|
|
115
|
+
userData,
|
|
116
|
+
});
|
|
117
|
+
const extracted = extractPacketTrailer(trailer);
|
|
118
|
+
|
|
119
|
+
expect(Array.from(extracted.data)).toEqual(Array.from(payload));
|
|
120
|
+
expect(extracted.metadata?.userTimestamp).toBe(1_744_249_600_123_456n);
|
|
121
|
+
expect(extracted.metadata?.frameId).toBe(42);
|
|
122
|
+
expect(Array.from(extracted.metadata!.userData!)).toEqual(Array.from(userData));
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('leaves userData undefined when no user_data tag is present', () => {
|
|
126
|
+
const payload = Uint8Array.from([1, 2, 3, 4]);
|
|
127
|
+
const trailer = appendPacketTrailer(payload, 1_744_249_600_123_456n, 42);
|
|
128
|
+
const extracted = extractPacketTrailer(trailer);
|
|
129
|
+
|
|
130
|
+
expect(extracted.metadata?.userData).toBeUndefined();
|
|
131
|
+
});
|
|
132
|
+
|
|
50
133
|
it('returns data unchanged when both timestamp and frameId are 0', () => {
|
|
51
134
|
const payload = Uint8Array.from([1, 2, 3, 4]);
|
|
52
135
|
const result = appendPacketTrailer(payload, 0n, 0);
|
|
@@ -10,6 +10,7 @@ export const PACKET_TRAILER_MAGIC = Uint8Array.from([
|
|
|
10
10
|
|
|
11
11
|
export const PACKET_TRAILER_TIMESTAMP_TAG = 0x01;
|
|
12
12
|
export const PACKET_TRAILER_FRAME_ID_TAG = 0x02;
|
|
13
|
+
export const PACKET_TRAILER_USER_DATA_TAG = 0x03;
|
|
13
14
|
export const PACKET_TRAILER_ENVELOPE_SIZE = 5;
|
|
14
15
|
|
|
15
16
|
const TIMESTAMP_TLV_SIZE = 10;
|
|
@@ -127,6 +128,13 @@ export function extractPacketTrailer(data: ArrayBuffer | Uint8Array): ExtractPac
|
|
|
127
128
|
} else if (tag === PACKET_TRAILER_FRAME_ID_TAG && length === 4) {
|
|
128
129
|
metadata.frameId = readUint32Xor(bytes, offset, length);
|
|
129
130
|
foundAny = true;
|
|
131
|
+
} else if (tag === PACKET_TRAILER_USER_DATA_TAG) {
|
|
132
|
+
const userData = new Uint8Array(length);
|
|
133
|
+
for (let index = 0; index < length; index += 1) {
|
|
134
|
+
userData[index] = bytes[offset + index] ^ 0xff;
|
|
135
|
+
}
|
|
136
|
+
metadata.userData = userData;
|
|
137
|
+
foundAny = true;
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
offset += length;
|