livekit-client 2.22.3 → 2.22.4
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/README.md +35 -0
- 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 +2 -1
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +602 -247
- 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 +2 -1
- 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 +4 -2
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/options.d.ts +14 -0
- package/dist/src/options.d.ts.map +1 -1
- package/dist/src/room/PCTransport.d.ts +78 -7
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/PCTransportManager.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +8 -0
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +1 -1
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/defaults.d.ts.map +1 -1
- package/dist/src/room/errors.d.ts +18 -0
- package/dist/src/room/errors.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +3 -2
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/rpc/client/RpcClientManager.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts +2 -0
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/utils.d.ts +13 -0
- package/dist/src/room/track/utils.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts +32 -0
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/test/compressionStreamStubs.d.ts +12 -0
- package/dist/src/test/compressionStreamStubs.d.ts.map +1 -0
- package/dist/ts4.2/api/SignalClient.d.ts +187 -185
- package/dist/ts4.2/api/SignalClientStateMachine.d.ts +85 -85
- package/dist/ts4.2/api/WebSocketStream.d.ts +33 -33
- package/dist/ts4.2/api/utils.d.ts +9 -9
- package/dist/ts4.2/connectionHelper/ConnectionCheck.d.ts +30 -30
- package/dist/ts4.2/connectionHelper/checks/Checker.d.ts +62 -62
- package/dist/ts4.2/connectionHelper/checks/cloudRegion.d.ts +18 -18
- package/dist/ts4.2/connectionHelper/checks/connectionProtocol.d.ts +20 -20
- package/dist/ts4.2/connectionHelper/checks/publishAudio.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/publishVideo.d.ts +7 -7
- package/dist/ts4.2/connectionHelper/checks/reconnect.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/turn.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/webrtc.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/websocket.d.ts +6 -6
- package/dist/ts4.2/e2ee/E2eeManager.d.ts +111 -111
- package/dist/ts4.2/e2ee/KeyProvider.d.ts +54 -54
- package/dist/ts4.2/e2ee/constants.d.ts +21 -21
- package/dist/ts4.2/e2ee/errors.d.ts +12 -12
- package/dist/ts4.2/e2ee/events.d.ts +39 -39
- package/dist/ts4.2/e2ee/index.d.ts +6 -6
- package/dist/ts4.2/e2ee/types.d.ts +231 -231
- package/dist/ts4.2/e2ee/utils.d.ts +32 -32
- package/dist/ts4.2/e2ee/worker/DataCryptor.d.ts +16 -16
- package/dist/ts4.2/e2ee/worker/ErrorRateLimiter.d.ts +21 -21
- package/dist/ts4.2/e2ee/worker/FrameCryptor.d.ts +209 -209
- package/dist/ts4.2/e2ee/worker/ParticipantKeyHandler.d.ts +81 -84
- package/dist/ts4.2/e2ee/worker/e2ee.worker.d.ts +2 -2
- package/dist/ts4.2/e2ee/worker/naluUtils.d.ts +28 -28
- package/dist/ts4.2/e2ee/worker/sifPayload.d.ts +23 -23
- package/dist/ts4.2/frameMetadata/FrameMetadataManager.d.ts +53 -53
- package/dist/ts4.2/frameMetadata/frameMetadata.d.ts +33 -33
- package/dist/ts4.2/frameMetadata/types.d.ts +62 -62
- package/dist/ts4.2/frameMetadata/utils.d.ts +9 -9
- package/dist/ts4.2/frameMetadata/worker/frameMetadata.worker.d.ts +2 -2
- package/dist/ts4.2/index.d.ts +76 -76
- package/dist/ts4.2/logger.d.ts +66 -66
- package/dist/ts4.2/options.d.ts +163 -149
- package/dist/ts4.2/room/BackOffStrategy.d.ts +27 -27
- package/dist/ts4.2/room/DefaultReconnectPolicy.d.ts +8 -8
- package/dist/ts4.2/room/DeviceManager.d.ts +12 -12
- package/dist/ts4.2/room/PCTransport.d.ts +246 -175
- package/dist/ts4.2/room/PCTransportManager.d.ts +77 -77
- package/dist/ts4.2/room/RTCEngine.d.ts +269 -262
- package/dist/ts4.2/room/ReconnectPolicy.d.ts +24 -24
- package/dist/ts4.2/room/RegionUrlProvider.d.ts +36 -36
- package/dist/ts4.2/room/Room.d.ts +354 -365
- package/dist/ts4.2/room/attribute-typings.d.ts +35 -35
- package/dist/ts4.2/room/data-channel/DataChannelManager.d.ts +62 -62
- package/dist/ts4.2/room/data-channel/FlowControlledDataChannel.d.ts +94 -95
- package/dist/ts4.2/room/data-channel/LossyDataChannel.d.ts +41 -41
- package/dist/ts4.2/room/data-channel/ReliableDataChannel.d.ts +57 -57
- package/dist/ts4.2/room/data-channel/types.d.ts +12 -12
- package/dist/ts4.2/room/data-stream/compression.d.ts +49 -49
- package/dist/ts4.2/room/data-stream/constants.d.ts +18 -18
- package/dist/ts4.2/room/data-stream/incoming/IncomingDataStreamManager.d.ts +29 -29
- package/dist/ts4.2/room/data-stream/incoming/StreamReader.d.ts +80 -80
- package/dist/ts4.2/room/data-stream/outgoing/OutgoingDataStreamManager.d.ts +73 -73
- package/dist/ts4.2/room/data-stream/outgoing/StreamWriter.d.ts +16 -16
- package/dist/ts4.2/room/data-stream/outgoing/header-utils.d.ts +18 -18
- package/dist/ts4.2/room/data-track/LocalDataTrack.d.ts +79 -80
- package/dist/ts4.2/room/data-track/RemoteDataTrack.d.ts +50 -50
- package/dist/ts4.2/room/data-track/depacketizer.d.ts +59 -59
- package/dist/ts4.2/room/data-track/frame.d.ts +22 -22
- package/dist/ts4.2/room/data-track/handle.d.ts +27 -27
- package/dist/ts4.2/room/data-track/incoming/IncomingDataTrackManager.d.ts +124 -124
- package/dist/ts4.2/room/data-track/incoming/errors.d.ts +24 -24
- package/dist/ts4.2/room/data-track/incoming/pipeline.d.ts +41 -41
- package/dist/ts4.2/room/data-track/incoming/types.d.ts +20 -20
- package/dist/ts4.2/room/data-track/outgoing/OutgoingDataTrackManager.d.ts +126 -126
- package/dist/ts4.2/room/data-track/outgoing/errors.d.ts +74 -74
- package/dist/ts4.2/room/data-track/outgoing/pipeline.d.ts +23 -23
- package/dist/ts4.2/room/data-track/outgoing/types.d.ts +48 -48
- package/dist/ts4.2/room/data-track/packet/constants.d.ts +20 -20
- package/dist/ts4.2/room/data-track/packet/errors.d.ts +40 -40
- package/dist/ts4.2/room/data-track/packet/extensions.d.ts +69 -69
- package/dist/ts4.2/room/data-track/packet/index.d.ts +98 -98
- package/dist/ts4.2/room/data-track/packet/serializable.d.ts +13 -13
- package/dist/ts4.2/room/data-track/packetizer.d.ts +43 -43
- package/dist/ts4.2/room/data-track/track-interfaces.d.ts +23 -23
- package/dist/ts4.2/room/data-track/types.d.ts +22 -22
- package/dist/ts4.2/room/data-track/utils.d.ts +60 -60
- package/dist/ts4.2/room/debounce.d.ts +11 -11
- package/dist/ts4.2/room/defaults.d.ts +9 -9
- package/dist/ts4.2/room/errors.d.ts +180 -162
- package/dist/ts4.2/room/events.d.ts +638 -637
- package/dist/ts4.2/room/participant/LocalParticipant.d.ts +287 -287
- package/dist/ts4.2/room/participant/Participant.d.ts +142 -144
- package/dist/ts4.2/room/participant/ParticipantTrackPermission.d.ts +26 -26
- package/dist/ts4.2/room/participant/RemoteParticipant.d.ts +85 -86
- package/dist/ts4.2/room/participant/publishUtils.d.ts +53 -53
- package/dist/ts4.2/room/rpc/client/RpcClientManager.d.ts +43 -43
- package/dist/ts4.2/room/rpc/client/events.d.ts +8 -8
- package/dist/ts4.2/room/rpc/index.d.ts +7 -7
- package/dist/ts4.2/room/rpc/server/RpcServerManager.d.ts +44 -44
- package/dist/ts4.2/room/rpc/server/events.d.ts +8 -8
- package/dist/ts4.2/room/rpc/utils.d.ts +131 -131
- package/dist/ts4.2/room/stats.d.ts +71 -71
- package/dist/ts4.2/room/statsSummary.d.ts +13 -13
- package/dist/ts4.2/room/timers.d.ts +12 -12
- package/dist/ts4.2/room/token-source/TokenSource.d.ts +82 -82
- package/dist/ts4.2/room/token-source/types.d.ts +70 -70
- package/dist/ts4.2/room/token-source/utils.d.ts +8 -8
- package/dist/ts4.2/room/track/FrameMetadataExtractor.d.ts +19 -19
- package/dist/ts4.2/room/track/LocalAudioTrack.d.ts +39 -42
- package/dist/ts4.2/room/track/LocalTrack.d.ts +125 -125
- package/dist/ts4.2/room/track/LocalTrackPublication.d.ts +42 -42
- package/dist/ts4.2/room/track/LocalVideoTrack.d.ts +102 -100
- package/dist/ts4.2/room/track/RemoteAudioTrack.d.ts +55 -55
- package/dist/ts4.2/room/track/RemoteTrack.d.ts +38 -38
- package/dist/ts4.2/room/track/RemoteTrackPublication.d.ts +72 -75
- package/dist/ts4.2/room/track/RemoteVideoTrack.d.ts +73 -76
- package/dist/ts4.2/room/track/Track.d.ts +156 -166
- package/dist/ts4.2/room/track/TrackPublication.d.ts +75 -81
- package/dist/ts4.2/room/track/create.d.ts +25 -25
- package/dist/ts4.2/room/track/facingMode.d.ts +41 -41
- package/dist/ts4.2/room/track/options.d.ts +403 -403
- package/dist/ts4.2/room/track/processor/types.d.ts +31 -31
- package/dist/ts4.2/room/track/record.d.ts +13 -13
- package/dist/ts4.2/room/track/types.d.ts +28 -28
- package/dist/ts4.2/room/track/utils.d.ts +60 -47
- package/dist/ts4.2/room/types.d.ts +127 -127
- package/dist/ts4.2/room/utils.d.ts +246 -214
- package/dist/ts4.2/test/MockMediaStreamTrack.d.ts +26 -26
- package/dist/ts4.2/test/compressionStreamStubs.d.ts +12 -0
- package/dist/ts4.2/test/mocks.d.ts +12 -12
- package/dist/ts4.2/test/promiseState.d.ts +12 -12
- package/dist/ts4.2/test/signalToken.d.ts +26 -26
- package/dist/ts4.2/type-polyfills/non-shared-typed-arrays.d.ts +2 -2
- package/dist/ts4.2/utils/AsyncQueue.d.ts +23 -23
- package/dist/ts4.2/utils/TypedPromise.d.ts +17 -17
- package/dist/ts4.2/utils/abort-signal-polyfill.d.ts +13 -13
- package/dist/ts4.2/utils/browserParser.d.ts +13 -13
- package/dist/ts4.2/utils/camelToSnakeCase.d.ts +8 -8
- package/dist/ts4.2/utils/cloneDeep.d.ts +2 -2
- package/dist/ts4.2/utils/dataPacketBuffer.d.ts +34 -34
- package/dist/ts4.2/utils/deferrable-map.d.ts +32 -32
- package/dist/ts4.2/utils/machineInspector.d.ts +54 -54
- package/dist/ts4.2/utils/serializer.d.ts +48 -48
- package/dist/ts4.2/utils/subscribeToEvents.d.ts +15 -15
- package/dist/ts4.2/utils/ttlmap.d.ts +20 -20
- package/dist/ts4.2/version.d.ts +15 -15
- package/package.json +5 -4
- package/src/api/SignalClient.e2e.test.ts +1 -3
- package/src/api/SignalClient.test.ts +160 -10
- package/src/api/SignalClient.ts +75 -54
- package/src/options.ts +16 -0
- package/src/room/PCTransport.test.ts +183 -7
- package/src/room/PCTransport.ts +197 -36
- package/src/room/PCTransportManager.ts +3 -1
- package/src/room/RTCEngine.test.ts +84 -0
- package/src/room/RTCEngine.ts +24 -5
- package/src/room/Room.test.ts +32 -6
- package/src/room/Room.ts +26 -6
- package/src/room/data-stream/incoming/IncomingDataStreamManager.test.ts +16 -20
- package/src/room/data-stream/incoming/IncomingDataStreamManager.ts +5 -5
- package/src/room/data-stream/outgoing/OutgoingDataStreamManager.test.ts +60 -39
- package/src/room/data-stream/outgoing/OutgoingDataStreamManager.ts +4 -4
- package/src/room/defaults.ts +1 -0
- package/src/room/errors.test.ts +36 -0
- package/src/room/errors.ts +27 -0
- package/src/room/events.ts +2 -1
- package/src/room/participant/publishUtils.ts +0 -19
- package/src/room/rpc/client/RpcClientManager.test.ts +51 -0
- package/src/room/rpc/client/RpcClientManager.ts +32 -15
- package/src/room/track/LocalTrack.ts +18 -7
- package/src/room/track/LocalVideoTrack.ts +10 -3
- package/src/room/track/RemoteAudioTrack.ts +3 -3
- package/src/room/track/RemoteVideoTrack.test.ts +210 -0
- package/src/room/track/RemoteVideoTrack.ts +29 -3
- package/src/room/track/utils.test.ts +201 -2
- package/src/room/track/utils.ts +88 -0
- package/src/room/utils.test.ts +124 -0
- package/src/room/utils.ts +70 -0
- package/src/test/compressionStreamStubs.ts +53 -0
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { LivekitReasonedError } from '../../errors';
|
|
2
|
-
import type { DataTrackHandleError } from '../handle';
|
|
3
|
-
export declare enum DataTrackDeserializeErrorReason {
|
|
4
|
-
TooShort = 0,
|
|
5
|
-
HeaderOverrun = 1,
|
|
6
|
-
MissingExtWords = 2,
|
|
7
|
-
UnsupportedVersion = 3,
|
|
8
|
-
InvalidHandle = 4,
|
|
9
|
-
MalformedExt = 5
|
|
10
|
-
}
|
|
11
|
-
export declare class DataTrackDeserializeError<Reason extends DataTrackDeserializeErrorReason = DataTrackDeserializeErrorReason> extends LivekitReasonedError<DataTrackDeserializeErrorReason> {
|
|
12
|
-
readonly name = "DataTrackDeserializeError";
|
|
13
|
-
reason: Reason;
|
|
14
|
-
reasonName: string;
|
|
15
|
-
cause?: Reason extends DataTrackDeserializeErrorReason.InvalidHandle ? DataTrackHandleError : never;
|
|
16
|
-
constructor(message: string, reason: Reason, options?: {
|
|
17
|
-
cause?: unknown;
|
|
18
|
-
});
|
|
19
|
-
static tooShort(): DataTrackDeserializeError<DataTrackDeserializeErrorReason.TooShort>;
|
|
20
|
-
static headerOverrun(): DataTrackDeserializeError<DataTrackDeserializeErrorReason.HeaderOverrun>;
|
|
21
|
-
static missingExtWords(): DataTrackDeserializeError<DataTrackDeserializeErrorReason.MissingExtWords>;
|
|
22
|
-
static unsupportedVersion(version: number): DataTrackDeserializeError<DataTrackDeserializeErrorReason.UnsupportedVersion>;
|
|
23
|
-
static invalidHandle(cause: DataTrackHandleError): DataTrackDeserializeError<DataTrackDeserializeErrorReason.InvalidHandle>;
|
|
24
|
-
static malformedExt(tag: number): DataTrackDeserializeError<DataTrackDeserializeErrorReason.MalformedExt>;
|
|
25
|
-
}
|
|
26
|
-
export declare enum DataTrackSerializeErrorReason {
|
|
27
|
-
TooSmallForHeader = 0,
|
|
28
|
-
TooSmallForPayload = 1
|
|
29
|
-
}
|
|
30
|
-
export declare class DataTrackSerializeError<Reason extends DataTrackSerializeErrorReason = DataTrackSerializeErrorReason> extends LivekitReasonedError<DataTrackSerializeErrorReason> {
|
|
31
|
-
readonly name = "DataTrackSerializeError";
|
|
32
|
-
reason: Reason;
|
|
33
|
-
reasonName: string;
|
|
34
|
-
constructor(message: string, reason: Reason, options?: {
|
|
35
|
-
cause?: unknown;
|
|
36
|
-
});
|
|
37
|
-
static tooSmallForHeader(): DataTrackSerializeError<DataTrackSerializeErrorReason.TooSmallForHeader>;
|
|
38
|
-
static tooSmallForPayload(): DataTrackSerializeError<DataTrackSerializeErrorReason.TooSmallForPayload>;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
1
|
+
import { LivekitReasonedError } from '../../errors';
|
|
2
|
+
import type { DataTrackHandleError } from '../handle';
|
|
3
|
+
export declare enum DataTrackDeserializeErrorReason {
|
|
4
|
+
TooShort = 0,
|
|
5
|
+
HeaderOverrun = 1,
|
|
6
|
+
MissingExtWords = 2,
|
|
7
|
+
UnsupportedVersion = 3,
|
|
8
|
+
InvalidHandle = 4,
|
|
9
|
+
MalformedExt = 5
|
|
10
|
+
}
|
|
11
|
+
export declare class DataTrackDeserializeError<Reason extends DataTrackDeserializeErrorReason = DataTrackDeserializeErrorReason> extends LivekitReasonedError<DataTrackDeserializeErrorReason> {
|
|
12
|
+
readonly name = "DataTrackDeserializeError";
|
|
13
|
+
reason: Reason;
|
|
14
|
+
reasonName: string;
|
|
15
|
+
cause?: Reason extends DataTrackDeserializeErrorReason.InvalidHandle ? DataTrackHandleError : never;
|
|
16
|
+
constructor(message: string, reason: Reason, options?: {
|
|
17
|
+
cause?: unknown;
|
|
18
|
+
});
|
|
19
|
+
static tooShort(): DataTrackDeserializeError<DataTrackDeserializeErrorReason.TooShort>;
|
|
20
|
+
static headerOverrun(): DataTrackDeserializeError<DataTrackDeserializeErrorReason.HeaderOverrun>;
|
|
21
|
+
static missingExtWords(): DataTrackDeserializeError<DataTrackDeserializeErrorReason.MissingExtWords>;
|
|
22
|
+
static unsupportedVersion(version: number): DataTrackDeserializeError<DataTrackDeserializeErrorReason.UnsupportedVersion>;
|
|
23
|
+
static invalidHandle(cause: DataTrackHandleError): DataTrackDeserializeError<DataTrackDeserializeErrorReason.InvalidHandle>;
|
|
24
|
+
static malformedExt(tag: number): DataTrackDeserializeError<DataTrackDeserializeErrorReason.MalformedExt>;
|
|
25
|
+
}
|
|
26
|
+
export declare enum DataTrackSerializeErrorReason {
|
|
27
|
+
TooSmallForHeader = 0,
|
|
28
|
+
TooSmallForPayload = 1
|
|
29
|
+
}
|
|
30
|
+
export declare class DataTrackSerializeError<Reason extends DataTrackSerializeErrorReason = DataTrackSerializeErrorReason> extends LivekitReasonedError<DataTrackSerializeErrorReason> {
|
|
31
|
+
readonly name = "DataTrackSerializeError";
|
|
32
|
+
reason: Reason;
|
|
33
|
+
reasonName: string;
|
|
34
|
+
constructor(message: string, reason: Reason, options?: {
|
|
35
|
+
cause?: unknown;
|
|
36
|
+
});
|
|
37
|
+
static tooSmallForHeader(): DataTrackSerializeError<DataTrackSerializeErrorReason.TooSmallForHeader>;
|
|
38
|
+
static tooSmallForPayload(): DataTrackSerializeError<DataTrackSerializeErrorReason.TooSmallForPayload>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
-
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
3
|
-
import { DataTrackDeserializeError, DataTrackDeserializeErrorReason } from './errors';
|
|
4
|
-
import Serializable from './serializable';
|
|
5
|
-
export declare enum DataTrackExtensionTag {
|
|
6
|
-
UserTimestamp = 2,
|
|
7
|
-
E2ee = 1
|
|
8
|
-
}
|
|
9
|
-
declare abstract class DataTrackExtension extends Serializable {
|
|
10
|
-
static tag: DataTrackExtensionTag;
|
|
11
|
-
static lengthBytes: number;
|
|
12
|
-
}
|
|
13
|
-
export declare class DataTrackUserTimestampExtension extends DataTrackExtension {
|
|
14
|
-
static tag: DataTrackExtensionTag;
|
|
15
|
-
static lengthBytes: number;
|
|
16
|
-
timestamp: bigint;
|
|
17
|
-
constructor(timestamp: bigint);
|
|
18
|
-
toBinaryLengthBytes(): number;
|
|
19
|
-
toBinaryInto(dataView: DataView): Throws<number, never>;
|
|
20
|
-
toJSON(): {
|
|
21
|
-
tag: number;
|
|
22
|
-
lengthBytes: number;
|
|
23
|
-
timestamp: bigint;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export declare class DataTrackE2eeExtension extends DataTrackExtension {
|
|
27
|
-
static tag: DataTrackExtensionTag;
|
|
28
|
-
static lengthBytes: number;
|
|
29
|
-
keyIndex: number;
|
|
30
|
-
iv: NonSharedUint8Array;
|
|
31
|
-
constructor(keyIndex: number, iv: NonSharedUint8Array);
|
|
32
|
-
toBinaryLengthBytes(): number;
|
|
33
|
-
toBinaryInto(dataView: DataView): Throws<number, never>;
|
|
34
|
-
toJSON(): {
|
|
35
|
-
tag: number;
|
|
36
|
-
lengthBytes: number;
|
|
37
|
-
keyIndex: number;
|
|
38
|
-
iv: Uint8Array
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export declare class DataTrackExtensions extends Serializable {
|
|
42
|
-
userTimestamp?: DataTrackUserTimestampExtension;
|
|
43
|
-
e2ee?: DataTrackE2eeExtension;
|
|
44
|
-
constructor(opts?: {
|
|
45
|
-
userTimestamp?: DataTrackUserTimestampExtension;
|
|
46
|
-
e2ee?: DataTrackE2eeExtension;
|
|
47
|
-
});
|
|
48
|
-
toBinaryLengthBytes(): number;
|
|
49
|
-
toBinaryInto(dataView: DataView): Throws<number, never>;
|
|
50
|
-
static fromBinary<Input extends DataView | ArrayBuffer | Uint8Array>(input: Input): Throws<[
|
|
51
|
-
extensions: DataTrackExtensions,
|
|
52
|
-
byteLength: number
|
|
53
|
-
], DataTrackDeserializeError<DataTrackDeserializeErrorReason.MalformedExt>>;
|
|
54
|
-
toJSON(): {
|
|
55
|
-
userTimestamp: {
|
|
56
|
-
tag: number;
|
|
57
|
-
lengthBytes: number;
|
|
58
|
-
timestamp: bigint;
|
|
59
|
-
} | null;
|
|
60
|
-
e2ee: {
|
|
61
|
-
tag: number;
|
|
62
|
-
lengthBytes: number;
|
|
63
|
-
keyIndex: number;
|
|
64
|
-
iv: Uint8Array
|
|
65
|
-
} | null;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export {};
|
|
69
|
-
//# sourceMappingURL=extensions.d.ts.map
|
|
1
|
+
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
3
|
+
import { DataTrackDeserializeError, DataTrackDeserializeErrorReason } from './errors';
|
|
4
|
+
import Serializable from './serializable';
|
|
5
|
+
export declare enum DataTrackExtensionTag {
|
|
6
|
+
UserTimestamp = 2,
|
|
7
|
+
E2ee = 1
|
|
8
|
+
}
|
|
9
|
+
declare abstract class DataTrackExtension extends Serializable {
|
|
10
|
+
static tag: DataTrackExtensionTag;
|
|
11
|
+
static lengthBytes: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class DataTrackUserTimestampExtension extends DataTrackExtension {
|
|
14
|
+
static tag: DataTrackExtensionTag;
|
|
15
|
+
static lengthBytes: number;
|
|
16
|
+
timestamp: bigint;
|
|
17
|
+
constructor(timestamp: bigint);
|
|
18
|
+
toBinaryLengthBytes(): number;
|
|
19
|
+
toBinaryInto(dataView: DataView): Throws<number, never>;
|
|
20
|
+
toJSON(): {
|
|
21
|
+
tag: number;
|
|
22
|
+
lengthBytes: number;
|
|
23
|
+
timestamp: bigint;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare class DataTrackE2eeExtension extends DataTrackExtension {
|
|
27
|
+
static tag: DataTrackExtensionTag;
|
|
28
|
+
static lengthBytes: number;
|
|
29
|
+
keyIndex: number;
|
|
30
|
+
iv: NonSharedUint8Array;
|
|
31
|
+
constructor(keyIndex: number, iv: NonSharedUint8Array);
|
|
32
|
+
toBinaryLengthBytes(): number;
|
|
33
|
+
toBinaryInto(dataView: DataView): Throws<number, never>;
|
|
34
|
+
toJSON(): {
|
|
35
|
+
tag: number;
|
|
36
|
+
lengthBytes: number;
|
|
37
|
+
keyIndex: number;
|
|
38
|
+
iv: Uint8Array;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export declare class DataTrackExtensions extends Serializable {
|
|
42
|
+
userTimestamp?: DataTrackUserTimestampExtension;
|
|
43
|
+
e2ee?: DataTrackE2eeExtension;
|
|
44
|
+
constructor(opts?: {
|
|
45
|
+
userTimestamp?: DataTrackUserTimestampExtension;
|
|
46
|
+
e2ee?: DataTrackE2eeExtension;
|
|
47
|
+
});
|
|
48
|
+
toBinaryLengthBytes(): number;
|
|
49
|
+
toBinaryInto(dataView: DataView): Throws<number, never>;
|
|
50
|
+
static fromBinary<Input extends DataView | ArrayBuffer | Uint8Array>(input: Input): Throws<[
|
|
51
|
+
extensions: DataTrackExtensions,
|
|
52
|
+
byteLength: number
|
|
53
|
+
], DataTrackDeserializeError<DataTrackDeserializeErrorReason.MalformedExt>>;
|
|
54
|
+
toJSON(): {
|
|
55
|
+
userTimestamp: {
|
|
56
|
+
tag: number;
|
|
57
|
+
lengthBytes: number;
|
|
58
|
+
timestamp: bigint;
|
|
59
|
+
} | null;
|
|
60
|
+
e2ee: {
|
|
61
|
+
tag: number;
|
|
62
|
+
lengthBytes: number;
|
|
63
|
+
keyIndex: number;
|
|
64
|
+
iv: Uint8Array;
|
|
65
|
+
} | null;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=extensions.d.ts.map
|
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
-
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
3
|
-
import { DataTrackHandle } from '../handle';
|
|
4
|
-
import { DataTrackTimestamp, U16_MAX_SIZE, WrapAroundUnsignedInt } from '../utils';
|
|
5
|
-
import { DataTrackDeserializeError, DataTrackSerializeError, DataTrackSerializeErrorReason } from './errors';
|
|
6
|
-
import { DataTrackExtensions } from './extensions';
|
|
7
|
-
import Serializable from './serializable';
|
|
8
|
-
/** A class for serializing / deserializing data track packet header sections. */
|
|
9
|
-
export declare class DataTrackPacketHeader extends Serializable {
|
|
10
|
-
marker: FrameMarker;
|
|
11
|
-
trackHandle: DataTrackHandle;
|
|
12
|
-
sequence: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
13
|
-
frameNumber: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
14
|
-
timestamp: DataTrackTimestamp<90000>;
|
|
15
|
-
extensions: DataTrackExtensions;
|
|
16
|
-
constructor(opts: {
|
|
17
|
-
marker: FrameMarker;
|
|
18
|
-
trackHandle: DataTrackHandle;
|
|
19
|
-
sequence: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
20
|
-
frameNumber: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
21
|
-
timestamp: DataTrackTimestamp<90000>;
|
|
22
|
-
extensions?: DataTrackExtensions;
|
|
23
|
-
});
|
|
24
|
-
private extensionsMetrics;
|
|
25
|
-
toBinaryLengthBytes(): number;
|
|
26
|
-
toBinaryInto(dataView: DataView): Throws<number, DataTrackSerializeError<DataTrackSerializeErrorReason.TooSmallForHeader>>;
|
|
27
|
-
static fromBinary<Input extends DataView | ArrayBuffer | Uint8Array>(input: Input): Throws<[
|
|
28
|
-
header: DataTrackPacketHeader,
|
|
29
|
-
byteLength: number
|
|
30
|
-
], DataTrackDeserializeError>;
|
|
31
|
-
toJSON(): {
|
|
32
|
-
marker: FrameMarker;
|
|
33
|
-
trackHandle: number;
|
|
34
|
-
sequence: number;
|
|
35
|
-
frameNumber: number;
|
|
36
|
-
timestamp: number;
|
|
37
|
-
extensions: {
|
|
38
|
-
userTimestamp: {
|
|
39
|
-
tag: number;
|
|
40
|
-
lengthBytes: number;
|
|
41
|
-
timestamp: bigint;
|
|
42
|
-
} | null;
|
|
43
|
-
e2ee: {
|
|
44
|
-
tag: number;
|
|
45
|
-
lengthBytes: number;
|
|
46
|
-
keyIndex: number;
|
|
47
|
-
iv: Uint8Array
|
|
48
|
-
} | null;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/** Marker indicating a packet's position in relation to a frame. */
|
|
53
|
-
export declare enum FrameMarker {
|
|
54
|
-
/** Packet is the first in a frame. */
|
|
55
|
-
Start = 0,
|
|
56
|
-
/** Packet is within a frame. */
|
|
57
|
-
Inter = 1,
|
|
58
|
-
/** Packet is the last in a frame. */
|
|
59
|
-
Final = 2,
|
|
60
|
-
/** Packet is the only one in a frame. */
|
|
61
|
-
Single = 3
|
|
62
|
-
}
|
|
63
|
-
/** A class for serializing / deserializing data track packets. */
|
|
64
|
-
export declare class DataTrackPacket extends Serializable {
|
|
65
|
-
header: DataTrackPacketHeader;
|
|
66
|
-
payload: NonSharedUint8Array;
|
|
67
|
-
constructor(header: DataTrackPacketHeader, payload: NonSharedUint8Array);
|
|
68
|
-
toBinaryLengthBytes(): number;
|
|
69
|
-
toBinaryInto(dataView: DataView): Throws<number, DataTrackSerializeError>;
|
|
70
|
-
static fromBinary<Input extends DataView | ArrayBuffer | Uint8Array>(input: Input): Throws<[
|
|
71
|
-
packet: DataTrackPacket,
|
|
72
|
-
byteLength: number
|
|
73
|
-
], DataTrackDeserializeError>;
|
|
74
|
-
toJSON(): {
|
|
75
|
-
header: {
|
|
76
|
-
marker: FrameMarker;
|
|
77
|
-
trackHandle: number;
|
|
78
|
-
sequence: number;
|
|
79
|
-
frameNumber: number;
|
|
80
|
-
timestamp: number;
|
|
81
|
-
extensions: {
|
|
82
|
-
userTimestamp: {
|
|
83
|
-
tag: number;
|
|
84
|
-
lengthBytes: number;
|
|
85
|
-
timestamp: bigint;
|
|
86
|
-
} | null;
|
|
87
|
-
e2ee: {
|
|
88
|
-
tag: number;
|
|
89
|
-
lengthBytes: number;
|
|
90
|
-
keyIndex: number;
|
|
91
|
-
iv: Uint8Array
|
|
92
|
-
} | null;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
payload: Uint8Array
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
3
|
+
import { DataTrackHandle } from '../handle';
|
|
4
|
+
import { DataTrackTimestamp, U16_MAX_SIZE, WrapAroundUnsignedInt } from '../utils';
|
|
5
|
+
import { DataTrackDeserializeError, DataTrackSerializeError, DataTrackSerializeErrorReason } from './errors';
|
|
6
|
+
import { DataTrackExtensions } from './extensions';
|
|
7
|
+
import Serializable from './serializable';
|
|
8
|
+
/** A class for serializing / deserializing data track packet header sections. */
|
|
9
|
+
export declare class DataTrackPacketHeader extends Serializable {
|
|
10
|
+
marker: FrameMarker;
|
|
11
|
+
trackHandle: DataTrackHandle;
|
|
12
|
+
sequence: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
13
|
+
frameNumber: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
14
|
+
timestamp: DataTrackTimestamp<90000>;
|
|
15
|
+
extensions: DataTrackExtensions;
|
|
16
|
+
constructor(opts: {
|
|
17
|
+
marker: FrameMarker;
|
|
18
|
+
trackHandle: DataTrackHandle;
|
|
19
|
+
sequence: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
20
|
+
frameNumber: WrapAroundUnsignedInt<typeof U16_MAX_SIZE>;
|
|
21
|
+
timestamp: DataTrackTimestamp<90000>;
|
|
22
|
+
extensions?: DataTrackExtensions;
|
|
23
|
+
});
|
|
24
|
+
private extensionsMetrics;
|
|
25
|
+
toBinaryLengthBytes(): number;
|
|
26
|
+
toBinaryInto(dataView: DataView): Throws<number, DataTrackSerializeError<DataTrackSerializeErrorReason.TooSmallForHeader>>;
|
|
27
|
+
static fromBinary<Input extends DataView | ArrayBuffer | Uint8Array>(input: Input): Throws<[
|
|
28
|
+
header: DataTrackPacketHeader,
|
|
29
|
+
byteLength: number
|
|
30
|
+
], DataTrackDeserializeError>;
|
|
31
|
+
toJSON(): {
|
|
32
|
+
marker: FrameMarker;
|
|
33
|
+
trackHandle: number;
|
|
34
|
+
sequence: number;
|
|
35
|
+
frameNumber: number;
|
|
36
|
+
timestamp: number;
|
|
37
|
+
extensions: {
|
|
38
|
+
userTimestamp: {
|
|
39
|
+
tag: number;
|
|
40
|
+
lengthBytes: number;
|
|
41
|
+
timestamp: bigint;
|
|
42
|
+
} | null;
|
|
43
|
+
e2ee: {
|
|
44
|
+
tag: number;
|
|
45
|
+
lengthBytes: number;
|
|
46
|
+
keyIndex: number;
|
|
47
|
+
iv: Uint8Array;
|
|
48
|
+
} | null;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** Marker indicating a packet's position in relation to a frame. */
|
|
53
|
+
export declare enum FrameMarker {
|
|
54
|
+
/** Packet is the first in a frame. */
|
|
55
|
+
Start = 0,
|
|
56
|
+
/** Packet is within a frame. */
|
|
57
|
+
Inter = 1,
|
|
58
|
+
/** Packet is the last in a frame. */
|
|
59
|
+
Final = 2,
|
|
60
|
+
/** Packet is the only one in a frame. */
|
|
61
|
+
Single = 3
|
|
62
|
+
}
|
|
63
|
+
/** A class for serializing / deserializing data track packets. */
|
|
64
|
+
export declare class DataTrackPacket extends Serializable {
|
|
65
|
+
header: DataTrackPacketHeader;
|
|
66
|
+
payload: NonSharedUint8Array;
|
|
67
|
+
constructor(header: DataTrackPacketHeader, payload: NonSharedUint8Array);
|
|
68
|
+
toBinaryLengthBytes(): number;
|
|
69
|
+
toBinaryInto(dataView: DataView): Throws<number, DataTrackSerializeError>;
|
|
70
|
+
static fromBinary<Input extends DataView | ArrayBuffer | Uint8Array>(input: Input): Throws<[
|
|
71
|
+
packet: DataTrackPacket,
|
|
72
|
+
byteLength: number
|
|
73
|
+
], DataTrackDeserializeError>;
|
|
74
|
+
toJSON(): {
|
|
75
|
+
header: {
|
|
76
|
+
marker: FrameMarker;
|
|
77
|
+
trackHandle: number;
|
|
78
|
+
sequence: number;
|
|
79
|
+
frameNumber: number;
|
|
80
|
+
timestamp: number;
|
|
81
|
+
extensions: {
|
|
82
|
+
userTimestamp: {
|
|
83
|
+
tag: number;
|
|
84
|
+
lengthBytes: number;
|
|
85
|
+
timestamp: bigint;
|
|
86
|
+
} | null;
|
|
87
|
+
e2ee: {
|
|
88
|
+
tag: number;
|
|
89
|
+
lengthBytes: number;
|
|
90
|
+
keyIndex: number;
|
|
91
|
+
iv: Uint8Array;
|
|
92
|
+
} | null;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
payload: Uint8Array;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
-
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
3
|
-
import { DataTrackSerializeError } from './errors';
|
|
4
|
-
/** An abstract class implementing common behavior related to data track binary serialization. */
|
|
5
|
-
export default abstract class Serializable {
|
|
6
|
-
/** Returns the expected length of the serialized output in bytes */
|
|
7
|
-
abstract toBinaryLengthBytes(): number;
|
|
8
|
-
/** Given a DataView, serialize the instance inside and return the number of bytes written. */
|
|
9
|
-
abstract toBinaryInto(dataView: DataView): Throws<number, DataTrackSerializeError>;
|
|
10
|
-
/** Encodes the instance as binary and returns the data as a Uint8Array. */
|
|
11
|
-
toBinary(): Throws<NonSharedUint8Array, DataTrackSerializeError>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=serializable.d.ts.map
|
|
1
|
+
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
+
import type { NonSharedUint8Array } from '../../../type-polyfills/non-shared-typed-arrays';
|
|
3
|
+
import { DataTrackSerializeError } from './errors';
|
|
4
|
+
/** An abstract class implementing common behavior related to data track binary serialization. */
|
|
5
|
+
export default abstract class Serializable {
|
|
6
|
+
/** Returns the expected length of the serialized output in bytes */
|
|
7
|
+
abstract toBinaryLengthBytes(): number;
|
|
8
|
+
/** Given a DataView, serialize the instance inside and return the number of bytes written. */
|
|
9
|
+
abstract toBinaryInto(dataView: DataView): Throws<number, DataTrackSerializeError>;
|
|
10
|
+
/** Encodes the instance as binary and returns the data as a Uint8Array. */
|
|
11
|
+
toBinary(): Throws<NonSharedUint8Array, DataTrackSerializeError>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=serializable.d.ts.map
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
-
import { LivekitReasonedError } from '../errors';
|
|
3
|
-
import type { DataTrackFrameInternal } from './frame';
|
|
4
|
-
import { DataTrackHandle } from './handle';
|
|
5
|
-
import { DataTrackPacket, FrameMarker } from './packet';
|
|
6
|
-
import { DataTrackTimestamp } from './utils';
|
|
7
|
-
type PacketizeOptions = {
|
|
8
|
-
/** "now" timestamp to use as a base when generating new packet timestamps. If not specified,
|
|
9
|
-
* defaults to the return value of {@link DataTrackClock#now}. */
|
|
10
|
-
now?: DataTrackTimestamp<90000>;
|
|
11
|
-
};
|
|
12
|
-
export declare class DataTrackPacketizerError<Reason extends DataTrackPacketizerReason = DataTrackPacketizerReason> extends LivekitReasonedError<Reason> {
|
|
13
|
-
readonly name = "DataTrackPacketizerError";
|
|
14
|
-
reason: Reason;
|
|
15
|
-
reasonName: string;
|
|
16
|
-
constructor(message: string, reason: Reason, options?: {
|
|
17
|
-
cause?: unknown;
|
|
18
|
-
});
|
|
19
|
-
static mtuTooShort(): DataTrackPacketizerError<DataTrackPacketizerReason>;
|
|
20
|
-
}
|
|
21
|
-
export declare enum DataTrackPacketizerReason {
|
|
22
|
-
MtuTooShort = 0
|
|
23
|
-
}
|
|
24
|
-
/** A packetizer takes a {@link DataTrackFrameInternal} as input and generates a series
|
|
25
|
-
* of {@link DataTrackPacket}s for transmission to other clients over webrtc. */
|
|
26
|
-
export default class DataTrackPacketizer {
|
|
27
|
-
private handle;
|
|
28
|
-
private mtuSizeBytes;
|
|
29
|
-
private sequence;
|
|
30
|
-
private frameNumber;
|
|
31
|
-
private clock;
|
|
32
|
-
constructor(trackHandle: DataTrackHandle, mtuSizeBytes: number);
|
|
33
|
-
/** @internal */
|
|
34
|
-
static computeFrameMarker(index: number, packetCount: number): FrameMarker;
|
|
35
|
-
/** Generates a series of packets for the specified {@link DataTrackFrameInternal}.
|
|
36
|
-
*
|
|
37
|
-
* NOTE: The return value of this function is a generator, so it can be lazily ran if desired,
|
|
38
|
-
* or converted to an array with {@link Array.from}.
|
|
39
|
-
*/
|
|
40
|
-
packetize(frame: DataTrackFrameInternal, options?: PacketizeOptions): Throws<Generator<DataTrackPacket>, DataTrackPacketizerError>;
|
|
41
|
-
}
|
|
42
|
-
export {};
|
|
43
|
-
//# sourceMappingURL=packetizer.d.ts.map
|
|
1
|
+
import type { Throws } from '@livekit/throws-transformer/throws';
|
|
2
|
+
import { LivekitReasonedError } from '../errors';
|
|
3
|
+
import type { DataTrackFrameInternal } from './frame';
|
|
4
|
+
import { DataTrackHandle } from './handle';
|
|
5
|
+
import { DataTrackPacket, FrameMarker } from './packet';
|
|
6
|
+
import { DataTrackTimestamp } from './utils';
|
|
7
|
+
type PacketizeOptions = {
|
|
8
|
+
/** "now" timestamp to use as a base when generating new packet timestamps. If not specified,
|
|
9
|
+
* defaults to the return value of {@link DataTrackClock#now}. */
|
|
10
|
+
now?: DataTrackTimestamp<90000>;
|
|
11
|
+
};
|
|
12
|
+
export declare class DataTrackPacketizerError<Reason extends DataTrackPacketizerReason = DataTrackPacketizerReason> extends LivekitReasonedError<Reason> {
|
|
13
|
+
readonly name = "DataTrackPacketizerError";
|
|
14
|
+
reason: Reason;
|
|
15
|
+
reasonName: string;
|
|
16
|
+
constructor(message: string, reason: Reason, options?: {
|
|
17
|
+
cause?: unknown;
|
|
18
|
+
});
|
|
19
|
+
static mtuTooShort(): DataTrackPacketizerError<DataTrackPacketizerReason>;
|
|
20
|
+
}
|
|
21
|
+
export declare enum DataTrackPacketizerReason {
|
|
22
|
+
MtuTooShort = 0
|
|
23
|
+
}
|
|
24
|
+
/** A packetizer takes a {@link DataTrackFrameInternal} as input and generates a series
|
|
25
|
+
* of {@link DataTrackPacket}s for transmission to other clients over webrtc. */
|
|
26
|
+
export default class DataTrackPacketizer {
|
|
27
|
+
private handle;
|
|
28
|
+
private mtuSizeBytes;
|
|
29
|
+
private sequence;
|
|
30
|
+
private frameNumber;
|
|
31
|
+
private clock;
|
|
32
|
+
constructor(trackHandle: DataTrackHandle, mtuSizeBytes: number);
|
|
33
|
+
/** @internal */
|
|
34
|
+
static computeFrameMarker(index: number, packetCount: number): FrameMarker;
|
|
35
|
+
/** Generates a series of packets for the specified {@link DataTrackFrameInternal}.
|
|
36
|
+
*
|
|
37
|
+
* NOTE: The return value of this function is a generator, so it can be lazily ran if desired,
|
|
38
|
+
* or converted to an array with {@link Array.from}.
|
|
39
|
+
*/
|
|
40
|
+
packetize(frame: DataTrackFrameInternal, options?: PacketizeOptions): Throws<Generator<DataTrackPacket>, DataTrackPacketizerError>;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=packetizer.d.ts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import type { DataTrackInfo } from './types';
|
|
2
|
-
export declare const TrackSymbol: symbol;
|
|
3
|
-
export interface ITrack {
|
|
4
|
-
readonly trackSymbol: typeof TrackSymbol;
|
|
5
|
-
}
|
|
6
|
-
/** An interface representing a track (of any type) which is local and sending data to the SFU. */
|
|
7
|
-
export interface ILocalTrack extends ITrack {
|
|
8
|
-
readonly isLocal: true;
|
|
9
|
-
isPublished(): boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const RemoteTrackSymbol: symbol;
|
|
12
|
-
/** An interface representing a track (of any type) which is remote and receiving data from the SFU. */
|
|
13
|
-
export interface IRemoteTrack extends ITrack {
|
|
14
|
-
readonly isLocal: false;
|
|
15
|
-
}
|
|
16
|
-
export declare const DataTrackSymbol: symbol;
|
|
17
|
-
/** An interface representing a data track, either local or remote. */
|
|
18
|
-
export interface IDataTrack extends ITrack {
|
|
19
|
-
readonly typeSymbol: typeof DataTrackSymbol;
|
|
20
|
-
readonly info?: DataTrackInfo;
|
|
21
|
-
}
|
|
22
|
-
export declare function isDataTrack(subject: unknown): subject is IDataTrack;
|
|
23
|
-
//# sourceMappingURL=track-interfaces.d.ts.map
|
|
1
|
+
import type { DataTrackInfo } from './types';
|
|
2
|
+
export declare const TrackSymbol: symbol;
|
|
3
|
+
export interface ITrack {
|
|
4
|
+
readonly trackSymbol: typeof TrackSymbol;
|
|
5
|
+
}
|
|
6
|
+
/** An interface representing a track (of any type) which is local and sending data to the SFU. */
|
|
7
|
+
export interface ILocalTrack extends ITrack {
|
|
8
|
+
readonly isLocal: true;
|
|
9
|
+
isPublished(): boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const RemoteTrackSymbol: symbol;
|
|
12
|
+
/** An interface representing a track (of any type) which is remote and receiving data from the SFU. */
|
|
13
|
+
export interface IRemoteTrack extends ITrack {
|
|
14
|
+
readonly isLocal: false;
|
|
15
|
+
}
|
|
16
|
+
export declare const DataTrackSymbol: symbol;
|
|
17
|
+
/** An interface representing a data track, either local or remote. */
|
|
18
|
+
export interface IDataTrack extends ITrack {
|
|
19
|
+
readonly typeSymbol: typeof DataTrackSymbol;
|
|
20
|
+
readonly info?: DataTrackInfo;
|
|
21
|
+
}
|
|
22
|
+
export declare function isDataTrack(subject: unknown): subject is IDataTrack;
|
|
23
|
+
//# sourceMappingURL=track-interfaces.d.ts.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { DataTrackInfo as ProtocolDataTrackInfo } from '@livekit/protocol';
|
|
2
|
-
import type { DataTrackHandle } from './handle';
|
|
3
|
-
export type DataTrackSid = string;
|
|
4
|
-
/** Information about a published data track. */
|
|
5
|
-
export type DataTrackInfo = {
|
|
6
|
-
sid: DataTrackSid;
|
|
7
|
-
pubHandle: DataTrackHandle;
|
|
8
|
-
name: string;
|
|
9
|
-
usesE2ee: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type RemoteDataTrackPipelineOptions = {
|
|
12
|
-
/** Set the maximum number of in-flight partial frames the depacketizer will track
|
|
13
|
-
* concurrently for this track. Higher values give more out-of-order tolerance for
|
|
14
|
-
* high-frequency senders. Defaults to 1.
|
|
15
|
-
*/
|
|
16
|
-
maxPartialFrames?: number;
|
|
17
|
-
};
|
|
18
|
-
export declare const DataTrackInfo: {
|
|
19
|
-
from(protocolInfo: ProtocolDataTrackInfo): DataTrackInfo;
|
|
20
|
-
toProtobuf(info: DataTrackInfo): ProtocolDataTrackInfo;
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
import { DataTrackInfo as ProtocolDataTrackInfo } from '@livekit/protocol';
|
|
2
|
+
import type { DataTrackHandle } from './handle';
|
|
3
|
+
export type DataTrackSid = string;
|
|
4
|
+
/** Information about a published data track. */
|
|
5
|
+
export type DataTrackInfo = {
|
|
6
|
+
sid: DataTrackSid;
|
|
7
|
+
pubHandle: DataTrackHandle;
|
|
8
|
+
name: string;
|
|
9
|
+
usesE2ee: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type RemoteDataTrackPipelineOptions = {
|
|
12
|
+
/** Set the maximum number of in-flight partial frames the depacketizer will track
|
|
13
|
+
* concurrently for this track. Higher values give more out-of-order tolerance for
|
|
14
|
+
* high-frequency senders. Defaults to 1.
|
|
15
|
+
*/
|
|
16
|
+
maxPartialFrames?: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const DataTrackInfo: {
|
|
19
|
+
from(protocolInfo: ProtocolDataTrackInfo): DataTrackInfo;
|
|
20
|
+
toProtobuf(info: DataTrackInfo): ProtocolDataTrackInfo;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=types.d.ts.map
|