livekit-client 2.22.2 → 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 +488 -438
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +954 -301
- 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 +10 -2
- 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/api/WebSocketStream.d.ts.map +1 -1
- package/dist/src/api/utils.d.ts +1 -0
- package/dist/src/api/utils.d.ts.map +1 -1
- package/dist/src/e2ee/E2eeManager.d.ts +26 -0
- package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
- package/dist/src/e2ee/types.d.ts +15 -1
- package/dist/src/e2ee/types.d.ts.map +1 -1
- package/dist/src/e2ee/worker/DataCryptor.d.ts.map +1 -1
- package/dist/src/e2ee/worker/ErrorRateLimiter.d.ts +21 -0
- package/dist/src/e2ee/worker/ErrorRateLimiter.d.ts.map +1 -0
- package/dist/src/e2ee/worker/FrameCryptor.d.ts +1 -18
- package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
- package/dist/src/logger.d.ts +4 -0
- package/dist/src/logger.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 +9 -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/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts +16 -0
- 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 +9 -0
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +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 +66 -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 -8
- 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 -85
- 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 -217
- 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 -0
- package/dist/ts4.2/e2ee/worker/FrameCryptor.d.ts +209 -226
- 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 -62
- 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 -261
- 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 -37
- 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 -93
- 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 -180
- 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/api/WebSocketStream.ts +3 -8
- package/src/api/utils.ts +10 -0
- package/src/e2ee/E2eeManager.test.ts +196 -0
- package/src/e2ee/E2eeManager.ts +114 -19
- package/src/e2ee/types.ts +19 -1
- package/src/e2ee/worker/DataCryptor.ts +2 -1
- package/src/e2ee/worker/ErrorRateLimiter.test.ts +53 -0
- package/src/e2ee/worker/ErrorRateLimiter.ts +52 -0
- package/src/e2ee/worker/FrameCryptor.ts +20 -70
- package/src/e2ee/worker/e2ee.worker.ts +34 -11
- package/src/logger.ts +22 -0
- 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 +52 -12
- package/src/room/Room.test.ts +32 -6
- package/src/room/Room.ts +27 -7
- 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/LocalParticipant.ts +30 -14
- package/src/room/participant/publishUtils.test.ts +133 -0
- package/src/room/participant/publishUtils.ts +54 -38
- 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 +25 -8
- 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/options.ts +1 -1
- package/src/room/track/utils.test.ts +201 -2
- package/src/room/track/utils.ts +88 -0
- package/src/room/utils.test.ts +211 -0
- package/src/room/utils.ts +129 -0
- package/src/test/compressionStreamStubs.ts +53 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/** one summarised stats entry; keys without a value are dropped */
|
|
2
|
-
type Summary = Record<string, unknown>;
|
|
3
|
-
/**
|
|
4
|
-
* Picks the interesting fields out of a `getStats()` report and groups them by
|
|
5
|
-
* RTP stream, so a stats dump can be read without unfolding the raw report.
|
|
6
|
-
*/
|
|
7
|
-
export declare function summarizeStatsReport(report: RTCStatsReport): {
|
|
8
|
-
connection: Summary | undefined;
|
|
9
|
-
outbound: Summary[] | undefined;
|
|
10
|
-
inbound: Summary[] | undefined;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=statsSummary.d.ts.map
|
|
1
|
+
/** one summarised stats entry; keys without a value are dropped */
|
|
2
|
+
type Summary = Record<string, unknown>;
|
|
3
|
+
/**
|
|
4
|
+
* Picks the interesting fields out of a `getStats()` report and groups them by
|
|
5
|
+
* RTP stream, so a stats dump can be read without unfolding the raw report.
|
|
6
|
+
*/
|
|
7
|
+
export declare function summarizeStatsReport(report: RTCStatsReport): {
|
|
8
|
+
connection: Summary | undefined;
|
|
9
|
+
outbound: Summary[] | undefined;
|
|
10
|
+
inbound: Summary[] | undefined;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=statsSummary.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Timers that can be overridden with platform specific implementations
|
|
3
|
-
* that ensure that they are fired. These should be used when it is critical
|
|
4
|
-
* that the timer fires on time.
|
|
5
|
-
*/
|
|
6
|
-
export default class CriticalTimers {
|
|
7
|
-
static setTimeout: (...args: Parameters<typeof setTimeout>) => ReturnType<typeof setTimeout>;
|
|
8
|
-
static setInterval: (...args: Parameters<typeof setInterval>) => ReturnType<typeof setInterval>;
|
|
9
|
-
static clearTimeout: (...args: Parameters<typeof clearTimeout>) => ReturnType<typeof clearTimeout>;
|
|
10
|
-
static clearInterval: (...args: Parameters<typeof clearInterval>) => ReturnType<typeof clearInterval>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=timers.d.ts.map
|
|
1
|
+
/**
|
|
2
|
+
* Timers that can be overridden with platform specific implementations
|
|
3
|
+
* that ensure that they are fired. These should be used when it is critical
|
|
4
|
+
* that the timer fires on time.
|
|
5
|
+
*/
|
|
6
|
+
export default class CriticalTimers {
|
|
7
|
+
static setTimeout: (...args: Parameters<typeof setTimeout>) => ReturnType<typeof setTimeout>;
|
|
8
|
+
static setInterval: (...args: Parameters<typeof setInterval>) => ReturnType<typeof setInterval>;
|
|
9
|
+
static clearTimeout: (...args: Parameters<typeof clearTimeout>) => ReturnType<typeof clearTimeout>;
|
|
10
|
+
static clearInterval: (...args: Parameters<typeof clearInterval>) => ReturnType<typeof clearInterval>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=timers.d.ts.map
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { TokenSourceResponse } from '@livekit/protocol';
|
|
2
|
-
import type { TokenSourceFetchOptions, TokenSourceResponseObject } from './types';
|
|
3
|
-
import { TokenSourceConfigurable, TokenSourceFixed } from './types';
|
|
4
|
-
import { areTokenSourceFetchOptionsEqual, decodeTokenPayload } from './utils';
|
|
5
|
-
/** A TokenSourceCached is a TokenSource which caches the last {@link TokenSourceResponseObject} value and returns it
|
|
6
|
-
* until a) it expires or b) the {@link TokenSourceFetchOptions} provided to .fetch(...) change. */
|
|
7
|
-
declare abstract class TokenSourceCached extends TokenSourceConfigurable {
|
|
8
|
-
private cachedFetchOptions;
|
|
9
|
-
private cachedResponse;
|
|
10
|
-
private fetchMutex;
|
|
11
|
-
private isSameAsCachedFetchOptions;
|
|
12
|
-
private shouldReturnCachedValueFromFetch;
|
|
13
|
-
getCachedResponseJwtPayload(): import("./types").TokenPayload | null;
|
|
14
|
-
fetch(options: TokenSourceFetchOptions, force?: boolean): Promise<TokenSourceResponseObject>;
|
|
15
|
-
protected abstract update(options: TokenSourceFetchOptions): Promise<TokenSourceResponse>;
|
|
16
|
-
}
|
|
17
|
-
type LiteralOrFn = TokenSourceResponseObject | (() => TokenSourceResponseObject | Promise<TokenSourceResponseObject>);
|
|
18
|
-
declare class TokenSourceLiteral extends TokenSourceFixed {
|
|
19
|
-
private literalOrFn;
|
|
20
|
-
constructor(literalOrFn: LiteralOrFn);
|
|
21
|
-
fetch(): Promise<TokenSourceResponseObject>;
|
|
22
|
-
}
|
|
23
|
-
type CustomFn = (options: TokenSourceFetchOptions) => TokenSourceResponseObject | Promise<TokenSourceResponseObject>;
|
|
24
|
-
declare class TokenSourceCustom extends TokenSourceCached {
|
|
25
|
-
private customFn;
|
|
26
|
-
constructor(customFn: CustomFn);
|
|
27
|
-
protected update(options: TokenSourceFetchOptions): Promise<TokenSourceResponse>;
|
|
28
|
-
}
|
|
29
|
-
export type EndpointOptions = Omit<RequestInit, 'body'>;
|
|
30
|
-
declare class TokenSourceEndpoint extends TokenSourceCached {
|
|
31
|
-
private url;
|
|
32
|
-
private endpointOptions;
|
|
33
|
-
constructor(url: string, options?: EndpointOptions);
|
|
34
|
-
private createRequestFromOptions;
|
|
35
|
-
protected update(options: TokenSourceFetchOptions): Promise<TokenSourceResponse>;
|
|
36
|
-
}
|
|
37
|
-
export type DevelopmentTokenServerOptions = {
|
|
38
|
-
baseUrl?: string;
|
|
39
|
-
};
|
|
40
|
-
declare class TokenSourceDevelopmentTokenServer extends TokenSourceEndpoint {
|
|
41
|
-
constructor(tokenServerId: string, options: DevelopmentTokenServerOptions);
|
|
42
|
-
}
|
|
43
|
-
/** @deprecated use {@link DevelopmentTokenServerOptions} instead */
|
|
44
|
-
export type SandboxTokenServerOptions = DevelopmentTokenServerOptions;
|
|
45
|
-
/** @deprecated Use {@link TokenSourceDevelopmentTokenServer} instead */
|
|
46
|
-
declare class TokenSourceSandboxTokenServer extends TokenSourceDevelopmentTokenServer {
|
|
47
|
-
}
|
|
48
|
-
export type { TokenSourceLiteral, TokenSourceCustom, TokenSourceEndpoint, TokenSourceSandboxTokenServer, TokenSourceDevelopmentTokenServer };
|
|
49
|
-
export { decodeTokenPayload, areTokenSourceFetchOptionsEqual };
|
|
50
|
-
export declare const TokenSource: {
|
|
51
|
-
/** TokenSource.literal contains a single, literal set of {@link TokenSourceResponseObject}
|
|
52
|
-
* credentials, either provided directly or returned from a provided function. */
|
|
53
|
-
literal(literalOrFn: LiteralOrFn): TokenSourceLiteral;
|
|
54
|
-
/**
|
|
55
|
-
* TokenSource.custom allows a user to define a manual function which generates new
|
|
56
|
-
* {@link TokenSourceResponseObject} values on demand.
|
|
57
|
-
*
|
|
58
|
-
* Use this to get credentials from custom backends / etc.
|
|
59
|
-
*/
|
|
60
|
-
custom(customFn: CustomFn): TokenSourceCustom;
|
|
61
|
-
/**
|
|
62
|
-
* TokenSource.endpoint creates a token source that fetches credentials from a given URL using
|
|
63
|
-
* the standard endpoint format:
|
|
64
|
-
* @see https://docs.livekit.io/frontends/build/authentication/endpoint/
|
|
65
|
-
*/
|
|
66
|
-
endpoint(url: string, options?: EndpointOptions): TokenSourceEndpoint;
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated Use {@link TokenSource.developmentTokenServer} instead
|
|
69
|
-
*/
|
|
70
|
-
sandboxTokenServer(sandboxId: string, options?: SandboxTokenServerOptions): TokenSourceSandboxTokenServer;
|
|
71
|
-
/**
|
|
72
|
-
* TokenSource.developmentTokenServer queries a development token server for credentials,
|
|
73
|
-
* which supports quick prototyping / getting started types of use cases.
|
|
74
|
-
*
|
|
75
|
-
* This token provider is INSECURE and should NOT be used in production.
|
|
76
|
-
*
|
|
77
|
-
* For more info:
|
|
78
|
-
* @see https://docs.livekit.io/frontends/build/authentication/sandbox-token-server/
|
|
79
|
-
*/
|
|
80
|
-
developmentTokenServer(tokenServerId: string, options?: DevelopmentTokenServerOptions): TokenSourceDevelopmentTokenServer;
|
|
81
|
-
};
|
|
82
|
-
//# sourceMappingURL=TokenSource.d.ts.map
|
|
1
|
+
import { TokenSourceResponse } from '@livekit/protocol';
|
|
2
|
+
import type { TokenSourceFetchOptions, TokenSourceResponseObject } from './types';
|
|
3
|
+
import { TokenSourceConfigurable, TokenSourceFixed } from './types';
|
|
4
|
+
import { areTokenSourceFetchOptionsEqual, decodeTokenPayload } from './utils';
|
|
5
|
+
/** A TokenSourceCached is a TokenSource which caches the last {@link TokenSourceResponseObject} value and returns it
|
|
6
|
+
* until a) it expires or b) the {@link TokenSourceFetchOptions} provided to .fetch(...) change. */
|
|
7
|
+
declare abstract class TokenSourceCached extends TokenSourceConfigurable {
|
|
8
|
+
private cachedFetchOptions;
|
|
9
|
+
private cachedResponse;
|
|
10
|
+
private fetchMutex;
|
|
11
|
+
private isSameAsCachedFetchOptions;
|
|
12
|
+
private shouldReturnCachedValueFromFetch;
|
|
13
|
+
getCachedResponseJwtPayload(): import("./types").TokenPayload | null;
|
|
14
|
+
fetch(options: TokenSourceFetchOptions, force?: boolean): Promise<TokenSourceResponseObject>;
|
|
15
|
+
protected abstract update(options: TokenSourceFetchOptions): Promise<TokenSourceResponse>;
|
|
16
|
+
}
|
|
17
|
+
type LiteralOrFn = TokenSourceResponseObject | (() => TokenSourceResponseObject | Promise<TokenSourceResponseObject>);
|
|
18
|
+
declare class TokenSourceLiteral extends TokenSourceFixed {
|
|
19
|
+
private literalOrFn;
|
|
20
|
+
constructor(literalOrFn: LiteralOrFn);
|
|
21
|
+
fetch(): Promise<TokenSourceResponseObject>;
|
|
22
|
+
}
|
|
23
|
+
type CustomFn = (options: TokenSourceFetchOptions) => TokenSourceResponseObject | Promise<TokenSourceResponseObject>;
|
|
24
|
+
declare class TokenSourceCustom extends TokenSourceCached {
|
|
25
|
+
private customFn;
|
|
26
|
+
constructor(customFn: CustomFn);
|
|
27
|
+
protected update(options: TokenSourceFetchOptions): Promise<TokenSourceResponse>;
|
|
28
|
+
}
|
|
29
|
+
export type EndpointOptions = Omit<RequestInit, 'body'>;
|
|
30
|
+
declare class TokenSourceEndpoint extends TokenSourceCached {
|
|
31
|
+
private url;
|
|
32
|
+
private endpointOptions;
|
|
33
|
+
constructor(url: string, options?: EndpointOptions);
|
|
34
|
+
private createRequestFromOptions;
|
|
35
|
+
protected update(options: TokenSourceFetchOptions): Promise<TokenSourceResponse>;
|
|
36
|
+
}
|
|
37
|
+
export type DevelopmentTokenServerOptions = {
|
|
38
|
+
baseUrl?: string;
|
|
39
|
+
};
|
|
40
|
+
declare class TokenSourceDevelopmentTokenServer extends TokenSourceEndpoint {
|
|
41
|
+
constructor(tokenServerId: string, options: DevelopmentTokenServerOptions);
|
|
42
|
+
}
|
|
43
|
+
/** @deprecated use {@link DevelopmentTokenServerOptions} instead */
|
|
44
|
+
export type SandboxTokenServerOptions = DevelopmentTokenServerOptions;
|
|
45
|
+
/** @deprecated Use {@link TokenSourceDevelopmentTokenServer} instead */
|
|
46
|
+
declare class TokenSourceSandboxTokenServer extends TokenSourceDevelopmentTokenServer {
|
|
47
|
+
}
|
|
48
|
+
export type { TokenSourceLiteral, TokenSourceCustom, TokenSourceEndpoint, TokenSourceSandboxTokenServer, TokenSourceDevelopmentTokenServer };
|
|
49
|
+
export { decodeTokenPayload, areTokenSourceFetchOptionsEqual };
|
|
50
|
+
export declare const TokenSource: {
|
|
51
|
+
/** TokenSource.literal contains a single, literal set of {@link TokenSourceResponseObject}
|
|
52
|
+
* credentials, either provided directly or returned from a provided function. */
|
|
53
|
+
literal(literalOrFn: LiteralOrFn): TokenSourceLiteral;
|
|
54
|
+
/**
|
|
55
|
+
* TokenSource.custom allows a user to define a manual function which generates new
|
|
56
|
+
* {@link TokenSourceResponseObject} values on demand.
|
|
57
|
+
*
|
|
58
|
+
* Use this to get credentials from custom backends / etc.
|
|
59
|
+
*/
|
|
60
|
+
custom(customFn: CustomFn): TokenSourceCustom;
|
|
61
|
+
/**
|
|
62
|
+
* TokenSource.endpoint creates a token source that fetches credentials from a given URL using
|
|
63
|
+
* the standard endpoint format:
|
|
64
|
+
* @see https://docs.livekit.io/frontends/build/authentication/endpoint/
|
|
65
|
+
*/
|
|
66
|
+
endpoint(url: string, options?: EndpointOptions): TokenSourceEndpoint;
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Use {@link TokenSource.developmentTokenServer} instead
|
|
69
|
+
*/
|
|
70
|
+
sandboxTokenServer(sandboxId: string, options?: SandboxTokenServerOptions): TokenSourceSandboxTokenServer;
|
|
71
|
+
/**
|
|
72
|
+
* TokenSource.developmentTokenServer queries a development token server for credentials,
|
|
73
|
+
* which supports quick prototyping / getting started types of use cases.
|
|
74
|
+
*
|
|
75
|
+
* This token provider is INSECURE and should NOT be used in production.
|
|
76
|
+
*
|
|
77
|
+
* For more info:
|
|
78
|
+
* @see https://docs.livekit.io/frontends/build/authentication/sandbox-token-server/
|
|
79
|
+
*/
|
|
80
|
+
developmentTokenServer(tokenServerId: string, options?: DevelopmentTokenServerOptions): TokenSourceDevelopmentTokenServer;
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=TokenSource.d.ts.map
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { RoomConfiguration, TokenSourceRequest, TokenSourceResponse } from '@livekit/protocol';
|
|
2
|
-
import type { JWTPayload } from 'jose';
|
|
3
|
-
import type { ValueToSnakeCase } from '../../utils/camelToSnakeCase';
|
|
4
|
-
export type TokenSourceRequestObject = Required<NonNullable<ConstructorParameters<typeof TokenSourceRequest>[0]>>;
|
|
5
|
-
export type TokenSourceResponseObject = Required<NonNullable<ConstructorParameters<typeof TokenSourceResponse>[0]>>;
|
|
6
|
-
/** The `TokenSource` request object sent to the server as part of fetching a configurable
|
|
7
|
-
* `TokenSource` like {@link TokenSourceEndpoint}.
|
|
8
|
-
*
|
|
9
|
-
* Use this as a type for your request body if implementing a server endpoint in node.js.
|
|
10
|
-
*/
|
|
11
|
-
export type TokenSourceRequestPayload = ValueToSnakeCase<TokenSourceRequestObject>;
|
|
12
|
-
/** The `TokenSource` response object sent from the server as part of fetching a configurable
|
|
13
|
-
* `TokenSource` like {@link TokenSourceEndpoint}.
|
|
14
|
-
*
|
|
15
|
-
* Use this as a type for your response body if implementing a server endpoint in node.js.
|
|
16
|
-
*/
|
|
17
|
-
export type TokenSourceResponsePayload = ValueToSnakeCase<TokenSourceResponseObject>;
|
|
18
|
-
/** The payload of a LiveKit JWT token. */
|
|
19
|
-
export type TokenPayload = JWTPayload & {
|
|
20
|
-
name?: string;
|
|
21
|
-
metadata?: string;
|
|
22
|
-
attributes?: Record<string, string>;
|
|
23
|
-
video?: {
|
|
24
|
-
room?: string;
|
|
25
|
-
roomJoin?: boolean;
|
|
26
|
-
canPublish?: boolean;
|
|
27
|
-
canPublishData?: boolean;
|
|
28
|
-
canSubscribe?: boolean;
|
|
29
|
-
};
|
|
30
|
-
roomConfig?: RoomConfigurationObject;
|
|
31
|
-
};
|
|
32
|
-
export type RoomConfigurationObject = NonNullable<ConstructorParameters<typeof RoomConfiguration>[0]>;
|
|
33
|
-
/** A Fixed TokenSource is a token source that takes no parameters and returns a completely
|
|
34
|
-
* independently derived value on each fetch() call.
|
|
35
|
-
*
|
|
36
|
-
* The most common downstream implementer is {@link TokenSourceLiteral}.
|
|
37
|
-
*/
|
|
38
|
-
export declare abstract class TokenSourceFixed {
|
|
39
|
-
abstract fetch(): Promise<TokenSourceResponseObject>;
|
|
40
|
-
}
|
|
41
|
-
export type TokenSourceFetchOptions = {
|
|
42
|
-
roomName?: string;
|
|
43
|
-
participantName?: string;
|
|
44
|
-
participantIdentity?: string;
|
|
45
|
-
participantMetadata?: string;
|
|
46
|
-
participantAttributes?: {
|
|
47
|
-
[key: string]: string;
|
|
48
|
-
};
|
|
49
|
-
agentName?: string;
|
|
50
|
-
agentMetadata?: string;
|
|
51
|
-
deployment?: string;
|
|
52
|
-
};
|
|
53
|
-
/** A Configurable TokenSource is a token source that takes a
|
|
54
|
-
* {@link TokenSourceFetchOptions} object as input and returns a deterministic
|
|
55
|
-
* {@link TokenSourceResponseObject} output based on the options specified.
|
|
56
|
-
*
|
|
57
|
-
* For example, if options.participantName is set, it should be expected that
|
|
58
|
-
* all tokens that are generated will have participant name field set to the
|
|
59
|
-
* provided value.
|
|
60
|
-
*
|
|
61
|
-
* A few common downstream implementers are {@link TokenSourceEndpoint}
|
|
62
|
-
* and {@link TokenSourceCustom}.
|
|
63
|
-
*/
|
|
64
|
-
export declare abstract class TokenSourceConfigurable {
|
|
65
|
-
abstract fetch(options: TokenSourceFetchOptions): Promise<TokenSourceResponseObject>;
|
|
66
|
-
abstract fetch(options: TokenSourceFetchOptions, force?: boolean): Promise<TokenSourceResponseObject>;
|
|
67
|
-
}
|
|
68
|
-
/** A TokenSource is a mechanism for fetching credentials required to connect to a LiveKit Room. */
|
|
69
|
-
export type TokenSourceBase = TokenSourceFixed | TokenSourceConfigurable;
|
|
70
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
import { RoomConfiguration, TokenSourceRequest, TokenSourceResponse } from '@livekit/protocol';
|
|
2
|
+
import type { JWTPayload } from 'jose';
|
|
3
|
+
import type { ValueToSnakeCase } from '../../utils/camelToSnakeCase';
|
|
4
|
+
export type TokenSourceRequestObject = Required<NonNullable<ConstructorParameters<typeof TokenSourceRequest>[0]>>;
|
|
5
|
+
export type TokenSourceResponseObject = Required<NonNullable<ConstructorParameters<typeof TokenSourceResponse>[0]>>;
|
|
6
|
+
/** The `TokenSource` request object sent to the server as part of fetching a configurable
|
|
7
|
+
* `TokenSource` like {@link TokenSourceEndpoint}.
|
|
8
|
+
*
|
|
9
|
+
* Use this as a type for your request body if implementing a server endpoint in node.js.
|
|
10
|
+
*/
|
|
11
|
+
export type TokenSourceRequestPayload = ValueToSnakeCase<TokenSourceRequestObject>;
|
|
12
|
+
/** The `TokenSource` response object sent from the server as part of fetching a configurable
|
|
13
|
+
* `TokenSource` like {@link TokenSourceEndpoint}.
|
|
14
|
+
*
|
|
15
|
+
* Use this as a type for your response body if implementing a server endpoint in node.js.
|
|
16
|
+
*/
|
|
17
|
+
export type TokenSourceResponsePayload = ValueToSnakeCase<TokenSourceResponseObject>;
|
|
18
|
+
/** The payload of a LiveKit JWT token. */
|
|
19
|
+
export type TokenPayload = JWTPayload & {
|
|
20
|
+
name?: string;
|
|
21
|
+
metadata?: string;
|
|
22
|
+
attributes?: Record<string, string>;
|
|
23
|
+
video?: {
|
|
24
|
+
room?: string;
|
|
25
|
+
roomJoin?: boolean;
|
|
26
|
+
canPublish?: boolean;
|
|
27
|
+
canPublishData?: boolean;
|
|
28
|
+
canSubscribe?: boolean;
|
|
29
|
+
};
|
|
30
|
+
roomConfig?: RoomConfigurationObject;
|
|
31
|
+
};
|
|
32
|
+
export type RoomConfigurationObject = NonNullable<ConstructorParameters<typeof RoomConfiguration>[0]>;
|
|
33
|
+
/** A Fixed TokenSource is a token source that takes no parameters and returns a completely
|
|
34
|
+
* independently derived value on each fetch() call.
|
|
35
|
+
*
|
|
36
|
+
* The most common downstream implementer is {@link TokenSourceLiteral}.
|
|
37
|
+
*/
|
|
38
|
+
export declare abstract class TokenSourceFixed {
|
|
39
|
+
abstract fetch(): Promise<TokenSourceResponseObject>;
|
|
40
|
+
}
|
|
41
|
+
export type TokenSourceFetchOptions = {
|
|
42
|
+
roomName?: string;
|
|
43
|
+
participantName?: string;
|
|
44
|
+
participantIdentity?: string;
|
|
45
|
+
participantMetadata?: string;
|
|
46
|
+
participantAttributes?: {
|
|
47
|
+
[key: string]: string;
|
|
48
|
+
};
|
|
49
|
+
agentName?: string;
|
|
50
|
+
agentMetadata?: string;
|
|
51
|
+
deployment?: string;
|
|
52
|
+
};
|
|
53
|
+
/** A Configurable TokenSource is a token source that takes a
|
|
54
|
+
* {@link TokenSourceFetchOptions} object as input and returns a deterministic
|
|
55
|
+
* {@link TokenSourceResponseObject} output based on the options specified.
|
|
56
|
+
*
|
|
57
|
+
* For example, if options.participantName is set, it should be expected that
|
|
58
|
+
* all tokens that are generated will have participant name field set to the
|
|
59
|
+
* provided value.
|
|
60
|
+
*
|
|
61
|
+
* A few common downstream implementers are {@link TokenSourceEndpoint}
|
|
62
|
+
* and {@link TokenSourceCustom}.
|
|
63
|
+
*/
|
|
64
|
+
export declare abstract class TokenSourceConfigurable {
|
|
65
|
+
abstract fetch(options: TokenSourceFetchOptions): Promise<TokenSourceResponseObject>;
|
|
66
|
+
abstract fetch(options: TokenSourceFetchOptions, force?: boolean): Promise<TokenSourceResponseObject>;
|
|
67
|
+
}
|
|
68
|
+
/** A TokenSource is a mechanism for fetching credentials required to connect to a LiveKit Room. */
|
|
69
|
+
export type TokenSourceBase = TokenSourceFixed | TokenSourceConfigurable;
|
|
70
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { TokenSourceResponse } from '@livekit/protocol';
|
|
2
|
-
import type { TokenPayload, TokenSourceFetchOptions } from './types';
|
|
3
|
-
export declare function isResponseTokenValid(response: TokenSourceResponse): boolean;
|
|
4
|
-
/** Given a LiveKit generated participant token, decodes and returns the associated {@link TokenPayload} data. */
|
|
5
|
-
export declare function decodeTokenPayload(token: string): TokenPayload;
|
|
6
|
-
/** Given two TokenSourceFetchOptions values, check to see if they are deep equal. */
|
|
7
|
-
export declare function areTokenSourceFetchOptionsEqual(a: TokenSourceFetchOptions, b: TokenSourceFetchOptions): boolean;
|
|
8
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
1
|
+
import type { TokenSourceResponse } from '@livekit/protocol';
|
|
2
|
+
import type { TokenPayload, TokenSourceFetchOptions } from './types';
|
|
3
|
+
export declare function isResponseTokenValid(response: TokenSourceResponse): boolean;
|
|
4
|
+
/** Given a LiveKit generated participant token, decodes and returns the associated {@link TokenPayload} data. */
|
|
5
|
+
export declare function decodeTokenPayload(token: string): TokenPayload;
|
|
6
|
+
/** Given two TokenSourceFetchOptions values, check to see if they are deep equal. */
|
|
7
|
+
export declare function areTokenSourceFetchOptionsEqual(a: TokenSourceFetchOptions, b: TokenSourceFetchOptions): boolean;
|
|
8
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { FrameMetadata } from '../../frameMetadata/types';
|
|
2
|
-
/**
|
|
3
|
-
* Caches frame metadata extracted from received video frames,
|
|
4
|
-
* keyed by RTP timestamp so it can be looked up when the frame is displayed.
|
|
5
|
-
*
|
|
6
|
-
* Metadata is populated either by the frame metadata worker managed by
|
|
7
|
-
* `FrameMetadataManager` (non-E2EE) or by the E2EE FrameCryptor worker
|
|
8
|
-
* after decryption (E2EE).
|
|
9
|
-
*
|
|
10
|
-
* @experimental
|
|
11
|
-
*/
|
|
12
|
-
export declare class FrameMetadataExtractor {
|
|
13
|
-
private metadataMap;
|
|
14
|
-
private activeSsrc;
|
|
15
|
-
storeMetadata(rtpTimestamp: number, ssrc: number, metadata: FrameMetadata): void;
|
|
16
|
-
lookupMetadata(rtpTimestamp: number): FrameMetadata | undefined;
|
|
17
|
-
dispose(): void;
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=FrameMetadataExtractor.d.ts.map
|
|
1
|
+
import type { FrameMetadata } from '../../frameMetadata/types';
|
|
2
|
+
/**
|
|
3
|
+
* Caches frame metadata extracted from received video frames,
|
|
4
|
+
* keyed by RTP timestamp so it can be looked up when the frame is displayed.
|
|
5
|
+
*
|
|
6
|
+
* Metadata is populated either by the frame metadata worker managed by
|
|
7
|
+
* `FrameMetadataManager` (non-E2EE) or by the E2EE FrameCryptor worker
|
|
8
|
+
* after decryption (E2EE).
|
|
9
|
+
*
|
|
10
|
+
* @experimental
|
|
11
|
+
*/
|
|
12
|
+
export declare class FrameMetadataExtractor {
|
|
13
|
+
private metadataMap;
|
|
14
|
+
private activeSsrc;
|
|
15
|
+
storeMetadata(rtpTimestamp: number, ssrc: number, metadata: FrameMetadata): void;
|
|
16
|
+
lookupMetadata(rtpTimestamp: number): FrameMetadata | undefined;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=FrameMetadataExtractor.d.ts.map
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import type { AudioSenderStats } from '../stats';
|
|
2
|
-
import type { LoggerOptions } from '../types';
|
|
3
|
-
import LocalTrack from './LocalTrack';
|
|
4
|
-
import { Track } from './Track';
|
|
5
|
-
import type { AudioCaptureOptions } from './options';
|
|
6
|
-
import type { AudioProcessorOptions, TrackProcessor } from './processor/types';
|
|
7
|
-
export default class LocalAudioTrack extends LocalTrack<Track.Kind.Audio> {
|
|
8
|
-
/** @internal */
|
|
9
|
-
stopOnMute: boolean;
|
|
10
|
-
private prevStats?;
|
|
11
|
-
private isKrispNoiseFilterEnabled;
|
|
12
|
-
protected processor?: TrackProcessor<Track.Kind.Audio, AudioProcessorOptions> | undefined;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
checkForSilence(): Promise<boolean>;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=LocalAudioTrack.d.ts.map
|
|
1
|
+
import type { AudioSenderStats } from '../stats';
|
|
2
|
+
import type { LoggerOptions } from '../types';
|
|
3
|
+
import LocalTrack from './LocalTrack';
|
|
4
|
+
import { Track } from './Track';
|
|
5
|
+
import type { AudioCaptureOptions } from './options';
|
|
6
|
+
import type { AudioProcessorOptions, TrackProcessor } from './processor/types';
|
|
7
|
+
export default class LocalAudioTrack extends LocalTrack<Track.Kind.Audio> {
|
|
8
|
+
/** @internal */
|
|
9
|
+
stopOnMute: boolean;
|
|
10
|
+
private prevStats?;
|
|
11
|
+
private isKrispNoiseFilterEnabled;
|
|
12
|
+
protected processor?: TrackProcessor<Track.Kind.Audio, AudioProcessorOptions> | undefined;
|
|
13
|
+
get enhancedNoiseCancellation(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param mediaTrack
|
|
17
|
+
* @param constraints MediaTrackConstraints that are being used when restarting or reacquiring tracks
|
|
18
|
+
* @param userProvidedTrack Signals to the SDK whether or not the mediaTrack should be managed (i.e. released and reacquired) internally by the SDK
|
|
19
|
+
*/
|
|
20
|
+
constructor(mediaTrack: MediaStreamTrack, constraints?: MediaTrackConstraints, userProvidedTrack?: boolean, audioContext?: AudioContext, loggerOptions?: LoggerOptions);
|
|
21
|
+
mute(): Promise<typeof this>;
|
|
22
|
+
unmute(): Promise<typeof this>;
|
|
23
|
+
restartTrack(options?: AudioCaptureOptions): Promise<void>;
|
|
24
|
+
applyConstraints(constraints: Pick<AudioCaptureOptions, 'autoGainControl' | 'noiseSuppression' | 'echoCancellation' | 'voiceIsolation'>): Promise<void>;
|
|
25
|
+
protected restart(constraints?: MediaTrackConstraints, isUnmuting?: boolean): Promise<typeof this>;
|
|
26
|
+
startMonitor(): void;
|
|
27
|
+
protected monitorSender: () => Promise<void>;
|
|
28
|
+
private handleKrispNoiseFilterEnable;
|
|
29
|
+
private handleKrispNoiseFilterDisable;
|
|
30
|
+
setProcessor(processor: TrackProcessor<Track.Kind.Audio, AudioProcessorOptions>): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
* @experimental
|
|
34
|
+
*/
|
|
35
|
+
setAudioContext(audioContext: AudioContext | undefined): void;
|
|
36
|
+
getSenderStats(): Promise<AudioSenderStats | undefined>;
|
|
37
|
+
checkForSilence(): Promise<boolean>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=LocalAudioTrack.d.ts.map
|