@livekit/rtc-node 0.13.5 → 0.13.7
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_source.cjs +6 -0
- package/dist/audio_source.cjs.map +1 -1
- package/dist/audio_source.d.cts +2 -0
- package/dist/audio_source.d.ts +2 -0
- package/dist/audio_source.d.ts.map +1 -1
- package/dist/audio_source.js +6 -0
- package/dist/audio_source.js.map +1 -1
- package/dist/data_streams/index.d.cts +2 -2
- package/dist/data_streams/index.d.ts +2 -2
- package/dist/data_streams/stream_reader.d.cts +1 -1
- package/dist/data_streams/stream_reader.d.ts +1 -1
- package/dist/data_streams/stream_writer.d.cts +1 -1
- package/dist/data_streams/stream_writer.d.ts +1 -1
- package/dist/data_streams/types.d.cts +1 -1
- package/dist/data_streams/types.d.ts +1 -1
- package/dist/index.cjs +15 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -28
- package/dist/index.js.map +1 -1
- package/dist/participant.d.cts +2 -2
- package/dist/participant.d.ts +2 -2
- package/dist/proto/ffi_pb.cjs +2 -0
- package/dist/proto/ffi_pb.cjs.map +1 -1
- package/dist/proto/ffi_pb.d.cts +13 -1
- package/dist/proto/ffi_pb.d.ts +13 -1
- package/dist/proto/ffi_pb.d.ts.map +1 -1
- package/dist/proto/ffi_pb.js +3 -1
- package/dist/proto/ffi_pb.js.map +1 -1
- package/dist/proto/room_pb.cjs +2 -1
- package/dist/proto/room_pb.cjs.map +1 -1
- package/dist/proto/room_pb.d.cts +4 -0
- package/dist/proto/room_pb.d.ts +4 -0
- package/dist/proto/room_pb.d.ts.map +1 -1
- package/dist/proto/room_pb.js +2 -1
- package/dist/proto/room_pb.js.map +1 -1
- package/dist/proto/track_pb.cjs +90 -0
- package/dist/proto/track_pb.cjs.map +1 -1
- package/dist/proto/track_pb.d.cts +70 -1
- package/dist/proto/track_pb.d.ts +70 -1
- package/dist/proto/track_pb.d.ts.map +1 -1
- package/dist/proto/track_pb.js +87 -0
- package/dist/proto/track_pb.js.map +1 -1
- package/dist/proto/video_frame_pb.cjs +1 -1
- package/dist/proto/video_frame_pb.cjs.map +1 -1
- package/dist/proto/video_frame_pb.d.cts +1 -1
- package/dist/proto/video_frame_pb.d.ts +1 -1
- package/dist/proto/video_frame_pb.js +1 -1
- package/dist/proto/video_frame_pb.js.map +1 -1
- package/dist/room.cjs +7 -7
- package/dist/room.cjs.map +1 -1
- package/dist/room.d.cts +1 -1
- package/dist/room.d.ts +1 -1
- package/dist/room.d.ts.map +1 -1
- package/dist/room.js +2 -4
- package/dist/room.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/package.json +6 -6
- package/src/audio_source.ts +6 -0
- package/src/index.ts +33 -33
- package/src/proto/ffi_pb.ts +15 -1
- package/src/proto/room_pb.ts +6 -0
- package/src/proto/track_pb.ts +135 -0
- package/src/proto/video_frame_pb.ts +2 -2
- package/src/room.ts +7 -8
- package/src/version.ts +1 -1
- package/dist/{types-BDnbvXeD.d.ts → stream_reader-DWUV4eJB.d.ts} +40 -40
- package/dist/{types-B28ZM-Ci.d.cts → stream_reader-a8_oiaOi.d.cts} +40 -40
package/dist/audio_source.cjs
CHANGED
|
@@ -32,6 +32,8 @@ class AudioSource {
|
|
|
32
32
|
this.promise = this.newPromise();
|
|
33
33
|
/** @internal */
|
|
34
34
|
this.timeout = void 0;
|
|
35
|
+
/** @internal */
|
|
36
|
+
this.closed = false;
|
|
35
37
|
this.sampleRate = sampleRate;
|
|
36
38
|
this.numChannels = numChannels;
|
|
37
39
|
this.queueSize = queueSize;
|
|
@@ -84,6 +86,9 @@ class AudioSource {
|
|
|
84
86
|
});
|
|
85
87
|
}
|
|
86
88
|
async captureFrame(frame) {
|
|
89
|
+
if (this.closed) {
|
|
90
|
+
throw new Error("AudioSource is closed");
|
|
91
|
+
}
|
|
87
92
|
const now = Number(process.hrtime.bigint() / BigInt(1e6));
|
|
88
93
|
const elapsed = this.lastCapture === 0 ? 0 : now - this.lastCapture;
|
|
89
94
|
const frameDurationMs = frame.samplesPerChannel / frame.sampleRate * 1e3;
|
|
@@ -109,6 +114,7 @@ class AudioSource {
|
|
|
109
114
|
}
|
|
110
115
|
async close() {
|
|
111
116
|
this.ffiHandle.dispose();
|
|
117
|
+
this.closed = true;
|
|
112
118
|
}
|
|
113
119
|
}
|
|
114
120
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/audio_source.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { AudioFrame } from './audio_frame.js';\nimport { FfiClient } from './ffi_client.js';\nimport { FfiHandle } from './napi/native.js';\nimport type {\n AudioSourceInfo,\n CaptureAudioFrameCallback,\n CaptureAudioFrameResponse,\n ClearAudioBufferResponse,\n NewAudioSourceResponse,\n} from './proto/audio_frame_pb.js';\nimport {\n AudioSourceType,\n CaptureAudioFrameRequest,\n ClearAudioBufferRequest,\n NewAudioSourceRequest,\n} from './proto/audio_frame_pb.js';\n\nexport class AudioSource {\n /** @internal */\n info: AudioSourceInfo;\n /** @internal */\n ffiHandle: FfiHandle;\n /** @internal */\n lastCapture: number;\n /** @internal */\n currentQueueSize: number;\n /** @internal */\n release = () => {};\n promise = this.newPromise();\n /** @internal */\n timeout?: ReturnType<typeof setTimeout> = undefined;\n\n sampleRate: number;\n numChannels: number;\n queueSize: number;\n\n constructor(sampleRate: number, numChannels: number, queueSize = 1000) {\n this.sampleRate = sampleRate;\n this.numChannels = numChannels;\n this.queueSize = queueSize;\n\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n\n const req = new NewAudioSourceRequest({\n type: AudioSourceType.AUDIO_SOURCE_NATIVE,\n sampleRate: sampleRate,\n numChannels: numChannels,\n queueSizeMs: queueSize,\n });\n\n const res = FfiClient.instance.request<NewAudioSourceResponse>({\n message: {\n case: 'newAudioSource',\n value: req,\n },\n });\n\n this.info = res.source!.info!;\n this.ffiHandle = new FfiHandle(res.source!.handle!.id!);\n }\n\n get queuedDuration(): number {\n return Math.max(\n this.currentQueueSize - Number(process.hrtime.bigint() / BigInt(1000000)) + this.lastCapture,\n 0,\n );\n }\n\n clearQueue() {\n const req = new ClearAudioBufferRequest({\n sourceHandle: this.ffiHandle.handle,\n });\n\n FfiClient.instance.request<ClearAudioBufferResponse>({\n message: {\n case: 'clearAudioBuffer',\n value: req,\n },\n });\n\n this.release();\n }\n\n /** @internal */\n async newPromise() {\n return new Promise<void>((resolve) => {\n this.release = resolve;\n });\n }\n\n async waitForPlayout() {\n return this.promise.then(() => {\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n this.promise = this.newPromise();\n });\n }\n\n async captureFrame(frame: AudioFrame) {\n const now = Number(process.hrtime.bigint() / BigInt(1000000));\n const elapsed = this.lastCapture === 0 ? 0 : now - this.lastCapture;\n const frameDurationMs = (frame.samplesPerChannel / frame.sampleRate) * 1000;\n this.currentQueueSize += frameDurationMs - elapsed;\n\n this.lastCapture = now;\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n // remove 50ms to account for processing time\n // (e.g. using wait_for_playout for very small chunks)\n this.timeout = setTimeout(this.release, this.currentQueueSize - 50);\n\n const req = new CaptureAudioFrameRequest({\n sourceHandle: this.ffiHandle.handle,\n buffer: frame.protoInfo(),\n });\n\n const res = FfiClient.instance.request<CaptureAudioFrameResponse>({\n message: { case: 'captureAudioFrame', value: req },\n });\n\n const cb = await FfiClient.instance.waitFor<CaptureAudioFrameCallback>((ev) => {\n return ev.message.case == 'captureAudioFrame' && ev.message.value.asyncId == res.asyncId;\n });\n\n if (cb.error) {\n throw new Error(cb.error);\n }\n }\n\n async close() {\n this.ffiHandle.dispose();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAA0B;AAC1B,oBAA0B;AAQ1B,4BAKO;AAEA,MAAM,YAAY;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/audio_source.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { AudioFrame } from './audio_frame.js';\nimport { FfiClient } from './ffi_client.js';\nimport { FfiHandle } from './napi/native.js';\nimport type {\n AudioSourceInfo,\n CaptureAudioFrameCallback,\n CaptureAudioFrameResponse,\n ClearAudioBufferResponse,\n NewAudioSourceResponse,\n} from './proto/audio_frame_pb.js';\nimport {\n AudioSourceType,\n CaptureAudioFrameRequest,\n ClearAudioBufferRequest,\n NewAudioSourceRequest,\n} from './proto/audio_frame_pb.js';\n\nexport class AudioSource {\n /** @internal */\n info: AudioSourceInfo;\n /** @internal */\n ffiHandle: FfiHandle;\n /** @internal */\n lastCapture: number;\n /** @internal */\n currentQueueSize: number;\n /** @internal */\n release = () => {};\n promise = this.newPromise();\n /** @internal */\n timeout?: ReturnType<typeof setTimeout> = undefined;\n /** @internal */\n closed = false;\n\n sampleRate: number;\n numChannels: number;\n queueSize: number;\n\n constructor(sampleRate: number, numChannels: number, queueSize = 1000) {\n this.sampleRate = sampleRate;\n this.numChannels = numChannels;\n this.queueSize = queueSize;\n\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n\n const req = new NewAudioSourceRequest({\n type: AudioSourceType.AUDIO_SOURCE_NATIVE,\n sampleRate: sampleRate,\n numChannels: numChannels,\n queueSizeMs: queueSize,\n });\n\n const res = FfiClient.instance.request<NewAudioSourceResponse>({\n message: {\n case: 'newAudioSource',\n value: req,\n },\n });\n\n this.info = res.source!.info!;\n this.ffiHandle = new FfiHandle(res.source!.handle!.id!);\n }\n\n get queuedDuration(): number {\n return Math.max(\n this.currentQueueSize - Number(process.hrtime.bigint() / BigInt(1000000)) + this.lastCapture,\n 0,\n );\n }\n\n clearQueue() {\n const req = new ClearAudioBufferRequest({\n sourceHandle: this.ffiHandle.handle,\n });\n\n FfiClient.instance.request<ClearAudioBufferResponse>({\n message: {\n case: 'clearAudioBuffer',\n value: req,\n },\n });\n\n this.release();\n }\n\n /** @internal */\n async newPromise() {\n return new Promise<void>((resolve) => {\n this.release = resolve;\n });\n }\n\n async waitForPlayout() {\n return this.promise.then(() => {\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n this.promise = this.newPromise();\n });\n }\n\n async captureFrame(frame: AudioFrame) {\n if (this.closed) {\n throw new Error('AudioSource is closed');\n }\n const now = Number(process.hrtime.bigint() / BigInt(1000000));\n const elapsed = this.lastCapture === 0 ? 0 : now - this.lastCapture;\n const frameDurationMs = (frame.samplesPerChannel / frame.sampleRate) * 1000;\n this.currentQueueSize += frameDurationMs - elapsed;\n\n this.lastCapture = now;\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n // remove 50ms to account for processing time\n // (e.g. using wait_for_playout for very small chunks)\n this.timeout = setTimeout(this.release, this.currentQueueSize - 50);\n\n const req = new CaptureAudioFrameRequest({\n sourceHandle: this.ffiHandle.handle,\n buffer: frame.protoInfo(),\n });\n\n const res = FfiClient.instance.request<CaptureAudioFrameResponse>({\n message: { case: 'captureAudioFrame', value: req },\n });\n\n const cb = await FfiClient.instance.waitFor<CaptureAudioFrameCallback>((ev) => {\n return ev.message.case == 'captureAudioFrame' && ev.message.value.asyncId == res.asyncId;\n });\n\n if (cb.error) {\n throw new Error(cb.error);\n }\n }\n\n async close() {\n this.ffiHandle.dispose();\n this.closed = true;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAA0B;AAC1B,oBAA0B;AAQ1B,4BAKO;AAEA,MAAM,YAAY;AAAA,EAqBvB,YAAY,YAAoB,aAAqB,YAAY,KAAM;AAXvE;AAAA,mBAAU,MAAM;AAAA,IAAC;AACjB,mBAAU,KAAK,WAAW;AAE1B;AAAA,mBAA0C;AAE1C;AAAA,kBAAS;AAOP,SAAK,aAAa;AAClB,SAAK,cAAc;AACnB,SAAK,YAAY;AAEjB,SAAK,cAAc;AACnB,SAAK,mBAAmB;AAExB,UAAM,MAAM,IAAI,4CAAsB;AAAA,MACpC,MAAM,sCAAgB;AAAA,MACtB;AAAA,MACA;AAAA,MACA,aAAa;AAAA,IACf,CAAC;AAED,UAAM,MAAM,4BAAU,SAAS,QAAgC;AAAA,MAC7D,SAAS;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF,CAAC;AAED,SAAK,OAAO,IAAI,OAAQ;AACxB,SAAK,YAAY,IAAI,wBAAU,IAAI,OAAQ,OAAQ,EAAG;AAAA,EACxD;AAAA,EAEA,IAAI,iBAAyB;AAC3B,WAAO,KAAK;AAAA,MACV,KAAK,mBAAmB,OAAO,QAAQ,OAAO,OAAO,IAAI,OAAO,GAAO,CAAC,IAAI,KAAK;AAAA,MACjF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,aAAa;AACX,UAAM,MAAM,IAAI,8CAAwB;AAAA,MACtC,cAAc,KAAK,UAAU;AAAA,IAC/B,CAAC;AAED,gCAAU,SAAS,QAAkC;AAAA,MACnD,SAAS;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF,CAAC;AAED,SAAK,QAAQ;AAAA,EACf;AAAA;AAAA,EAGA,MAAM,aAAa;AACjB,WAAO,IAAI,QAAc,CAAC,YAAY;AACpC,WAAK,UAAU;AAAA,IACjB,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,iBAAiB;AACrB,WAAO,KAAK,QAAQ,KAAK,MAAM;AAC7B,WAAK,cAAc;AACnB,WAAK,mBAAmB;AACxB,WAAK,UAAU,KAAK,WAAW;AAAA,IACjC,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,aAAa,OAAmB;AACpC,QAAI,KAAK,QAAQ;AACf,YAAM,IAAI,MAAM,uBAAuB;AAAA,IACzC;AACA,UAAM,MAAM,OAAO,QAAQ,OAAO,OAAO,IAAI,OAAO,GAAO,CAAC;AAC5D,UAAM,UAAU,KAAK,gBAAgB,IAAI,IAAI,MAAM,KAAK;AACxD,UAAM,kBAAmB,MAAM,oBAAoB,MAAM,aAAc;AACvE,SAAK,oBAAoB,kBAAkB;AAE3C,SAAK,cAAc;AAEnB,QAAI,KAAK,SAAS;AAChB,mBAAa,KAAK,OAAO;AAAA,IAC3B;AAIA,SAAK,UAAU,WAAW,KAAK,SAAS,KAAK,mBAAmB,EAAE;AAElE,UAAM,MAAM,IAAI,+CAAyB;AAAA,MACvC,cAAc,KAAK,UAAU;AAAA,MAC7B,QAAQ,MAAM,UAAU;AAAA,IAC1B,CAAC;AAED,UAAM,MAAM,4BAAU,SAAS,QAAmC;AAAA,MAChE,SAAS,EAAE,MAAM,qBAAqB,OAAO,IAAI;AAAA,IACnD,CAAC;AAED,UAAM,KAAK,MAAM,4BAAU,SAAS,QAAmC,CAAC,OAAO;AAC7E,aAAO,GAAG,QAAQ,QAAQ,uBAAuB,GAAG,QAAQ,MAAM,WAAW,IAAI;AAAA,IACnF,CAAC;AAED,QAAI,GAAG,OAAO;AACZ,YAAM,IAAI,MAAM,GAAG,KAAK;AAAA,IAC1B;AAAA,EACF;AAAA,EAEA,MAAM,QAAQ;AACZ,SAAK,UAAU,QAAQ;AACvB,SAAK,SAAS;AAAA,EAChB;AACF;","names":[]}
|
package/dist/audio_source.d.cts
CHANGED
package/dist/audio_source.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio_source.d.ts","sourceRoot":"","sources":["../src/audio_source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,2BAA2B,CAAC;AAQnC,qBAAa,WAAW;IACtB,gBAAgB;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB,gBAAgB;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB;IAChB,OAAO,aAAY;IACnB,OAAO,gBAAqB;IAC5B,gBAAgB;IAChB,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAa;
|
|
1
|
+
{"version":3,"file":"audio_source.d.ts","sourceRoot":"","sources":["../src/audio_source.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EACV,eAAe,EAKhB,MAAM,2BAA2B,CAAC;AAQnC,qBAAa,WAAW;IACtB,gBAAgB;IAChB,IAAI,EAAE,eAAe,CAAC;IACtB,gBAAgB;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,gBAAgB;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB;IAChB,OAAO,aAAY;IACnB,OAAO,gBAAqB;IAC5B,gBAAgB;IAChB,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAa;IACpD,gBAAgB;IAChB,MAAM,UAAS;IAEf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;gBAEN,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,SAAO;IA0BrE,IAAI,cAAc,IAAI,MAAM,CAK3B;IAED,UAAU;IAeV,gBAAgB;IACV,UAAU;IAMV,cAAc;IAQd,YAAY,CAAC,KAAK,EAAE,UAAU;IAqC9B,KAAK;CAIZ"}
|
package/dist/audio_source.js
CHANGED
|
@@ -14,6 +14,8 @@ class AudioSource {
|
|
|
14
14
|
this.promise = this.newPromise();
|
|
15
15
|
/** @internal */
|
|
16
16
|
this.timeout = void 0;
|
|
17
|
+
/** @internal */
|
|
18
|
+
this.closed = false;
|
|
17
19
|
this.sampleRate = sampleRate;
|
|
18
20
|
this.numChannels = numChannels;
|
|
19
21
|
this.queueSize = queueSize;
|
|
@@ -66,6 +68,9 @@ class AudioSource {
|
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
70
|
async captureFrame(frame) {
|
|
71
|
+
if (this.closed) {
|
|
72
|
+
throw new Error("AudioSource is closed");
|
|
73
|
+
}
|
|
69
74
|
const now = Number(process.hrtime.bigint() / BigInt(1e6));
|
|
70
75
|
const elapsed = this.lastCapture === 0 ? 0 : now - this.lastCapture;
|
|
71
76
|
const frameDurationMs = frame.samplesPerChannel / frame.sampleRate * 1e3;
|
|
@@ -91,6 +96,7 @@ class AudioSource {
|
|
|
91
96
|
}
|
|
92
97
|
async close() {
|
|
93
98
|
this.ffiHandle.dispose();
|
|
99
|
+
this.closed = true;
|
|
94
100
|
}
|
|
95
101
|
}
|
|
96
102
|
export {
|
package/dist/audio_source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/audio_source.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { AudioFrame } from './audio_frame.js';\nimport { FfiClient } from './ffi_client.js';\nimport { FfiHandle } from './napi/native.js';\nimport type {\n AudioSourceInfo,\n CaptureAudioFrameCallback,\n CaptureAudioFrameResponse,\n ClearAudioBufferResponse,\n NewAudioSourceResponse,\n} from './proto/audio_frame_pb.js';\nimport {\n AudioSourceType,\n CaptureAudioFrameRequest,\n ClearAudioBufferRequest,\n NewAudioSourceRequest,\n} from './proto/audio_frame_pb.js';\n\nexport class AudioSource {\n /** @internal */\n info: AudioSourceInfo;\n /** @internal */\n ffiHandle: FfiHandle;\n /** @internal */\n lastCapture: number;\n /** @internal */\n currentQueueSize: number;\n /** @internal */\n release = () => {};\n promise = this.newPromise();\n /** @internal */\n timeout?: ReturnType<typeof setTimeout> = undefined;\n\n sampleRate: number;\n numChannels: number;\n queueSize: number;\n\n constructor(sampleRate: number, numChannels: number, queueSize = 1000) {\n this.sampleRate = sampleRate;\n this.numChannels = numChannels;\n this.queueSize = queueSize;\n\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n\n const req = new NewAudioSourceRequest({\n type: AudioSourceType.AUDIO_SOURCE_NATIVE,\n sampleRate: sampleRate,\n numChannels: numChannels,\n queueSizeMs: queueSize,\n });\n\n const res = FfiClient.instance.request<NewAudioSourceResponse>({\n message: {\n case: 'newAudioSource',\n value: req,\n },\n });\n\n this.info = res.source!.info!;\n this.ffiHandle = new FfiHandle(res.source!.handle!.id!);\n }\n\n get queuedDuration(): number {\n return Math.max(\n this.currentQueueSize - Number(process.hrtime.bigint() / BigInt(1000000)) + this.lastCapture,\n 0,\n );\n }\n\n clearQueue() {\n const req = new ClearAudioBufferRequest({\n sourceHandle: this.ffiHandle.handle,\n });\n\n FfiClient.instance.request<ClearAudioBufferResponse>({\n message: {\n case: 'clearAudioBuffer',\n value: req,\n },\n });\n\n this.release();\n }\n\n /** @internal */\n async newPromise() {\n return new Promise<void>((resolve) => {\n this.release = resolve;\n });\n }\n\n async waitForPlayout() {\n return this.promise.then(() => {\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n this.promise = this.newPromise();\n });\n }\n\n async captureFrame(frame: AudioFrame) {\n const now = Number(process.hrtime.bigint() / BigInt(1000000));\n const elapsed = this.lastCapture === 0 ? 0 : now - this.lastCapture;\n const frameDurationMs = (frame.samplesPerChannel / frame.sampleRate) * 1000;\n this.currentQueueSize += frameDurationMs - elapsed;\n\n this.lastCapture = now;\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n // remove 50ms to account for processing time\n // (e.g. using wait_for_playout for very small chunks)\n this.timeout = setTimeout(this.release, this.currentQueueSize - 50);\n\n const req = new CaptureAudioFrameRequest({\n sourceHandle: this.ffiHandle.handle,\n buffer: frame.protoInfo(),\n });\n\n const res = FfiClient.instance.request<CaptureAudioFrameResponse>({\n message: { case: 'captureAudioFrame', value: req },\n });\n\n const cb = await FfiClient.instance.waitFor<CaptureAudioFrameCallback>((ev) => {\n return ev.message.case == 'captureAudioFrame' && ev.message.value.asyncId == res.asyncId;\n });\n\n if (cb.error) {\n throw new Error(cb.error);\n }\n }\n\n async close() {\n this.ffiHandle.dispose();\n }\n}\n"],"mappings":"AAIA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAQ1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,YAAY;AAAA,
|
|
1
|
+
{"version":3,"sources":["../src/audio_source.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2024 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type { AudioFrame } from './audio_frame.js';\nimport { FfiClient } from './ffi_client.js';\nimport { FfiHandle } from './napi/native.js';\nimport type {\n AudioSourceInfo,\n CaptureAudioFrameCallback,\n CaptureAudioFrameResponse,\n ClearAudioBufferResponse,\n NewAudioSourceResponse,\n} from './proto/audio_frame_pb.js';\nimport {\n AudioSourceType,\n CaptureAudioFrameRequest,\n ClearAudioBufferRequest,\n NewAudioSourceRequest,\n} from './proto/audio_frame_pb.js';\n\nexport class AudioSource {\n /** @internal */\n info: AudioSourceInfo;\n /** @internal */\n ffiHandle: FfiHandle;\n /** @internal */\n lastCapture: number;\n /** @internal */\n currentQueueSize: number;\n /** @internal */\n release = () => {};\n promise = this.newPromise();\n /** @internal */\n timeout?: ReturnType<typeof setTimeout> = undefined;\n /** @internal */\n closed = false;\n\n sampleRate: number;\n numChannels: number;\n queueSize: number;\n\n constructor(sampleRate: number, numChannels: number, queueSize = 1000) {\n this.sampleRate = sampleRate;\n this.numChannels = numChannels;\n this.queueSize = queueSize;\n\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n\n const req = new NewAudioSourceRequest({\n type: AudioSourceType.AUDIO_SOURCE_NATIVE,\n sampleRate: sampleRate,\n numChannels: numChannels,\n queueSizeMs: queueSize,\n });\n\n const res = FfiClient.instance.request<NewAudioSourceResponse>({\n message: {\n case: 'newAudioSource',\n value: req,\n },\n });\n\n this.info = res.source!.info!;\n this.ffiHandle = new FfiHandle(res.source!.handle!.id!);\n }\n\n get queuedDuration(): number {\n return Math.max(\n this.currentQueueSize - Number(process.hrtime.bigint() / BigInt(1000000)) + this.lastCapture,\n 0,\n );\n }\n\n clearQueue() {\n const req = new ClearAudioBufferRequest({\n sourceHandle: this.ffiHandle.handle,\n });\n\n FfiClient.instance.request<ClearAudioBufferResponse>({\n message: {\n case: 'clearAudioBuffer',\n value: req,\n },\n });\n\n this.release();\n }\n\n /** @internal */\n async newPromise() {\n return new Promise<void>((resolve) => {\n this.release = resolve;\n });\n }\n\n async waitForPlayout() {\n return this.promise.then(() => {\n this.lastCapture = 0;\n this.currentQueueSize = 0;\n this.promise = this.newPromise();\n });\n }\n\n async captureFrame(frame: AudioFrame) {\n if (this.closed) {\n throw new Error('AudioSource is closed');\n }\n const now = Number(process.hrtime.bigint() / BigInt(1000000));\n const elapsed = this.lastCapture === 0 ? 0 : now - this.lastCapture;\n const frameDurationMs = (frame.samplesPerChannel / frame.sampleRate) * 1000;\n this.currentQueueSize += frameDurationMs - elapsed;\n\n this.lastCapture = now;\n\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n\n // remove 50ms to account for processing time\n // (e.g. using wait_for_playout for very small chunks)\n this.timeout = setTimeout(this.release, this.currentQueueSize - 50);\n\n const req = new CaptureAudioFrameRequest({\n sourceHandle: this.ffiHandle.handle,\n buffer: frame.protoInfo(),\n });\n\n const res = FfiClient.instance.request<CaptureAudioFrameResponse>({\n message: { case: 'captureAudioFrame', value: req },\n });\n\n const cb = await FfiClient.instance.waitFor<CaptureAudioFrameCallback>((ev) => {\n return ev.message.case == 'captureAudioFrame' && ev.message.value.asyncId == res.asyncId;\n });\n\n if (cb.error) {\n throw new Error(cb.error);\n }\n }\n\n async close() {\n this.ffiHandle.dispose();\n this.closed = true;\n }\n}\n"],"mappings":"AAIA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAQ1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,YAAY;AAAA,EAqBvB,YAAY,YAAoB,aAAqB,YAAY,KAAM;AAXvE;AAAA,mBAAU,MAAM;AAAA,IAAC;AACjB,mBAAU,KAAK,WAAW;AAE1B;AAAA,mBAA0C;AAE1C;AAAA,kBAAS;AAOP,SAAK,aAAa;AAClB,SAAK,cAAc;AACnB,SAAK,YAAY;AAEjB,SAAK,cAAc;AACnB,SAAK,mBAAmB;AAExB,UAAM,MAAM,IAAI,sBAAsB;AAAA,MACpC,MAAM,gBAAgB;AAAA,MACtB;AAAA,MACA;AAAA,MACA,aAAa;AAAA,IACf,CAAC;AAED,UAAM,MAAM,UAAU,SAAS,QAAgC;AAAA,MAC7D,SAAS;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF,CAAC;AAED,SAAK,OAAO,IAAI,OAAQ;AACxB,SAAK,YAAY,IAAI,UAAU,IAAI,OAAQ,OAAQ,EAAG;AAAA,EACxD;AAAA,EAEA,IAAI,iBAAyB;AAC3B,WAAO,KAAK;AAAA,MACV,KAAK,mBAAmB,OAAO,QAAQ,OAAO,OAAO,IAAI,OAAO,GAAO,CAAC,IAAI,KAAK;AAAA,MACjF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,aAAa;AACX,UAAM,MAAM,IAAI,wBAAwB;AAAA,MACtC,cAAc,KAAK,UAAU;AAAA,IAC/B,CAAC;AAED,cAAU,SAAS,QAAkC;AAAA,MACnD,SAAS;AAAA,QACP,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF,CAAC;AAED,SAAK,QAAQ;AAAA,EACf;AAAA;AAAA,EAGA,MAAM,aAAa;AACjB,WAAO,IAAI,QAAc,CAAC,YAAY;AACpC,WAAK,UAAU;AAAA,IACjB,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,iBAAiB;AACrB,WAAO,KAAK,QAAQ,KAAK,MAAM;AAC7B,WAAK,cAAc;AACnB,WAAK,mBAAmB;AACxB,WAAK,UAAU,KAAK,WAAW;AAAA,IACjC,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,aAAa,OAAmB;AACpC,QAAI,KAAK,QAAQ;AACf,YAAM,IAAI,MAAM,uBAAuB;AAAA,IACzC;AACA,UAAM,MAAM,OAAO,QAAQ,OAAO,OAAO,IAAI,OAAO,GAAO,CAAC;AAC5D,UAAM,UAAU,KAAK,gBAAgB,IAAI,IAAI,MAAM,KAAK;AACxD,UAAM,kBAAmB,MAAM,oBAAoB,MAAM,aAAc;AACvE,SAAK,oBAAoB,kBAAkB;AAE3C,SAAK,cAAc;AAEnB,QAAI,KAAK,SAAS;AAChB,mBAAa,KAAK,OAAO;AAAA,IAC3B;AAIA,SAAK,UAAU,WAAW,KAAK,SAAS,KAAK,mBAAmB,EAAE;AAElE,UAAM,MAAM,IAAI,yBAAyB;AAAA,MACvC,cAAc,KAAK,UAAU;AAAA,MAC7B,QAAQ,MAAM,UAAU;AAAA,IAC1B,CAAC;AAED,UAAM,MAAM,UAAU,SAAS,QAAmC;AAAA,MAChE,SAAS,EAAE,MAAM,qBAAqB,OAAO,IAAI;AAAA,IACnD,CAAC;AAED,UAAM,KAAK,MAAM,UAAU,SAAS,QAAmC,CAAC,OAAO;AAC7E,aAAO,GAAG,QAAQ,QAAQ,uBAAuB,GAAG,QAAQ,MAAM,WAAW,IAAI;AAAA,IACnF,CAAC;AAED,QAAI,GAAG,OAAO;AACZ,YAAM,IAAI,MAAM,GAAG,KAAK;AAAA,IAC1B;AAAA,EACF;AAAA,EAEA,MAAM,QAAQ;AACZ,SAAK,UAAU,QAAQ;AACvB,SAAK,SAAS;AAAA,EAChB;AACF;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
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 '../
|
|
1
|
+
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-a8_oiaOi.cjs';
|
|
2
2
|
export { ByteStreamWriter, TextStreamWriter } from './stream_writer.cjs';
|
|
3
|
+
import 'node:stream/web';
|
|
3
4
|
import '../proto/room_pb.cjs';
|
|
4
5
|
import '@bufbuild/protobuf';
|
|
5
6
|
import '../proto/participant_pb.cjs';
|
|
@@ -8,4 +9,3 @@ import '../proto/track_pb.cjs';
|
|
|
8
9
|
import '../proto/stats_pb.cjs';
|
|
9
10
|
import '../proto/e2ee_pb.cjs';
|
|
10
11
|
import '../proto/video_frame_pb.cjs';
|
|
11
|
-
import 'node:stream/web';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
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 '../
|
|
1
|
+
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-DWUV4eJB.js';
|
|
2
2
|
export { ByteStreamWriter, TextStreamWriter } from './stream_writer.js';
|
|
3
|
+
import 'node:stream/web';
|
|
3
4
|
import '../proto/room_pb.js';
|
|
4
5
|
import '@bufbuild/protobuf';
|
|
5
6
|
import '../proto/participant_pb.js';
|
|
@@ -8,4 +9,3 @@ import '../proto/track_pb.js';
|
|
|
8
9
|
import '../proto/stats_pb.js';
|
|
9
10
|
import '../proto/e2ee_pb.js';
|
|
10
11
|
import '../proto/video_frame_pb.js';
|
|
11
|
-
import 'node:stream/web';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:stream/web';
|
|
2
2
|
import '../proto/room_pb.cjs';
|
|
3
|
-
export { B as ByteStreamReader, T as TextStreamReader } from '../
|
|
3
|
+
export { B as ByteStreamReader, T as TextStreamReader } from '../stream_reader-a8_oiaOi.cjs';
|
|
4
4
|
import '@bufbuild/protobuf';
|
|
5
5
|
import '../proto/participant_pb.cjs';
|
|
6
6
|
import '../proto/handle_pb.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:stream/web';
|
|
2
2
|
import '../proto/room_pb.js';
|
|
3
|
-
export { B as ByteStreamReader, T as TextStreamReader } from '../
|
|
3
|
+
export { B as ByteStreamReader, T as TextStreamReader } from '../stream_reader-DWUV4eJB.js';
|
|
4
4
|
import '@bufbuild/protobuf';
|
|
5
5
|
import '../proto/participant_pb.js';
|
|
6
6
|
import '../proto/handle_pb.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BaseStreamInfo, c as TextStreamInfo, b as ByteStreamInfo } from '../
|
|
1
|
+
import { a as BaseStreamInfo, c as TextStreamInfo, b as ByteStreamInfo } from '../stream_reader-a8_oiaOi.cjs';
|
|
2
2
|
import { WritableStream } from 'node:stream/web';
|
|
3
3
|
import '../proto/room_pb.cjs';
|
|
4
4
|
import '@bufbuild/protobuf';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BaseStreamInfo, c as TextStreamInfo, b as ByteStreamInfo } from '../
|
|
1
|
+
import { a as BaseStreamInfo, c as TextStreamInfo, b as ByteStreamInfo } from '../stream_reader-DWUV4eJB.js';
|
|
2
2
|
import { WritableStream } from 'node:stream/web';
|
|
3
3
|
import '../proto/room_pb.js';
|
|
4
4
|
import '@bufbuild/protobuf';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../proto/room_pb.cjs';
|
|
2
|
-
export { a as BaseStreamInfo, f as ByteStreamHandler, b as ByteStreamInfo, e as ByteStreamOptions, D as DataStreamOptions, S as StreamController, g as TextStreamHandler, c as TextStreamInfo, d as TextStreamOptions } from '../
|
|
2
|
+
export { a as BaseStreamInfo, f as ByteStreamHandler, b as ByteStreamInfo, e as ByteStreamOptions, D as DataStreamOptions, S as StreamController, g as TextStreamHandler, c as TextStreamInfo, d as TextStreamOptions } from '../stream_reader-a8_oiaOi.cjs';
|
|
3
3
|
import '@bufbuild/protobuf';
|
|
4
4
|
import '../proto/participant_pb.cjs';
|
|
5
5
|
import '../proto/handle_pb.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../proto/room_pb.js';
|
|
2
|
-
export { a as BaseStreamInfo, f as ByteStreamHandler, b as ByteStreamInfo, e as ByteStreamOptions, D as DataStreamOptions, S as StreamController, g as TextStreamHandler, c as TextStreamInfo, d as TextStreamOptions } from '../
|
|
2
|
+
export { a as BaseStreamInfo, f as ByteStreamHandler, b as ByteStreamInfo, e as ByteStreamOptions, D as DataStreamOptions, S as StreamController, g as TextStreamHandler, c as TextStreamInfo, d as TextStreamOptions } from '../stream_reader-DWUV4eJB.js';
|
|
3
3
|
import '@bufbuild/protobuf';
|
|
4
4
|
import '../proto/participant_pb.js';
|
|
5
5
|
import '../proto/handle_pb.js';
|
package/dist/index.cjs
CHANGED
|
@@ -29,6 +29,7 @@ __export(index_exports, {
|
|
|
29
29
|
ConnectionState: () => import_room_pb.ConnectionState,
|
|
30
30
|
ContinualGatheringPolicy: () => import_room_pb.ContinualGatheringPolicy,
|
|
31
31
|
DataPacketKind: () => import_room_pb.DataPacketKind,
|
|
32
|
+
DisconnectReason: () => import_participant_pb.DisconnectReason,
|
|
32
33
|
E2EEManager: () => import_e2ee.E2EEManager,
|
|
33
34
|
EncryptionState: () => import_e2ee_pb.EncryptionState,
|
|
34
35
|
EncryptionType: () => import_e2ee_pb.EncryptionType,
|
|
@@ -65,26 +66,26 @@ __export(index_exports, {
|
|
|
65
66
|
dispose: () => import_ffi_client.dispose
|
|
66
67
|
});
|
|
67
68
|
module.exports = __toCommonJS(index_exports);
|
|
68
|
-
var import_room = require("./room.cjs");
|
|
69
|
-
var import_participant = require("./participant.cjs");
|
|
70
|
-
var import_track = require("./track.cjs");
|
|
71
|
-
var import_video_frame = require("./video_frame.cjs");
|
|
72
69
|
var import_audio_frame = require("./audio_frame.cjs");
|
|
73
|
-
var import_audio_stream = require("./audio_stream.cjs");
|
|
74
70
|
var import_audio_resampler = require("./audio_resampler.cjs");
|
|
75
|
-
var import_video_stream = require("./video_stream.cjs");
|
|
76
71
|
var import_audio_source = require("./audio_source.cjs");
|
|
77
|
-
var
|
|
78
|
-
var import_track_publication = require("./track_publication.cjs");
|
|
79
|
-
var import_e2ee = require("./e2ee.cjs");
|
|
72
|
+
var import_audio_stream = require("./audio_stream.cjs");
|
|
80
73
|
__reExport(index_exports, require("./data_streams/index.cjs"), module.exports);
|
|
81
|
-
var
|
|
82
|
-
var
|
|
74
|
+
var import_e2ee = require("./e2ee.cjs");
|
|
75
|
+
var import_ffi_client = require("./ffi_client.cjs");
|
|
76
|
+
var import_participant = require("./participant.cjs");
|
|
83
77
|
var import_e2ee_pb = require("./proto/e2ee_pb.cjs");
|
|
78
|
+
var import_participant_pb = require("./proto/participant_pb.cjs");
|
|
79
|
+
var import_room_pb = require("./proto/room_pb.cjs");
|
|
84
80
|
var import_track_pb = require("./proto/track_pb.cjs");
|
|
85
81
|
var import_video_frame_pb = require("./proto/video_frame_pb.cjs");
|
|
86
|
-
var
|
|
87
|
-
var
|
|
82
|
+
var import_room = require("./room.cjs");
|
|
83
|
+
var import_rpc = require("./rpc.cjs");
|
|
84
|
+
var import_track = require("./track.cjs");
|
|
85
|
+
var import_track_publication = require("./track_publication.cjs");
|
|
86
|
+
var import_video_frame = require("./video_frame.cjs");
|
|
87
|
+
var import_video_source = require("./video_source.cjs");
|
|
88
|
+
var import_video_stream = require("./video_stream.cjs");
|
|
88
89
|
// Annotate the CommonJS export names for ESM import in node:
|
|
89
90
|
0 && (module.exports = {
|
|
90
91
|
AudioFrame,
|
|
@@ -97,6 +98,7 @@ var import_ffi_client = require("./ffi_client.cjs");
|
|
|
97
98
|
ConnectionState,
|
|
98
99
|
ContinualGatheringPolicy,
|
|
99
100
|
DataPacketKind,
|
|
101
|
+
DisconnectReason,
|
|
100
102
|
E2EEManager,
|
|
101
103
|
EncryptionState,
|
|
102
104
|
EncryptionType,
|
package/dist/index.cjs.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 {
|
|
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 * 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 './proto/e2ee_pb.js';\nexport { DisconnectReason, ParticipantKind } from './proto/participant_pb.js';\nexport {\n ConnectionQuality,\n ConnectionState,\n ContinualGatheringPolicy,\n DataPacketKind,\n IceServer,\n IceTransportType,\n TrackPublishOptions,\n} from './proto/room_pb.js';\nexport { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';\nexport { VideoBufferType, VideoCodec, VideoRotation } from './proto/video_frame_pb.js';\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';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,yBAA+C;AAC/C,6BAAsD;AACtD,0BAA4B;AAC5B,0BAA4B;AAC5B,0BAAc,oCARd;AASA,kBAAuD;AAEvD,wBAAwB;AACxB,yBAAiE;AACjE,qBAAgD;AAChD,4BAAkD;AAClD,qBAQO;AACP,sBAAoD;AACpD,4BAA2D;AAC3D,kBAAuF;AACvF,iBAAwE;AACxE,mBAUO;AACP,+BAIO;AAGP,yBAA2B;AAC3B,0BAA4B;AAC5B,0BAAkD;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export { ConnectError, Room, RoomEvent, RoomOptions, RtcConfiguration } from './room.cjs';
|
|
2
|
-
export { LocalParticipant, Participant, RemoteParticipant } from './participant.cjs';
|
|
3
|
-
export { AudioTrack, LocalAudioTrack, LocalTrack, LocalVideoTrack, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Track, VideoTrack } from './track.cjs';
|
|
4
|
-
export { VideoFrame } from './video_frame.cjs';
|
|
5
1
|
export { AudioFrame, combineAudioFrames } from './audio_frame.cjs';
|
|
6
|
-
export { AudioStream } from './audio_stream.cjs';
|
|
7
2
|
export { AudioResampler, AudioResamplerQuality } from './audio_resampler.cjs';
|
|
8
|
-
export { VideoFrameEvent, VideoStream } from './video_stream.cjs';
|
|
9
3
|
export { AudioSource } from './audio_source.cjs';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export { Transcription, TranscriptionSegment } from './transcription.cjs';
|
|
13
|
-
export { E2EEManager, E2EEOptions, FrameCryptor, KeyProvider, KeyProviderOptions } from './e2ee.cjs';
|
|
14
|
-
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 './types-B28ZM-Ci.cjs';
|
|
4
|
+
export { AudioStream } from './audio_stream.cjs';
|
|
5
|
+
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-a8_oiaOi.cjs';
|
|
15
6
|
export { ByteStreamWriter, TextStreamWriter } from './data_streams/stream_writer.cjs';
|
|
7
|
+
export { E2EEManager, E2EEOptions, FrameCryptor, KeyProvider, KeyProviderOptions } from './e2ee.cjs';
|
|
8
|
+
export { livekitDispose as dispose } from './napi/native.d.cjs';
|
|
16
9
|
export { ConnectionQuality, ConnectionState, ContinualGatheringPolicy, DataPacketKind, IceServer, IceTransportType, TrackPublishOptions } from './proto/room_pb.cjs';
|
|
17
|
-
export { PerformRpcParams, RpcError, RpcInvocationData } from './rpc.cjs';
|
|
18
|
-
export { EncryptionState, EncryptionType } from './proto/e2ee_pb.cjs';
|
|
19
10
|
export { StreamState, TrackKind, TrackSource } from './proto/track_pb.cjs';
|
|
20
11
|
export { VideoBufferType, VideoCodec, VideoRotation } from './proto/video_frame_pb.cjs';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
12
|
+
export { EncryptionState, EncryptionType } from './proto/e2ee_pb.cjs';
|
|
13
|
+
export { LocalParticipant, Participant, RemoteParticipant } from './participant.cjs';
|
|
14
|
+
export { DisconnectReason, ParticipantKind } from './proto/participant_pb.cjs';
|
|
15
|
+
export { ConnectError, Room, RoomEvent, RoomOptions, RtcConfiguration } from './room.cjs';
|
|
16
|
+
export { PerformRpcParams, RpcError, RpcInvocationData } from './rpc.cjs';
|
|
17
|
+
export { AudioTrack, LocalAudioTrack, LocalTrack, LocalVideoTrack, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Track, VideoTrack } from './track.cjs';
|
|
18
|
+
export { LocalTrackPublication, RemoteTrackPublication, TrackPublication } from './track_publication.cjs';
|
|
19
|
+
export { Transcription, TranscriptionSegment } from './transcription.cjs';
|
|
23
20
|
export { ChatMessage } from './types.cjs';
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export { VideoFrame } from './video_frame.cjs';
|
|
22
|
+
export { VideoSource } from './video_source.cjs';
|
|
23
|
+
export { VideoFrameEvent, VideoStream } from './video_stream.cjs';
|
|
26
24
|
import './proto/audio_frame_pb.cjs';
|
|
27
25
|
import '@bufbuild/protobuf';
|
|
28
26
|
import './proto/handle_pb.cjs';
|
|
29
27
|
import '@livekit/mutex';
|
|
30
28
|
import 'node:stream/web';
|
|
31
29
|
import './proto/stats_pb.cjs';
|
|
30
|
+
import 'node:fs';
|
|
31
|
+
import '@livekit/typed-emitter';
|
|
32
32
|
import './proto/rpc_pb.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export { ConnectError, Room, RoomEvent, RoomOptions, RtcConfiguration } from './room.js';
|
|
2
|
-
export { LocalParticipant, Participant, RemoteParticipant } from './participant.js';
|
|
3
|
-
export { AudioTrack, LocalAudioTrack, LocalTrack, LocalVideoTrack, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Track, VideoTrack } from './track.js';
|
|
4
|
-
export { VideoFrame } from './video_frame.js';
|
|
5
1
|
export { AudioFrame, combineAudioFrames } from './audio_frame.js';
|
|
6
|
-
export { AudioStream } from './audio_stream.js';
|
|
7
2
|
export { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';
|
|
8
|
-
export { VideoFrameEvent, VideoStream } from './video_stream.js';
|
|
9
3
|
export { AudioSource } from './audio_source.js';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export { Transcription, TranscriptionSegment } from './transcription.js';
|
|
13
|
-
export { E2EEManager, E2EEOptions, FrameCryptor, KeyProvider, KeyProviderOptions } from './e2ee.js';
|
|
14
|
-
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 './types-BDnbvXeD.js';
|
|
4
|
+
export { AudioStream } from './audio_stream.js';
|
|
5
|
+
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-DWUV4eJB.js';
|
|
15
6
|
export { ByteStreamWriter, TextStreamWriter } from './data_streams/stream_writer.js';
|
|
7
|
+
export { E2EEManager, E2EEOptions, FrameCryptor, KeyProvider, KeyProviderOptions } from './e2ee.js';
|
|
8
|
+
export { livekitDispose as dispose } from './napi/native.d.js';
|
|
16
9
|
export { ConnectionQuality, ConnectionState, ContinualGatheringPolicy, DataPacketKind, IceServer, IceTransportType, TrackPublishOptions } from './proto/room_pb.js';
|
|
17
|
-
export { PerformRpcParams, RpcError, RpcInvocationData } from './rpc.js';
|
|
18
|
-
export { EncryptionState, EncryptionType } from './proto/e2ee_pb.js';
|
|
19
10
|
export { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';
|
|
20
11
|
export { VideoBufferType, VideoCodec, VideoRotation } from './proto/video_frame_pb.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
12
|
+
export { EncryptionState, EncryptionType } from './proto/e2ee_pb.js';
|
|
13
|
+
export { LocalParticipant, Participant, RemoteParticipant } from './participant.js';
|
|
14
|
+
export { DisconnectReason, ParticipantKind } from './proto/participant_pb.js';
|
|
15
|
+
export { ConnectError, Room, RoomEvent, RoomOptions, RtcConfiguration } from './room.js';
|
|
16
|
+
export { PerformRpcParams, RpcError, RpcInvocationData } from './rpc.js';
|
|
17
|
+
export { AudioTrack, LocalAudioTrack, LocalTrack, LocalVideoTrack, RemoteAudioTrack, RemoteTrack, RemoteVideoTrack, Track, VideoTrack } from './track.js';
|
|
18
|
+
export { LocalTrackPublication, RemoteTrackPublication, TrackPublication } from './track_publication.js';
|
|
19
|
+
export { Transcription, TranscriptionSegment } from './transcription.js';
|
|
23
20
|
export { ChatMessage } from './types.js';
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export { VideoFrame } from './video_frame.js';
|
|
22
|
+
export { VideoSource } from './video_source.js';
|
|
23
|
+
export { VideoFrameEvent, VideoStream } from './video_stream.js';
|
|
26
24
|
import './proto/audio_frame_pb.js';
|
|
27
25
|
import '@bufbuild/protobuf';
|
|
28
26
|
import './proto/handle_pb.js';
|
|
29
27
|
import '@livekit/mutex';
|
|
30
28
|
import 'node:stream/web';
|
|
31
29
|
import './proto/stats_pb.js';
|
|
30
|
+
import 'node:fs';
|
|
31
|
+
import '@livekit/typed-emitter';
|
|
32
32
|
import './proto/rpc_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,
|
|
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,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,oBAAoB,CAAC;AACrE,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,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,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"}
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { Room, RoomEvent, ConnectError } from "./room.js";
|
|
2
|
-
import { Participant, RemoteParticipant, LocalParticipant } from "./participant.js";
|
|
3
|
-
import {
|
|
4
|
-
Track,
|
|
5
|
-
LocalAudioTrack,
|
|
6
|
-
LocalVideoTrack,
|
|
7
|
-
RemoteAudioTrack,
|
|
8
|
-
RemoteVideoTrack
|
|
9
|
-
} from "./track.js";
|
|
10
|
-
import { VideoFrame } from "./video_frame.js";
|
|
11
1
|
import { AudioFrame, combineAudioFrames } from "./audio_frame.js";
|
|
12
|
-
import { AudioStream } from "./audio_stream.js";
|
|
13
2
|
import { AudioResampler, AudioResamplerQuality } from "./audio_resampler.js";
|
|
14
|
-
import { VideoStream } from "./video_stream.js";
|
|
15
3
|
import { AudioSource } from "./audio_source.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
TrackPublication,
|
|
19
|
-
RemoteTrackPublication,
|
|
20
|
-
LocalTrackPublication
|
|
21
|
-
} from "./track_publication.js";
|
|
22
|
-
import { E2EEManager, KeyProvider, FrameCryptor } from "./e2ee.js";
|
|
4
|
+
import { AudioStream } from "./audio_stream.js";
|
|
23
5
|
export * from "./data_streams/index.js";
|
|
6
|
+
import { E2EEManager, FrameCryptor, KeyProvider } from "./e2ee.js";
|
|
7
|
+
import { dispose } from "./ffi_client.js";
|
|
8
|
+
import { LocalParticipant, Participant, RemoteParticipant } from "./participant.js";
|
|
9
|
+
import { EncryptionState, EncryptionType } from "./proto/e2ee_pb.js";
|
|
10
|
+
import { DisconnectReason, ParticipantKind } from "./proto/participant_pb.js";
|
|
24
11
|
import {
|
|
25
12
|
ConnectionQuality,
|
|
13
|
+
ConnectionState,
|
|
14
|
+
ContinualGatheringPolicy,
|
|
15
|
+
DataPacketKind,
|
|
26
16
|
IceServer,
|
|
27
17
|
IceTransportType,
|
|
28
|
-
|
|
29
|
-
ContinualGatheringPolicy,
|
|
30
|
-
TrackPublishOptions,
|
|
31
|
-
ConnectionState
|
|
18
|
+
TrackPublishOptions
|
|
32
19
|
} from "./proto/room_pb.js";
|
|
33
|
-
import { RpcError } from "./rpc.js";
|
|
34
|
-
import { EncryptionType, EncryptionState } from "./proto/e2ee_pb.js";
|
|
35
20
|
import { StreamState, TrackKind, TrackSource } from "./proto/track_pb.js";
|
|
36
|
-
import { VideoBufferType,
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
21
|
+
import { VideoBufferType, VideoCodec, VideoRotation } from "./proto/video_frame_pb.js";
|
|
22
|
+
import { ConnectError, Room, RoomEvent } from "./room.js";
|
|
23
|
+
import { RpcError } from "./rpc.js";
|
|
24
|
+
import {
|
|
25
|
+
LocalAudioTrack,
|
|
26
|
+
LocalVideoTrack,
|
|
27
|
+
RemoteAudioTrack,
|
|
28
|
+
RemoteVideoTrack,
|
|
29
|
+
Track
|
|
30
|
+
} from "./track.js";
|
|
31
|
+
import {
|
|
32
|
+
LocalTrackPublication,
|
|
33
|
+
RemoteTrackPublication,
|
|
34
|
+
TrackPublication
|
|
35
|
+
} from "./track_publication.js";
|
|
36
|
+
import { VideoFrame } from "./video_frame.js";
|
|
37
|
+
import { VideoSource } from "./video_source.js";
|
|
38
|
+
import { VideoStream } from "./video_stream.js";
|
|
39
39
|
export {
|
|
40
40
|
AudioFrame,
|
|
41
41
|
AudioResampler,
|
|
@@ -47,6 +47,7 @@ export {
|
|
|
47
47
|
ConnectionState,
|
|
48
48
|
ContinualGatheringPolicy,
|
|
49
49
|
DataPacketKind,
|
|
50
|
+
DisconnectReason,
|
|
50
51
|
E2EEManager,
|
|
51
52
|
EncryptionState,
|
|
52
53
|
EncryptionType,
|
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 {
|
|
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 * 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 './proto/e2ee_pb.js';\nexport { DisconnectReason, ParticipantKind } from './proto/participant_pb.js';\nexport {\n ConnectionQuality,\n ConnectionState,\n ContinualGatheringPolicy,\n DataPacketKind,\n IceServer,\n IceTransportType,\n TrackPublishOptions,\n} from './proto/room_pb.js';\nexport { StreamState, TrackKind, TrackSource } from './proto/track_pb.js';\nexport { VideoBufferType, VideoCodec, VideoRotation } from './proto/video_frame_pb.js';\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';\n"],"mappings":"AAIA,SAAS,YAAY,0BAA0B;AAC/C,SAAS,gBAAgB,6BAA6B;AACtD,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,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;","names":[]}
|
package/dist/participant.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BaseStreamInfo, e as ByteStreamOptions } from './
|
|
1
|
+
import { a as BaseStreamInfo, e as ByteStreamOptions } from './stream_reader-a8_oiaOi.cjs';
|
|
2
2
|
import { PathLike } from 'node:fs';
|
|
3
3
|
import { TrackPublishOptions } from './proto/room_pb.cjs';
|
|
4
4
|
import { TextStreamWriter, ByteStreamWriter } from './data_streams/stream_writer.cjs';
|
|
@@ -6,7 +6,7 @@ import { FfiHandle } from './napi/native.d.cjs';
|
|
|
6
6
|
import { ParticipantInfo, OwnedParticipant, ParticipantKind, DisconnectReason } from './proto/participant_pb.cjs';
|
|
7
7
|
import { PerformRpcParams, RpcInvocationData } from './rpc.cjs';
|
|
8
8
|
import { LocalTrack } from './track.cjs';
|
|
9
|
-
import { TrackPublication,
|
|
9
|
+
import { TrackPublication, LocalTrackPublication, RemoteTrackPublication } from './track_publication.cjs';
|
|
10
10
|
import { Transcription } from './transcription.cjs';
|
|
11
11
|
import { ChatMessage } from './types.cjs';
|
|
12
12
|
import 'node:stream/web';
|
package/dist/participant.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as BaseStreamInfo, e as ByteStreamOptions } from './
|
|
1
|
+
import { a as BaseStreamInfo, e as ByteStreamOptions } from './stream_reader-DWUV4eJB.js';
|
|
2
2
|
import { PathLike } from 'node:fs';
|
|
3
3
|
import { TrackPublishOptions } from './proto/room_pb.js';
|
|
4
4
|
import { TextStreamWriter, ByteStreamWriter } from './data_streams/stream_writer.js';
|
|
@@ -6,7 +6,7 @@ import { FfiHandle } from './napi/native.d.js';
|
|
|
6
6
|
import { ParticipantInfo, OwnedParticipant, ParticipantKind, DisconnectReason } from './proto/participant_pb.js';
|
|
7
7
|
import { PerformRpcParams, RpcInvocationData } from './rpc.js';
|
|
8
8
|
import { LocalTrack } from './track.js';
|
|
9
|
-
import { TrackPublication,
|
|
9
|
+
import { TrackPublication, LocalTrackPublication, RemoteTrackPublication } from './track_publication.js';
|
|
10
10
|
import { Transcription } from './transcription.js';
|
|
11
11
|
import { ChatMessage } from './types.js';
|
|
12
12
|
import 'node:stream/web';
|
package/dist/proto/ffi_pb.cjs
CHANGED
|
@@ -96,6 +96,7 @@ _FfiRequest.fields = import_protobuf.proto2.util.newFieldList(() => [
|
|
|
96
96
|
{ no: 17, name: "local_track_mute", kind: "message", T: import_track_pb.LocalTrackMuteRequest, oneof: "message" },
|
|
97
97
|
{ no: 18, name: "enable_remote_track", kind: "message", T: import_track_pb.EnableRemoteTrackRequest, oneof: "message" },
|
|
98
98
|
{ no: 19, name: "get_stats", kind: "message", T: import_track_pb.GetStatsRequest, oneof: "message" },
|
|
99
|
+
{ no: 48, name: "set_track_subscription_permissions", kind: "message", T: import_track_pb.SetTrackSubscriptionPermissionsRequest, oneof: "message" },
|
|
99
100
|
{ no: 20, name: "new_video_stream", kind: "message", T: import_video_frame_pb.NewVideoStreamRequest, oneof: "message" },
|
|
100
101
|
{ no: 21, name: "new_video_source", kind: "message", T: import_video_frame_pb.NewVideoSourceRequest, oneof: "message" },
|
|
101
102
|
{ no: 22, name: "capture_video_frame", kind: "message", T: import_video_frame_pb.CaptureVideoFrameRequest, oneof: "message" },
|
|
@@ -169,6 +170,7 @@ _FfiResponse.fields = import_protobuf.proto2.util.newFieldList(() => [
|
|
|
169
170
|
{ no: 17, name: "local_track_mute", kind: "message", T: import_track_pb.LocalTrackMuteResponse, oneof: "message" },
|
|
170
171
|
{ no: 18, name: "enable_remote_track", kind: "message", T: import_track_pb.EnableRemoteTrackResponse, oneof: "message" },
|
|
171
172
|
{ no: 19, name: "get_stats", kind: "message", T: import_track_pb.GetStatsResponse, oneof: "message" },
|
|
173
|
+
{ no: 47, name: "set_track_subscription_permissions", kind: "message", T: import_track_pb.SetTrackSubscriptionPermissionsResponse, oneof: "message" },
|
|
172
174
|
{ no: 20, name: "new_video_stream", kind: "message", T: import_video_frame_pb.NewVideoStreamResponse, oneof: "message" },
|
|
173
175
|
{ no: 21, name: "new_video_source", kind: "message", T: import_video_frame_pb.NewVideoSourceResponse, oneof: "message" },
|
|
174
176
|
{ no: 22, name: "capture_video_frame", kind: "message", T: import_video_frame_pb.CaptureVideoFrameResponse, oneof: "message" },
|