@node-webrtc-rust/bindings 0.5.5 → 0.6.0
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/index.d.ts +1 -1
- package/index.js +43 -40
- package/package.json +7 -7
package/index.d.ts
CHANGED
|
@@ -352,7 +352,7 @@ export declare class JsVoiceAgent {
|
|
|
352
352
|
attach(outboundTrack: JsLocalAudioTrack): Promise<void>
|
|
353
353
|
start(): Promise<void>
|
|
354
354
|
stop(): Promise<void>
|
|
355
|
-
sendTextToTts(text: string): Promise<void>
|
|
355
|
+
sendTextToTts(text: string, nonBlocking?: boolean | undefined | null): Promise<void>
|
|
356
356
|
flushTts(): Promise<void>
|
|
357
357
|
/** Wait until outbound TTS playback finishes (synthesis queue drained and agent not speaking). */
|
|
358
358
|
waitTtsPlaybackIdle(): Promise<void>
|
package/index.js
CHANGED
|
@@ -62,7 +62,9 @@ switch (platform) {
|
|
|
62
62
|
case 'win32':
|
|
63
63
|
switch (arch) {
|
|
64
64
|
case 'x64':
|
|
65
|
-
localFileExisted = existsSync(
|
|
65
|
+
localFileExisted = existsSync(
|
|
66
|
+
join(__dirname, 'node-webrtc-rust.win32-x64-msvc.node')
|
|
67
|
+
)
|
|
66
68
|
try {
|
|
67
69
|
if (localFileExisted) {
|
|
68
70
|
nativeBinding = require('./node-webrtc-rust.win32-x64-msvc.node')
|
|
@@ -74,7 +76,9 @@ switch (platform) {
|
|
|
74
76
|
}
|
|
75
77
|
break
|
|
76
78
|
case 'ia32':
|
|
77
|
-
localFileExisted = existsSync(
|
|
79
|
+
localFileExisted = existsSync(
|
|
80
|
+
join(__dirname, 'node-webrtc-rust.win32-ia32-msvc.node')
|
|
81
|
+
)
|
|
78
82
|
try {
|
|
79
83
|
if (localFileExisted) {
|
|
80
84
|
nativeBinding = require('./node-webrtc-rust.win32-ia32-msvc.node')
|
|
@@ -86,7 +90,9 @@ switch (platform) {
|
|
|
86
90
|
}
|
|
87
91
|
break
|
|
88
92
|
case 'arm64':
|
|
89
|
-
localFileExisted = existsSync(
|
|
93
|
+
localFileExisted = existsSync(
|
|
94
|
+
join(__dirname, 'node-webrtc-rust.win32-arm64-msvc.node')
|
|
95
|
+
)
|
|
90
96
|
try {
|
|
91
97
|
if (localFileExisted) {
|
|
92
98
|
nativeBinding = require('./node-webrtc-rust.win32-arm64-msvc.node')
|
|
@@ -125,7 +131,9 @@ switch (platform) {
|
|
|
125
131
|
}
|
|
126
132
|
break
|
|
127
133
|
case 'arm64':
|
|
128
|
-
localFileExisted = existsSync(
|
|
134
|
+
localFileExisted = existsSync(
|
|
135
|
+
join(__dirname, 'node-webrtc-rust.darwin-arm64.node')
|
|
136
|
+
)
|
|
129
137
|
try {
|
|
130
138
|
if (localFileExisted) {
|
|
131
139
|
nativeBinding = require('./node-webrtc-rust.darwin-arm64.node')
|
|
@@ -159,7 +167,9 @@ switch (platform) {
|
|
|
159
167
|
switch (arch) {
|
|
160
168
|
case 'x64':
|
|
161
169
|
if (isMusl()) {
|
|
162
|
-
localFileExisted = existsSync(
|
|
170
|
+
localFileExisted = existsSync(
|
|
171
|
+
join(__dirname, 'node-webrtc-rust.linux-x64-musl.node')
|
|
172
|
+
)
|
|
163
173
|
try {
|
|
164
174
|
if (localFileExisted) {
|
|
165
175
|
nativeBinding = require('./node-webrtc-rust.linux-x64-musl.node')
|
|
@@ -170,7 +180,9 @@ switch (platform) {
|
|
|
170
180
|
loadError = e
|
|
171
181
|
}
|
|
172
182
|
} else {
|
|
173
|
-
localFileExisted = existsSync(
|
|
183
|
+
localFileExisted = existsSync(
|
|
184
|
+
join(__dirname, 'node-webrtc-rust.linux-x64-gnu.node')
|
|
185
|
+
)
|
|
174
186
|
try {
|
|
175
187
|
if (localFileExisted) {
|
|
176
188
|
nativeBinding = require('./node-webrtc-rust.linux-x64-gnu.node')
|
|
@@ -184,7 +196,9 @@ switch (platform) {
|
|
|
184
196
|
break
|
|
185
197
|
case 'arm64':
|
|
186
198
|
if (isMusl()) {
|
|
187
|
-
localFileExisted = existsSync(
|
|
199
|
+
localFileExisted = existsSync(
|
|
200
|
+
join(__dirname, 'node-webrtc-rust.linux-arm64-musl.node')
|
|
201
|
+
)
|
|
188
202
|
try {
|
|
189
203
|
if (localFileExisted) {
|
|
190
204
|
nativeBinding = require('./node-webrtc-rust.linux-arm64-musl.node')
|
|
@@ -195,7 +209,9 @@ switch (platform) {
|
|
|
195
209
|
loadError = e
|
|
196
210
|
}
|
|
197
211
|
} else {
|
|
198
|
-
localFileExisted = existsSync(
|
|
212
|
+
localFileExisted = existsSync(
|
|
213
|
+
join(__dirname, 'node-webrtc-rust.linux-arm64-gnu.node')
|
|
214
|
+
)
|
|
199
215
|
try {
|
|
200
216
|
if (localFileExisted) {
|
|
201
217
|
nativeBinding = require('./node-webrtc-rust.linux-arm64-gnu.node')
|
|
@@ -210,7 +226,7 @@ switch (platform) {
|
|
|
210
226
|
case 'arm':
|
|
211
227
|
if (isMusl()) {
|
|
212
228
|
localFileExisted = existsSync(
|
|
213
|
-
join(__dirname, 'node-webrtc-rust.linux-arm-musleabihf.node')
|
|
229
|
+
join(__dirname, 'node-webrtc-rust.linux-arm-musleabihf.node')
|
|
214
230
|
)
|
|
215
231
|
try {
|
|
216
232
|
if (localFileExisted) {
|
|
@@ -223,7 +239,7 @@ switch (platform) {
|
|
|
223
239
|
}
|
|
224
240
|
} else {
|
|
225
241
|
localFileExisted = existsSync(
|
|
226
|
-
join(__dirname, 'node-webrtc-rust.linux-arm-gnueabihf.node')
|
|
242
|
+
join(__dirname, 'node-webrtc-rust.linux-arm-gnueabihf.node')
|
|
227
243
|
)
|
|
228
244
|
try {
|
|
229
245
|
if (localFileExisted) {
|
|
@@ -238,7 +254,9 @@ switch (platform) {
|
|
|
238
254
|
break
|
|
239
255
|
case 'riscv64':
|
|
240
256
|
if (isMusl()) {
|
|
241
|
-
localFileExisted = existsSync(
|
|
257
|
+
localFileExisted = existsSync(
|
|
258
|
+
join(__dirname, 'node-webrtc-rust.linux-riscv64-musl.node')
|
|
259
|
+
)
|
|
242
260
|
try {
|
|
243
261
|
if (localFileExisted) {
|
|
244
262
|
nativeBinding = require('./node-webrtc-rust.linux-riscv64-musl.node')
|
|
@@ -249,7 +267,9 @@ switch (platform) {
|
|
|
249
267
|
loadError = e
|
|
250
268
|
}
|
|
251
269
|
} else {
|
|
252
|
-
localFileExisted = existsSync(
|
|
270
|
+
localFileExisted = existsSync(
|
|
271
|
+
join(__dirname, 'node-webrtc-rust.linux-riscv64-gnu.node')
|
|
272
|
+
)
|
|
253
273
|
try {
|
|
254
274
|
if (localFileExisted) {
|
|
255
275
|
nativeBinding = require('./node-webrtc-rust.linux-riscv64-gnu.node')
|
|
@@ -262,7 +282,9 @@ switch (platform) {
|
|
|
262
282
|
}
|
|
263
283
|
break
|
|
264
284
|
case 's390x':
|
|
265
|
-
localFileExisted = existsSync(
|
|
285
|
+
localFileExisted = existsSync(
|
|
286
|
+
join(__dirname, 'node-webrtc-rust.linux-s390x-gnu.node')
|
|
287
|
+
)
|
|
266
288
|
try {
|
|
267
289
|
if (localFileExisted) {
|
|
268
290
|
nativeBinding = require('./node-webrtc-rust.linux-s390x-gnu.node')
|
|
@@ -288,42 +310,23 @@ if (!nativeBinding) {
|
|
|
288
310
|
throw new Error(`Failed to load native binding`)
|
|
289
311
|
}
|
|
290
312
|
|
|
291
|
-
const {
|
|
292
|
-
JsConferenceRoom,
|
|
293
|
-
JsConferenceServer,
|
|
294
|
-
JsEventDeliveryMode,
|
|
295
|
-
JsLocalAudioTrack,
|
|
296
|
-
JsMediaStream,
|
|
297
|
-
JsMediaStreamTrack,
|
|
298
|
-
JsMuteScope,
|
|
299
|
-
JsPeerConnection,
|
|
300
|
-
JsRtcDataChannel,
|
|
301
|
-
JsRtpReceiver,
|
|
302
|
-
JsRtpSender,
|
|
303
|
-
JsRtpTransceiver,
|
|
304
|
-
JsSpeechEventType,
|
|
305
|
-
JsSttVendor,
|
|
306
|
-
JsTtsVendor,
|
|
307
|
-
JsVadSampleRate,
|
|
308
|
-
JsVoiceAgent,
|
|
309
|
-
version,
|
|
310
|
-
} = nativeBinding
|
|
313
|
+
const { JsConferenceRoom, JsConferenceServer, JsMuteScope, JsRtcDataChannel, JsMediaStreamTrack, JsMediaStream, JsLocalAudioTrack, JsPeerConnection, JsRtpReceiver, JsRtpSender, JsRtpTransceiver, JsEventDeliveryMode, JsVadSampleRate, JsSttVendor, JsTtsVendor, JsSpeechEventType, JsVoiceAgent, version } = nativeBinding
|
|
311
314
|
|
|
312
315
|
module.exports.JsConferenceRoom = JsConferenceRoom
|
|
313
316
|
module.exports.JsConferenceServer = JsConferenceServer
|
|
314
|
-
module.exports.JsEventDeliveryMode = JsEventDeliveryMode
|
|
315
|
-
module.exports.JsLocalAudioTrack = JsLocalAudioTrack
|
|
316
|
-
module.exports.JsMediaStream = JsMediaStream
|
|
317
|
-
module.exports.JsMediaStreamTrack = JsMediaStreamTrack
|
|
318
317
|
module.exports.JsMuteScope = JsMuteScope
|
|
319
|
-
module.exports.JsPeerConnection = JsPeerConnection
|
|
320
318
|
module.exports.JsRtcDataChannel = JsRtcDataChannel
|
|
319
|
+
module.exports.JsMediaStreamTrack = JsMediaStreamTrack
|
|
320
|
+
module.exports.JsMediaStream = JsMediaStream
|
|
321
|
+
module.exports.JsLocalAudioTrack = JsLocalAudioTrack
|
|
322
|
+
module.exports.JsPeerConnection = JsPeerConnection
|
|
321
323
|
module.exports.JsRtpReceiver = JsRtpReceiver
|
|
322
324
|
module.exports.JsRtpSender = JsRtpSender
|
|
323
325
|
module.exports.JsRtpTransceiver = JsRtpTransceiver
|
|
324
|
-
module.exports.
|
|
326
|
+
module.exports.JsEventDeliveryMode = JsEventDeliveryMode
|
|
327
|
+
module.exports.JsVadSampleRate = JsVadSampleRate
|
|
325
328
|
module.exports.JsSttVendor = JsSttVendor
|
|
326
329
|
module.exports.JsTtsVendor = JsTtsVendor
|
|
327
|
-
module.exports.
|
|
330
|
+
module.exports.JsSpeechEventType = JsSpeechEventType
|
|
328
331
|
module.exports.JsVoiceAgent = JsVoiceAgent
|
|
329
332
|
module.exports.version = version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node-webrtc-rust/bindings",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "NAPI-RS native bindings for node-webrtc-rust — WebRTC peer connections, data channels, and conference audio mixing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webrtc",
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"@napi-rs/cli": "^2.18.0"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@node-webrtc-rust/bindings-win32-x64-msvc": "0.
|
|
62
|
-
"@node-webrtc-rust/bindings-darwin-x64": "0.
|
|
63
|
-
"@node-webrtc-rust/bindings-linux-x64-gnu": "0.
|
|
64
|
-
"@node-webrtc-rust/bindings-darwin-arm64": "0.
|
|
65
|
-
"@node-webrtc-rust/bindings-linux-arm64-gnu": "0.
|
|
66
|
-
"@node-webrtc-rust/bindings-linux-x64-musl": "0.
|
|
61
|
+
"@node-webrtc-rust/bindings-win32-x64-msvc": "0.6.0",
|
|
62
|
+
"@node-webrtc-rust/bindings-darwin-x64": "0.6.0",
|
|
63
|
+
"@node-webrtc-rust/bindings-linux-x64-gnu": "0.6.0",
|
|
64
|
+
"@node-webrtc-rust/bindings-darwin-arm64": "0.6.0",
|
|
65
|
+
"@node-webrtc-rust/bindings-linux-arm64-gnu": "0.6.0",
|
|
66
|
+
"@node-webrtc-rust/bindings-linux-x64-musl": "0.6.0"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">=18"
|