@livekit/rtc-node 0.13.23 → 0.13.25
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/audio_filter.cjs +2 -2
- package/dist/audio_filter.cjs.map +1 -1
- package/dist/audio_filter.js +1 -1
- package/dist/audio_filter.js.map +1 -1
- package/dist/audio_frame.cjs +11 -7
- package/dist/audio_frame.cjs.map +1 -1
- package/dist/audio_frame.d.cts +3 -8
- package/dist/audio_frame.d.ts +3 -8
- package/dist/audio_frame.d.ts.map +1 -1
- package/dist/audio_frame.js +10 -6
- package/dist/audio_frame.js.map +1 -1
- package/dist/audio_mixer.cjs +11 -4
- package/dist/audio_mixer.cjs.map +1 -1
- package/dist/audio_mixer.d.cts +1 -6
- package/dist/audio_mixer.d.ts +1 -6
- package/dist/audio_mixer.d.ts.map +1 -1
- package/dist/audio_mixer.js +11 -4
- package/dist/audio_mixer.js.map +1 -1
- package/dist/audio_resampler.cjs +20 -12
- package/dist/audio_resampler.cjs.map +1 -1
- package/dist/audio_resampler.d.cts +6 -6
- package/dist/audio_resampler.d.ts +6 -6
- package/dist/audio_resampler.d.ts.map +1 -1
- package/dist/audio_resampler.js +12 -4
- package/dist/audio_resampler.js.map +1 -1
- package/dist/audio_source.cjs +11 -7
- package/dist/audio_source.cjs.map +1 -1
- package/dist/audio_source.d.cts +1 -7
- package/dist/audio_source.d.ts +1 -7
- package/dist/audio_source.d.ts.map +1 -1
- package/dist/audio_source.js +8 -3
- package/dist/audio_source.js.map +1 -1
- package/dist/audio_stream.cjs +17 -5
- package/dist/audio_stream.cjs.map +1 -1
- package/dist/audio_stream.d.cts +1 -14
- package/dist/audio_stream.d.ts +1 -14
- package/dist/audio_stream.d.ts.map +1 -1
- package/dist/audio_stream.js +16 -4
- package/dist/audio_stream.js.map +1 -1
- package/dist/data_streams/index.d.cts +2 -10
- package/dist/data_streams/index.d.ts +2 -10
- package/dist/data_streams/stream_reader.cjs +8 -0
- package/dist/data_streams/stream_reader.cjs.map +1 -1
- package/dist/data_streams/stream_reader.d.cts +2 -10
- package/dist/data_streams/stream_reader.d.ts +2 -10
- package/dist/data_streams/stream_reader.d.ts.map +1 -1
- package/dist/data_streams/stream_reader.js +8 -0
- package/dist/data_streams/stream_reader.js.map +1 -1
- package/dist/data_streams/stream_writer.d.cts +2 -10
- package/dist/data_streams/stream_writer.d.ts +2 -10
- package/dist/data_streams/types.cjs.map +1 -1
- package/dist/data_streams/types.d.cts +2 -10
- package/dist/data_streams/types.d.ts +2 -10
- package/dist/data_streams/types.d.ts.map +1 -1
- package/dist/e2ee.cjs +21 -21
- package/dist/e2ee.cjs.map +1 -1
- package/dist/e2ee.d.cts +1 -2
- package/dist/e2ee.d.ts +1 -2
- package/dist/e2ee.d.ts.map +1 -1
- package/dist/e2ee.js +2 -2
- package/dist/e2ee.js.map +1 -1
- package/dist/ffi_client.cjs +11 -12
- package/dist/ffi_client.cjs.map +1 -1
- package/dist/ffi_client.d.cts +3 -16
- package/dist/ffi_client.d.ts +3 -16
- package/dist/ffi_client.d.ts.map +1 -1
- package/dist/ffi_client.js +5 -3
- package/dist/ffi_client.js.map +1 -1
- package/dist/frame_processor.cjs +13 -2
- package/dist/frame_processor.cjs.map +1 -1
- package/dist/frame_processor.d.cts +5 -8
- package/dist/frame_processor.d.ts +5 -8
- package/dist/frame_processor.d.ts.map +1 -1
- package/dist/frame_processor.js +10 -1
- package/dist/frame_processor.js.map +1 -1
- package/dist/index.cjs +25 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -16
- package/dist/index.d.ts +3 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/log.cjs +1 -10
- package/dist/log.cjs.map +1 -1
- package/dist/log.d.cts +4 -0
- package/dist/log.d.ts +4 -0
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +1 -10
- package/dist/log.js.map +1 -1
- package/dist/participant.cjs +38 -38
- package/dist/participant.cjs.map +1 -1
- package/dist/participant.d.cts +2 -15
- package/dist/participant.d.ts +2 -15
- package/dist/participant.d.ts.map +1 -1
- package/dist/participant.js +12 -12
- package/dist/participant.js.map +1 -1
- package/dist/room.cjs +48 -30
- package/dist/room.cjs.map +1 -1
- package/dist/room.d.cts +11 -16
- package/dist/room.d.ts +11 -16
- package/dist/room.d.ts.map +1 -1
- package/dist/room.js +44 -26
- package/dist/room.js.map +1 -1
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.cts +1 -2
- package/dist/rpc.d.ts +1 -2
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js.map +1 -1
- package/dist/{stream_reader-Ch2zvjU3.d.cts → stream_reader-CuG4b8Y-.d.cts} +1 -1
- package/dist/{stream_reader-DRyR29vo.d.ts → stream_reader-CuG4b8Y-.d.ts} +1 -1
- package/dist/track.cjs +3 -3
- package/dist/track.cjs.map +1 -1
- package/dist/track.d.cts +1 -14
- package/dist/track.d.ts +1 -14
- package/dist/track.d.ts.map +1 -1
- package/dist/track.js +1 -1
- package/dist/track.js.map +1 -1
- package/dist/track_publication.cjs +4 -4
- package/dist/track_publication.cjs.map +1 -1
- package/dist/track_publication.d.cts +1 -14
- package/dist/track_publication.d.ts +1 -14
- package/dist/track_publication.d.ts.map +1 -1
- package/dist/track_publication.js +2 -2
- package/dist/track_publication.js.map +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.cjs.map +1 -1
- package/dist/version.d.cts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/video_frame.cjs +42 -42
- package/dist/video_frame.cjs.map +1 -1
- package/dist/video_frame.d.cts +1 -6
- package/dist/video_frame.d.ts +1 -6
- package/dist/video_frame.d.ts.map +1 -1
- package/dist/video_frame.js +2 -2
- package/dist/video_frame.js.map +1 -1
- package/dist/video_source.cjs +5 -5
- package/dist/video_source.cjs.map +1 -1
- package/dist/video_source.d.cts +1 -14
- package/dist/video_source.d.ts +1 -14
- package/dist/video_source.d.ts.map +1 -1
- package/dist/video_source.js +2 -2
- package/dist/video_source.js.map +1 -1
- package/dist/video_stream.cjs +12 -4
- package/dist/video_stream.cjs.map +1 -1
- package/dist/video_stream.d.cts +1 -14
- package/dist/video_stream.d.ts +1 -14
- package/dist/video_stream.d.ts.map +1 -1
- package/dist/video_stream.js +10 -2
- package/dist/video_stream.js.map +1 -1
- package/package.json +9 -35
- package/src/audio_filter.ts +2 -2
- package/src/audio_frame.ts +26 -7
- package/src/audio_mixer.ts +15 -4
- package/src/audio_resampler.ts +14 -4
- package/src/audio_source.ts +13 -5
- package/src/audio_stream.ts +21 -5
- package/src/data_streams/stream_reader.ts +19 -1
- package/src/data_streams/types.ts +1 -1
- package/src/e2ee.ts +3 -3
- package/src/ffi_client.ts +7 -5
- package/src/frame_processor.ts +21 -0
- package/src/index.ts +6 -5
- package/src/log.ts +14 -10
- package/src/participant.ts +17 -17
- package/src/room.ts +65 -38
- package/src/rpc.ts +1 -1
- package/src/tests/e2e.test.ts +517 -0
- package/src/track.ts +4 -4
- package/src/track_publication.ts +6 -6
- package/src/version.ts +1 -1
- package/src/video_frame.ts +3 -3
- package/src/video_source.ts +3 -3
- package/src/video_stream.ts +15 -3
- package/Cargo.toml +0 -25
- package/build.rs +0 -9
- package/dist/napi/native.cjs +0 -301
- package/dist/napi/native.d.cjs +0 -17
- package/dist/napi/native.d.cjs.map +0 -1
- package/dist/napi/native.d.d.cts +0 -21
- package/dist/napi/native.d.d.ts +0 -21
- package/dist/napi/native.d.js +0 -1
- package/dist/napi/native.d.js.map +0 -1
- package/dist/napi/native.d.ts +0 -19
- package/dist/napi/native.js +0 -15
- package/dist/native.cjs +0 -301
- package/dist/native.d.ts +0 -19
- package/dist/native.js +0 -15
- package/dist/proto/audio_frame_pb.cjs +0 -1357
- package/dist/proto/audio_frame_pb.cjs.map +0 -1
- package/dist/proto/audio_frame_pb.d.cts +0 -1183
- package/dist/proto/audio_frame_pb.d.ts +0 -1183
- package/dist/proto/audio_frame_pb.d.ts.map +0 -1
- package/dist/proto/audio_frame_pb.js +0 -1283
- package/dist/proto/audio_frame_pb.js.map +0 -1
- package/dist/proto/data_stream_pb.cjs +0 -1638
- package/dist/proto/data_stream_pb.cjs.map +0 -1
- package/dist/proto/data_stream_pb.d.cts +0 -1449
- package/dist/proto/data_stream_pb.d.ts +0 -1449
- package/dist/proto/data_stream_pb.d.ts.map +0 -1
- package/dist/proto/data_stream_pb.js +0 -1559
- package/dist/proto/data_stream_pb.js.map +0 -1
- package/dist/proto/e2ee_pb.cjs +0 -746
- package/dist/proto/e2ee_pb.cjs.map +0 -1
- package/dist/proto/e2ee_pb.d.cts +0 -653
- package/dist/proto/e2ee_pb.d.ts +0 -653
- package/dist/proto/e2ee_pb.d.ts.map +0 -1
- package/dist/proto/e2ee_pb.js +0 -696
- package/dist/proto/e2ee_pb.js.map +0 -1
- package/dist/proto/ffi_pb.cjs +0 -477
- package/dist/proto/ffi_pb.cjs.map +0 -1
- package/dist/proto/ffi_pb.d.cts +0 -1321
- package/dist/proto/ffi_pb.d.ts +0 -1321
- package/dist/proto/ffi_pb.d.ts.map +0 -1
- package/dist/proto/ffi_pb.js +0 -444
- package/dist/proto/ffi_pb.js.map +0 -1
- package/dist/proto/handle_pb.cjs +0 -53
- package/dist/proto/handle_pb.cjs.map +0 -1
- package/dist/proto/handle_pb.d.cts +0 -31
- package/dist/proto/handle_pb.d.ts +0 -31
- package/dist/proto/handle_pb.d.ts.map +0 -1
- package/dist/proto/handle_pb.js +0 -29
- package/dist/proto/handle_pb.js.map +0 -1
- package/dist/proto/participant_pb.cjs +0 -173
- package/dist/proto/participant_pb.cjs.map +0 -1
- package/dist/proto/participant_pb.d.cts +0 -218
- package/dist/proto/participant_pb.d.ts +0 -218
- package/dist/proto/participant_pb.d.ts.map +0 -1
- package/dist/proto/participant_pb.js +0 -145
- package/dist/proto/participant_pb.js.map +0 -1
- package/dist/proto/room_pb.cjs +0 -3374
- package/dist/proto/room_pb.cjs.map +0 -1
- package/dist/proto/room_pb.d.cts +0 -3028
- package/dist/proto/room_pb.d.ts +0 -3028
- package/dist/proto/room_pb.d.ts.map +0 -1
- package/dist/proto/room_pb.js +0 -3232
- package/dist/proto/room_pb.js.map +0 -1
- package/dist/proto/rpc_pb.cjs +0 -328
- package/dist/proto/rpc_pb.cjs.map +0 -1
- package/dist/proto/rpc_pb.d.cts +0 -267
- package/dist/proto/rpc_pb.d.ts +0 -267
- package/dist/proto/rpc_pb.d.ts.map +0 -1
- package/dist/proto/rpc_pb.js +0 -294
- package/dist/proto/rpc_pb.js.map +0 -1
- package/dist/proto/stats_pb.cjs +0 -1370
- package/dist/proto/stats_pb.cjs.map +0 -1
- package/dist/proto/stats_pb.d.cts +0 -1764
- package/dist/proto/stats_pb.d.ts +0 -1764
- package/dist/proto/stats_pb.d.ts.map +0 -1
- package/dist/proto/stats_pb.js +0 -1300
- package/dist/proto/stats_pb.js.map +0 -1
- package/dist/proto/track_pb.cjs +0 -630
- package/dist/proto/track_pb.cjs.map +0 -1
- package/dist/proto/track_pb.d.cts +0 -542
- package/dist/proto/track_pb.d.ts +0 -542
- package/dist/proto/track_pb.d.ts.map +0 -1
- package/dist/proto/track_pb.js +0 -584
- package/dist/proto/track_pb.js.map +0 -1
- package/dist/proto/track_publication_pb.cjs +0 -194
- package/dist/proto/track_publication_pb.cjs.map +0 -1
- package/dist/proto/track_publication_pb.d.cts +0 -135
- package/dist/proto/track_publication_pb.d.ts +0 -135
- package/dist/proto/track_publication_pb.d.ts.map +0 -1
- package/dist/proto/track_publication_pb.js +0 -164
- package/dist/proto/track_publication_pb.js.map +0 -1
- package/dist/proto/video_frame_pb.cjs +0 -723
- package/dist/proto/video_frame_pb.cjs.map +0 -1
- package/dist/proto/video_frame_pb.d.cts +0 -667
- package/dist/proto/video_frame_pb.d.ts +0 -667
- package/dist/proto/video_frame_pb.d.ts.map +0 -1
- package/dist/proto/video_frame_pb.js +0 -673
- package/dist/proto/video_frame_pb.js.map +0 -1
- package/src/lib.rs +0 -9
- package/src/napi/native.cjs +0 -301
- package/src/napi/native.d.ts +0 -19
- package/src/napi/native.js +0 -15
- package/src/nodejs.rs +0 -134
- package/src/proto/audio_frame_pb.ts +0 -2270
- package/src/proto/data_stream_pb.ts +0 -2674
- package/src/proto/e2ee_pb.ts +0 -1231
- package/src/proto/ffi_pb.ts +0 -1700
- package/src/proto/handle_pb.ts +0 -69
- package/src/proto/participant_pb.ts +0 -351
- package/src/proto/room_pb.ts +0 -5661
- package/src/proto/rpc_pb.ts +0 -539
- package/src/proto/stats_pb.ts +0 -3050
- package/src/proto/track_pb.ts +0 -1040
- package/src/proto/track_publication_pb.ts +0 -284
- package/src/proto/video_frame_pb.ts +0 -1236
package/dist/index.d.ts
CHANGED
|
@@ -4,16 +4,12 @@ export { AudioSource } from './audio_source.js';
|
|
|
4
4
|
export { AudioStream, NoiseCancellationOptions } from './audio_stream.js';
|
|
5
5
|
export { AudioFilter } from './audio_filter.js';
|
|
6
6
|
export { AudioMixer, AudioMixerOptions } from './audio_mixer.js';
|
|
7
|
-
export { a as BaseStreamInfo, f as ByteStreamHandler, b as ByteStreamInfo, e as ByteStreamOptions, B as ByteStreamReader, D as DataStreamOptions, S as StreamController, g as TextStreamHandler, c as TextStreamInfo, d as TextStreamOptions, T as TextStreamReader } from './stream_reader-
|
|
7
|
+
export { a as BaseStreamInfo, f as ByteStreamHandler, b as ByteStreamInfo, e as ByteStreamOptions, B as ByteStreamReader, D as DataStreamOptions, S as StreamController, g as TextStreamHandler, c as TextStreamInfo, d as TextStreamOptions, T as TextStreamReader } from './stream_reader-CuG4b8Y-.js';
|
|
8
8
|
export { ByteStreamWriter, TextStreamWriter } from './data_streams/stream_writer.js';
|
|
9
9
|
export { E2EEManager, E2EEOptions, FrameCryptor, KeyProvider, KeyProviderOptions } from './e2ee.js';
|
|
10
10
|
import './ffi_client.js';
|
|
11
11
|
export { LocalParticipant, Participant, RemoteParticipant } from './participant.js';
|
|
12
|
-
export { EncryptionState, EncryptionType } from '
|
|
13
|
-
export { DisconnectReason, ParticipantKind } from './proto/participant_pb.js';
|
|
14
|
-
export { ConnectionQuality, ConnectionState, ContinualGatheringPolicy, DataPacketKind, IceServer, IceTransportType, TrackPublishOptions } from './proto/room_pb.js';
|
|
15
|
-
export { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';
|
|
16
|
-
export { VideoBufferType, VideoCodec, VideoRotation } from './proto/video_frame_pb.js';
|
|
12
|
+
export { ConnectionQuality, ConnectionState, ContinualGatheringPolicy, DataPacketKind, DisconnectReason, EncryptionState, EncryptionType, IceServer, IceTransportType, ParticipantKind, StreamState, TrackKind, TrackPublishOptions, TrackSource, VideoBufferType, VideoCodec, VideoRotation, livekitDispose as dispose } from '@livekit/rtc-ffi-bindings';
|
|
17
13
|
export { ConnectError, Room, RoomEvent, RoomOptions, RtcConfiguration } from './room.js';
|
|
18
14
|
export { PerformRpcParams, RpcError, RpcInvocationData } from './rpc.js';
|
|
19
15
|
export { AudioTrack, LocalAudioTrack, LocalTrack, LocalVideoTrack, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Track, VideoTrack } from './track.js';
|
|
@@ -23,17 +19,8 @@ export { ChatMessage } from './types.js';
|
|
|
23
19
|
export { VideoFrame } from './video_frame.js';
|
|
24
20
|
export { VideoSource } from './video_source.js';
|
|
25
21
|
export { VideoFrameEvent, VideoStream } from './video_stream.js';
|
|
26
|
-
export { FrameProcessor, FrameProcessorCredentials, FrameProcessorStreamInfo } from './frame_processor.js';
|
|
27
|
-
export { livekitDispose as dispose } from './napi/native.d.js';
|
|
28
|
-
import './proto/audio_frame_pb.js';
|
|
29
|
-
import '@bufbuild/protobuf';
|
|
30
|
-
import './proto/handle_pb.js';
|
|
22
|
+
export { FrameProcessor, FrameProcessorCredentials, FrameProcessorStreamInfo, isFrameProcessor } from './frame_processor.js';
|
|
31
23
|
import './async_queue.js';
|
|
32
24
|
import '@livekit/typed-emitter';
|
|
33
|
-
import './proto/ffi_pb.js';
|
|
34
|
-
import './proto/rpc_pb.js';
|
|
35
|
-
import './proto/track_publication_pb.js';
|
|
36
|
-
import './proto/data_stream_pb.js';
|
|
37
25
|
import '@livekit/mutex';
|
|
38
26
|
import 'node:fs';
|
|
39
|
-
import './proto/stats_pb.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACnE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACnE,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnF,OAAO,EACL,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACL,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,8 +8,8 @@ export * from "./data_streams/index.js";
|
|
|
8
8
|
import { E2EEManager, FrameCryptor, KeyProvider } from "./e2ee.js";
|
|
9
9
|
import { dispose } from "./ffi_client.js";
|
|
10
10
|
import { LocalParticipant, Participant, RemoteParticipant } from "./participant.js";
|
|
11
|
-
import { EncryptionState, EncryptionType } from "
|
|
12
|
-
import { DisconnectReason, ParticipantKind } from "
|
|
11
|
+
import { EncryptionState, EncryptionType } from "@livekit/rtc-ffi-bindings";
|
|
12
|
+
import { DisconnectReason, ParticipantKind } from "@livekit/rtc-ffi-bindings";
|
|
13
13
|
import {
|
|
14
14
|
ConnectionQuality,
|
|
15
15
|
ConnectionState,
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
IceServer,
|
|
19
19
|
IceTransportType,
|
|
20
20
|
TrackPublishOptions
|
|
21
|
-
} from "
|
|
22
|
-
import { StreamState, TrackKind, TrackSource } from "
|
|
23
|
-
import { VideoBufferType, VideoCodec, VideoRotation } from "
|
|
21
|
+
} from "@livekit/rtc-ffi-bindings";
|
|
22
|
+
import { StreamState, TrackKind, TrackSource } from "@livekit/rtc-ffi-bindings";
|
|
23
|
+
import { VideoBufferType, VideoCodec, VideoRotation } from "@livekit/rtc-ffi-bindings";
|
|
24
24
|
import { ConnectError, Room, RoomEvent } from "./room.js";
|
|
25
25
|
import { RpcError } from "./rpc.js";
|
|
26
26
|
import {
|
|
@@ -39,7 +39,8 @@ import { VideoFrame } from "./video_frame.js";
|
|
|
39
39
|
import { VideoSource } from "./video_source.js";
|
|
40
40
|
import { VideoStream } from "./video_stream.js";
|
|
41
41
|
import {
|
|
42
|
-
FrameProcessor
|
|
42
|
+
FrameProcessor,
|
|
43
|
+
isFrameProcessor
|
|
43
44
|
} from "./frame_processor.js";
|
|
44
45
|
export {
|
|
45
46
|
AudioFilter,
|
|
@@ -89,6 +90,7 @@ export {
|
|
|
89
90
|
VideoSource,
|
|
90
91
|
VideoStream,
|
|
91
92
|
combineAudioFrames,
|
|
92
|
-
dispose
|
|
93
|
+
dispose,
|
|
94
|
+
isFrameProcessor
|
|
93
95
|
};
|
|
94
96
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport { AudioFrame, combineAudioFrames } from './audio_frame.js';\nexport { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';\nexport { AudioSource } from './audio_source.js';\nexport { AudioStream } from './audio_stream.js';\nexport type { NoiseCancellationOptions } from './audio_stream.js';\nexport { AudioFilter } from './audio_filter.js';\nexport { AudioMixer, type AudioMixerOptions } from './audio_mixer.js';\nexport * from './data_streams/index.js';\nexport { E2EEManager, FrameCryptor, KeyProvider } from './e2ee.js';\nexport type { E2EEOptions, KeyProviderOptions } from './e2ee.js';\nexport { dispose } from './ffi_client.js';\nexport { LocalParticipant, Participant, RemoteParticipant } from './participant.js';\nexport { EncryptionState, EncryptionType } from '
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport { AudioFrame, combineAudioFrames } from './audio_frame.js';\nexport { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';\nexport { AudioSource } from './audio_source.js';\nexport { AudioStream } from './audio_stream.js';\nexport type { NoiseCancellationOptions } from './audio_stream.js';\nexport { AudioFilter } from './audio_filter.js';\nexport { AudioMixer, type AudioMixerOptions } from './audio_mixer.js';\nexport * from './data_streams/index.js';\nexport { E2EEManager, FrameCryptor, KeyProvider } from './e2ee.js';\nexport type { E2EEOptions, KeyProviderOptions } from './e2ee.js';\nexport { dispose } from './ffi_client.js';\nexport { LocalParticipant, Participant, RemoteParticipant } from './participant.js';\nexport { EncryptionState, EncryptionType } from '@livekit/rtc-ffi-bindings';\nexport { DisconnectReason, ParticipantKind } from '@livekit/rtc-ffi-bindings';\nexport {\n ConnectionQuality,\n ConnectionState,\n ContinualGatheringPolicy,\n DataPacketKind,\n IceServer,\n IceTransportType,\n TrackPublishOptions,\n} from '@livekit/rtc-ffi-bindings';\nexport { StreamState, TrackKind, TrackSource } from '@livekit/rtc-ffi-bindings';\nexport { VideoBufferType, VideoCodec, VideoRotation } from '@livekit/rtc-ffi-bindings';\nexport { ConnectError, Room, RoomEvent, type RoomOptions, type RtcConfiguration } from './room.js';\nexport { RpcError, type PerformRpcParams, type RpcInvocationData } from './rpc.js';\nexport {\n LocalAudioTrack,\n LocalVideoTrack,\n RemoteAudioTrack,\n RemoteVideoTrack,\n Track,\n type AudioTrack,\n type LocalTrack,\n type RemoteTrack,\n type VideoTrack,\n} from './track.js';\nexport {\n LocalTrackPublication,\n RemoteTrackPublication,\n TrackPublication,\n} from './track_publication.js';\nexport type { Transcription, TranscriptionSegment } from './transcription.js';\nexport type { ChatMessage } from './types.js';\nexport { VideoFrame } from './video_frame.js';\nexport { VideoSource } from './video_source.js';\nexport { VideoStream, type VideoFrameEvent } from './video_stream.js';\nexport {\n FrameProcessor,\n type FrameProcessorStreamInfo,\n type FrameProcessorCredentials,\n isFrameProcessor,\n} from './frame_processor.js';\n"],"mappings":"AAIA,SAAS,YAAY,0BAA0B;AAC/C,SAAS,gBAAgB,6BAA6B;AACtD,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAE5B,SAAS,mBAAmB;AAC5B,SAAS,kBAA0C;AACnD,cAAc;AACd,SAAS,aAAa,cAAc,mBAAmB;AAEvD,SAAS,eAAe;AACxB,SAAS,kBAAkB,aAAa,yBAAyB;AACjE,SAAS,iBAAiB,sBAAsB;AAChD,SAAS,kBAAkB,uBAAuB;AAClD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,aAAa,WAAW,mBAAmB;AACpD,SAAS,iBAAiB,YAAY,qBAAqB;AAC3D,SAAS,cAAc,MAAM,iBAA0D;AACvF,SAAS,gBAA+D;AACxE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,mBAAyC;AAClD;AAAA,EACE;AAAA,EAGA;AAAA,OACK;","names":[]}
|
package/dist/log.cjs
CHANGED
|
@@ -24,16 +24,7 @@ module.exports = __toCommonJS(log_exports);
|
|
|
24
24
|
var import_pino = require("pino");
|
|
25
25
|
const isProduction = process.env.NODE_ENV === "production";
|
|
26
26
|
const defaultOptions = { name: "lk-rtc" };
|
|
27
|
-
const
|
|
28
|
-
...defaultOptions,
|
|
29
|
-
transport: {
|
|
30
|
-
target: "pino-pretty",
|
|
31
|
-
options: {
|
|
32
|
-
colorize: true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const log = (0, import_pino.pino)(isProduction ? defaultOptions : devOptions);
|
|
27
|
+
const log = (0, import_pino.pino)(defaultOptions);
|
|
37
28
|
log.level = isProduction ? "info" : "debug";
|
|
38
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
39
30
|
0 && (module.exports = {
|
package/dist/log.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/log.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { LevelWithSilent, LoggerOptions } from 'pino';\nimport { pino } from 'pino';\n\nconst isProduction = process.env.NODE_ENV === 'production';\n\nconst defaultOptions: LoggerOptions = { name: 'lk-rtc' };\n\
|
|
1
|
+
{"version":3,"sources":["../src/log.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { LevelWithSilent, LoggerOptions } from 'pino';\nimport { pino } from 'pino';\n\nconst isProduction = process.env.NODE_ENV === 'production';\n\nconst defaultOptions: LoggerOptions = { name: 'lk-rtc' };\n\n/**\n * temporarily disabling the transport option as there might be a memory leak in some corner cases related to it\n * see https://github.com/pinojs/pino/issues/2370\n */\n// const devOptions: LoggerOptions = {\n// ...defaultOptions,\n// transport: {\n// target: 'pino-pretty',\n// options: {\n// colorize: true,\n// },\n// },\n// };\n\nconst log = pino(defaultOptions);\nlog.level = isProduction ? 'info' : 'debug';\n\nexport type LogLevel = LevelWithSilent;\nexport { log };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAqB;AAErB,MAAM,eAAe,QAAQ,IAAI,aAAa;AAE9C,MAAM,iBAAgC,EAAE,MAAM,SAAS;AAgBvD,MAAM,UAAM,kBAAK,cAAc;AAC/B,IAAI,QAAQ,eAAe,SAAS;","names":[]}
|
package/dist/log.d.cts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as pino from 'pino';
|
|
2
2
|
import { LevelWithSilent } from 'pino';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* temporarily disabling the transport option as there might be a memory leak in some corner cases related to it
|
|
6
|
+
* see https://github.com/pinojs/pino/issues/2370
|
|
7
|
+
*/
|
|
4
8
|
declare const log: pino.Logger<never, boolean>;
|
|
5
9
|
type LogLevel = LevelWithSilent;
|
|
6
10
|
|
package/dist/log.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as pino from 'pino';
|
|
2
2
|
import { LevelWithSilent } from 'pino';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* temporarily disabling the transport option as there might be a memory leak in some corner cases related to it
|
|
6
|
+
* see https://github.com/pinojs/pino/issues/2370
|
|
7
|
+
*/
|
|
4
8
|
declare const log: pino.Logger<never, boolean>;
|
|
5
9
|
type LogLevel = LevelWithSilent;
|
|
6
10
|
|
package/dist/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,MAAM,CAAC;AAO3D;;;GAGG;AAWH,QAAA,MAAM,GAAG,uCAAuB,CAAC;AAGjC,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,CAAC"}
|
package/dist/log.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { pino } from "pino";
|
|
2
2
|
const isProduction = process.env.NODE_ENV === "production";
|
|
3
3
|
const defaultOptions = { name: "lk-rtc" };
|
|
4
|
-
const
|
|
5
|
-
...defaultOptions,
|
|
6
|
-
transport: {
|
|
7
|
-
target: "pino-pretty",
|
|
8
|
-
options: {
|
|
9
|
-
colorize: true
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const log = pino(isProduction ? defaultOptions : devOptions);
|
|
4
|
+
const log = pino(defaultOptions);
|
|
14
5
|
log.level = isProduction ? "info" : "debug";
|
|
15
6
|
export {
|
|
16
7
|
log
|
package/dist/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/log.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { LevelWithSilent, LoggerOptions } from 'pino';\nimport { pino } from 'pino';\n\nconst isProduction = process.env.NODE_ENV === 'production';\n\nconst defaultOptions: LoggerOptions = { name: 'lk-rtc' };\n\
|
|
1
|
+
{"version":3,"sources":["../src/log.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { LevelWithSilent, LoggerOptions } from 'pino';\nimport { pino } from 'pino';\n\nconst isProduction = process.env.NODE_ENV === 'production';\n\nconst defaultOptions: LoggerOptions = { name: 'lk-rtc' };\n\n/**\n * temporarily disabling the transport option as there might be a memory leak in some corner cases related to it\n * see https://github.com/pinojs/pino/issues/2370\n */\n// const devOptions: LoggerOptions = {\n// ...defaultOptions,\n// transport: {\n// target: 'pino-pretty',\n// options: {\n// colorize: true,\n// },\n// },\n// };\n\nconst log = pino(defaultOptions);\nlog.level = isProduction ? 'info' : 'debug';\n\nexport type LogLevel = LevelWithSilent;\nexport { log };\n"],"mappings":"AAIA,SAAS,YAAY;AAErB,MAAM,eAAe,QAAQ,IAAI,aAAa;AAE9C,MAAM,iBAAgC,EAAE,MAAM,SAAS;AAgBvD,MAAM,MAAM,KAAK,cAAc;AAC/B,IAAI,QAAQ,eAAe,SAAS;","names":[]}
|
package/dist/participant.cjs
CHANGED
|
@@ -24,13 +24,13 @@ __export(participant_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(participant_exports);
|
|
26
26
|
var import_mutex = require("@livekit/mutex");
|
|
27
|
+
var import_rtc_ffi_bindings = require("@livekit/rtc-ffi-bindings");
|
|
28
|
+
var import_rtc_ffi_bindings2 = require("@livekit/rtc-ffi-bindings");
|
|
29
|
+
var import_rtc_ffi_bindings3 = require("@livekit/rtc-ffi-bindings");
|
|
27
30
|
var import_promises = require("node:fs/promises");
|
|
28
31
|
var import_data_streams = require("./data_streams/index.cjs");
|
|
29
32
|
var import_ffi_client = require("./ffi_client.cjs");
|
|
30
33
|
var import_log = require("./log.cjs");
|
|
31
|
-
var import_participant_pb = require("./proto/participant_pb.cjs");
|
|
32
|
-
var import_room_pb = require("./proto/room_pb.cjs");
|
|
33
|
-
var import_rpc_pb = require("./proto/rpc_pb.cjs");
|
|
34
34
|
var import_rpc = require("./rpc.cjs");
|
|
35
35
|
var import_track_publication = require("./track_publication.cjs");
|
|
36
36
|
var import_utils = require("./utils.cjs");
|
|
@@ -57,10 +57,10 @@ class Participant {
|
|
|
57
57
|
return this.info.attributes ?? {};
|
|
58
58
|
}
|
|
59
59
|
get kind() {
|
|
60
|
-
return this.info.kind ??
|
|
60
|
+
return this.info.kind ?? import_rtc_ffi_bindings.ParticipantKind.STANDARD;
|
|
61
61
|
}
|
|
62
62
|
get disconnectReason() {
|
|
63
|
-
if (this.info.disconnectReason ===
|
|
63
|
+
if (this.info.disconnectReason === import_rtc_ffi_bindings.DisconnectReason.UNKNOWN_REASON) {
|
|
64
64
|
return void 0;
|
|
65
65
|
}
|
|
66
66
|
return this.info.disconnectReason;
|
|
@@ -74,7 +74,7 @@ class LocalParticipant extends Participant {
|
|
|
74
74
|
this.ffiEventLock = ffiEventLock;
|
|
75
75
|
}
|
|
76
76
|
async publishData(data, options) {
|
|
77
|
-
const req = new
|
|
77
|
+
const req = new import_rtc_ffi_bindings2.PublishDataRequest({
|
|
78
78
|
localParticipantHandle: this.ffi_handle.handle,
|
|
79
79
|
dataPtr: import_ffi_client.FfiClient.instance.retrievePtr(data),
|
|
80
80
|
dataLen: BigInt(data.byteLength),
|
|
@@ -93,7 +93,7 @@ class LocalParticipant extends Participant {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
async publishDtmf(code, digit) {
|
|
96
|
-
const req = new
|
|
96
|
+
const req = new import_rtc_ffi_bindings2.PublishSipDtmfRequest({
|
|
97
97
|
localParticipantHandle: this.ffi_handle.handle,
|
|
98
98
|
code,
|
|
99
99
|
digit
|
|
@@ -109,11 +109,11 @@ class LocalParticipant extends Participant {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
async publishTranscription(transcription) {
|
|
112
|
-
const req = new
|
|
112
|
+
const req = new import_rtc_ffi_bindings2.PublishTranscriptionRequest({
|
|
113
113
|
localParticipantHandle: this.ffi_handle.handle,
|
|
114
114
|
participantIdentity: transcription.participantIdentity,
|
|
115
115
|
segments: transcription.segments.map(
|
|
116
|
-
(s) => new
|
|
116
|
+
(s) => new import_rtc_ffi_bindings2.TranscriptionSegment({
|
|
117
117
|
id: s.id,
|
|
118
118
|
text: s.text,
|
|
119
119
|
startTime: s.startTime,
|
|
@@ -135,7 +135,7 @@ class LocalParticipant extends Participant {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
async updateMetadata(metadata) {
|
|
138
|
-
const req = new
|
|
138
|
+
const req = new import_rtc_ffi_bindings2.SetLocalMetadataRequest({
|
|
139
139
|
localParticipantHandle: this.ffi_handle.handle,
|
|
140
140
|
metadata
|
|
141
141
|
});
|
|
@@ -160,11 +160,11 @@ class LocalParticipant extends Participant {
|
|
|
160
160
|
topic: (options == null ? void 0 : options.topic) ?? "",
|
|
161
161
|
timestamp: Date.now()
|
|
162
162
|
};
|
|
163
|
-
const headerReq = new
|
|
163
|
+
const headerReq = new import_rtc_ffi_bindings2.SendStreamHeaderRequest({
|
|
164
164
|
senderIdentity,
|
|
165
165
|
destinationIdentities,
|
|
166
166
|
localParticipantHandle: this.ffi_handle.handle,
|
|
167
|
-
header: new
|
|
167
|
+
header: new import_rtc_ffi_bindings2.DataStream_Header({
|
|
168
168
|
streamId,
|
|
169
169
|
mimeType: info.mimeType,
|
|
170
170
|
topic: info.topic,
|
|
@@ -172,8 +172,8 @@ class LocalParticipant extends Participant {
|
|
|
172
172
|
attributes: options == null ? void 0 : options.attributes,
|
|
173
173
|
contentHeader: {
|
|
174
174
|
case: "textHeader",
|
|
175
|
-
value: new
|
|
176
|
-
operationType:
|
|
175
|
+
value: new import_rtc_ffi_bindings2.DataStream_TextHeader({
|
|
176
|
+
operationType: import_rtc_ffi_bindings2.DataStream_OperationType.CREATE,
|
|
177
177
|
version: 0,
|
|
178
178
|
replyToStreamId: "",
|
|
179
179
|
generated: false
|
|
@@ -190,11 +190,11 @@ class LocalParticipant extends Participant {
|
|
|
190
190
|
// Implement the sink
|
|
191
191
|
async write(text) {
|
|
192
192
|
for (const textByteChunk of (0, import_utils.splitUtf8)(text, STREAM_CHUNK_SIZE)) {
|
|
193
|
-
const chunkRequest = new
|
|
193
|
+
const chunkRequest = new import_rtc_ffi_bindings2.SendStreamChunkRequest({
|
|
194
194
|
senderIdentity,
|
|
195
195
|
localParticipantHandle: localHandle,
|
|
196
196
|
destinationIdentities,
|
|
197
|
-
chunk: new
|
|
197
|
+
chunk: new import_rtc_ffi_bindings2.DataStream_Chunk({
|
|
198
198
|
content: textByteChunk,
|
|
199
199
|
streamId,
|
|
200
200
|
chunkIndex: (0, import_utils.numberToBigInt)(nextChunkId)
|
|
@@ -205,11 +205,11 @@ class LocalParticipant extends Participant {
|
|
|
205
205
|
}
|
|
206
206
|
},
|
|
207
207
|
async close() {
|
|
208
|
-
const trailerReq = new
|
|
208
|
+
const trailerReq = new import_rtc_ffi_bindings2.SendStreamTrailerRequest({
|
|
209
209
|
senderIdentity,
|
|
210
210
|
localParticipantHandle: localHandle,
|
|
211
211
|
destinationIdentities,
|
|
212
|
-
trailer: new
|
|
212
|
+
trailer: new import_rtc_ffi_bindings2.DataStream_Trailer({
|
|
213
213
|
streamId,
|
|
214
214
|
reason: ""
|
|
215
215
|
})
|
|
@@ -217,7 +217,7 @@ class LocalParticipant extends Participant {
|
|
|
217
217
|
await sendTrailer(trailerReq);
|
|
218
218
|
},
|
|
219
219
|
abort(err) {
|
|
220
|
-
import_log.log.error("Sink
|
|
220
|
+
import_log.log.error(err, "Sink Error");
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
const writer = new import_data_streams.TextStreamWriter(writableStream, info);
|
|
@@ -242,11 +242,11 @@ class LocalParticipant extends Participant {
|
|
|
242
242
|
totalSize: options == null ? void 0 : options.totalSize,
|
|
243
243
|
name: (options == null ? void 0 : options.name) ?? "unknown"
|
|
244
244
|
};
|
|
245
|
-
const headerReq = new
|
|
245
|
+
const headerReq = new import_rtc_ffi_bindings2.SendStreamHeaderRequest({
|
|
246
246
|
senderIdentity,
|
|
247
247
|
destinationIdentities,
|
|
248
248
|
localParticipantHandle: this.ffi_handle.handle,
|
|
249
|
-
header: new
|
|
249
|
+
header: new import_rtc_ffi_bindings2.DataStream_Header({
|
|
250
250
|
streamId,
|
|
251
251
|
mimeType: info.mimeType,
|
|
252
252
|
topic: info.topic,
|
|
@@ -255,7 +255,7 @@ class LocalParticipant extends Participant {
|
|
|
255
255
|
totalLength: (0, import_utils.numberToBigInt)(info.totalSize),
|
|
256
256
|
contentHeader: {
|
|
257
257
|
case: "byteHeader",
|
|
258
|
-
value: new
|
|
258
|
+
value: new import_rtc_ffi_bindings2.DataStream_ByteHeader({
|
|
259
259
|
name: info.name
|
|
260
260
|
})
|
|
261
261
|
}
|
|
@@ -274,11 +274,11 @@ class LocalParticipant extends Participant {
|
|
|
274
274
|
try {
|
|
275
275
|
while (byteOffset < chunk.byteLength) {
|
|
276
276
|
const subChunk = chunk.slice(byteOffset, byteOffset + STREAM_CHUNK_SIZE);
|
|
277
|
-
const chunkRequest = new
|
|
277
|
+
const chunkRequest = new import_rtc_ffi_bindings2.SendStreamChunkRequest({
|
|
278
278
|
senderIdentity,
|
|
279
279
|
localParticipantHandle: localHandle,
|
|
280
280
|
destinationIdentities,
|
|
281
|
-
chunk: new
|
|
281
|
+
chunk: new import_rtc_ffi_bindings2.DataStream_Chunk({
|
|
282
282
|
content: subChunk,
|
|
283
283
|
streamId,
|
|
284
284
|
chunkIndex: (0, import_utils.numberToBigInt)(chunkId)
|
|
@@ -293,11 +293,11 @@ class LocalParticipant extends Participant {
|
|
|
293
293
|
}
|
|
294
294
|
},
|
|
295
295
|
async close() {
|
|
296
|
-
const trailerReq = new
|
|
296
|
+
const trailerReq = new import_rtc_ffi_bindings2.SendStreamTrailerRequest({
|
|
297
297
|
senderIdentity,
|
|
298
298
|
localParticipantHandle: localHandle,
|
|
299
299
|
destinationIdentities,
|
|
300
|
-
trailer: new
|
|
300
|
+
trailer: new import_rtc_ffi_bindings2.DataStream_Trailer({
|
|
301
301
|
streamId,
|
|
302
302
|
reason: ""
|
|
303
303
|
})
|
|
@@ -305,7 +305,7 @@ class LocalParticipant extends Participant {
|
|
|
305
305
|
await sendTrailer(trailerReq);
|
|
306
306
|
},
|
|
307
307
|
abort(err) {
|
|
308
|
-
import_log.log.error("Sink error
|
|
308
|
+
import_log.log.error(err, "Sink error");
|
|
309
309
|
}
|
|
310
310
|
});
|
|
311
311
|
const byteWriter = new import_data_streams.ByteStreamWriter(writableStream, info);
|
|
@@ -381,7 +381,7 @@ class LocalParticipant extends Participant {
|
|
|
381
381
|
*
|
|
382
382
|
*/
|
|
383
383
|
async sendChatMessage(text, destinationIdentities, senderIdentity) {
|
|
384
|
-
const req = new
|
|
384
|
+
const req = new import_rtc_ffi_bindings2.SendChatMessageRequest({
|
|
385
385
|
localParticipantHandle: this.ffi_handle.handle,
|
|
386
386
|
message: text,
|
|
387
387
|
destinationIdentities,
|
|
@@ -411,10 +411,10 @@ class LocalParticipant extends Participant {
|
|
|
411
411
|
* @experimental
|
|
412
412
|
*/
|
|
413
413
|
async editChatMessage(editText, originalMessage, destinationIdentities, senderIdentity) {
|
|
414
|
-
const req = new
|
|
414
|
+
const req = new import_rtc_ffi_bindings2.EditChatMessageRequest({
|
|
415
415
|
localParticipantHandle: this.ffi_handle.handle,
|
|
416
416
|
editText,
|
|
417
|
-
originalMessage: new
|
|
417
|
+
originalMessage: new import_rtc_ffi_bindings2.ChatMessage({
|
|
418
418
|
...originalMessage,
|
|
419
419
|
timestamp: BigInt(originalMessage.timestamp),
|
|
420
420
|
editTimestamp: originalMessage.editTimestamp ? BigInt(originalMessage.editTimestamp) : void 0
|
|
@@ -443,7 +443,7 @@ class LocalParticipant extends Participant {
|
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
async updateName(name) {
|
|
446
|
-
const req = new
|
|
446
|
+
const req = new import_rtc_ffi_bindings2.SetLocalNameRequest({
|
|
447
447
|
localParticipantHandle: this.ffi_handle.handle,
|
|
448
448
|
name
|
|
449
449
|
});
|
|
@@ -455,7 +455,7 @@ class LocalParticipant extends Participant {
|
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
async setAttributes(attributes) {
|
|
458
|
-
const req = new
|
|
458
|
+
const req = new import_rtc_ffi_bindings2.SetLocalAttributesRequest({
|
|
459
459
|
localParticipantHandle: this.ffi_handle.handle,
|
|
460
460
|
attributes: Object.entries(attributes).map(([key, value]) => ({ key, value }))
|
|
461
461
|
});
|
|
@@ -467,7 +467,7 @@ class LocalParticipant extends Participant {
|
|
|
467
467
|
});
|
|
468
468
|
}
|
|
469
469
|
async publishTrack(track, options) {
|
|
470
|
-
const req = new
|
|
470
|
+
const req = new import_rtc_ffi_bindings2.PublishTrackRequest({
|
|
471
471
|
localParticipantHandle: this.ffi_handle.handle,
|
|
472
472
|
trackHandle: track.ffi_handle.handle,
|
|
473
473
|
options
|
|
@@ -497,7 +497,7 @@ class LocalParticipant extends Participant {
|
|
|
497
497
|
async unpublishTrack(trackSid, stopOnUnpublish) {
|
|
498
498
|
const unlock = await this.ffiEventLock.lock();
|
|
499
499
|
try {
|
|
500
|
-
const req = new
|
|
500
|
+
const req = new import_rtc_ffi_bindings2.UnpublishTrackRequest({
|
|
501
501
|
localParticipantHandle: this.ffi_handle.handle,
|
|
502
502
|
trackSid,
|
|
503
503
|
stopOnUnpublish: stopOnUnpublish ?? true
|
|
@@ -532,7 +532,7 @@ class LocalParticipant extends Participant {
|
|
|
532
532
|
payload,
|
|
533
533
|
responseTimeout
|
|
534
534
|
}) {
|
|
535
|
-
const req = new
|
|
535
|
+
const req = new import_rtc_ffi_bindings3.PerformRpcRequest({
|
|
536
536
|
localParticipantHandle: this.ffi_handle.handle,
|
|
537
537
|
destinationIdentity,
|
|
538
538
|
method,
|
|
@@ -580,7 +580,7 @@ class LocalParticipant extends Participant {
|
|
|
580
580
|
*/
|
|
581
581
|
registerRpcMethod(method, handler) {
|
|
582
582
|
this.rpcHandlers.set(method, handler);
|
|
583
|
-
const req = new
|
|
583
|
+
const req = new import_rtc_ffi_bindings3.RegisterRpcMethodRequest({
|
|
584
584
|
localParticipantHandle: this.ffi_handle.handle,
|
|
585
585
|
method
|
|
586
586
|
});
|
|
@@ -595,7 +595,7 @@ class LocalParticipant extends Participant {
|
|
|
595
595
|
*/
|
|
596
596
|
unregisterRpcMethod(method) {
|
|
597
597
|
this.rpcHandlers.delete(method);
|
|
598
|
-
const req = new
|
|
598
|
+
const req = new import_rtc_ffi_bindings3.UnregisterRpcMethodRequest({
|
|
599
599
|
localParticipantHandle: this.ffi_handle.handle,
|
|
600
600
|
method
|
|
601
601
|
});
|
|
@@ -625,7 +625,7 @@ class LocalParticipant extends Participant {
|
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
-
const req = new
|
|
628
|
+
const req = new import_rtc_ffi_bindings3.RpcMethodInvocationResponseRequest({
|
|
629
629
|
localParticipantHandle: this.ffi_handle.handle,
|
|
630
630
|
invocationId,
|
|
631
631
|
error: responseError ? responseError.toProto() : void 0,
|