@raphiiko/wavelink-ts 1.0.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/LICENSE +21 -0
- package/PROTOCOL.md +1126 -0
- package/README.md +348 -0
- package/dist/client.d.ts +155 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +462 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +187 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/websocket-adapter.d.ts +33 -0
- package/dist/websocket-adapter.d.ts.map +1 -0
- package/dist/websocket-adapter.js +64 -0
- package/dist/websocket-adapter.js.map +1 -0
- package/package.json +58 -0
package/dist/client.js
ADDED
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import { createWebSocket, WebSocketState, } from "./websocket-adapter.js";
|
|
2
|
+
/**
|
|
3
|
+
* Wave Link API Client
|
|
4
|
+
*
|
|
5
|
+
* Provides a typed interface for controlling Elgato Wave Link 3.0.
|
|
6
|
+
*/
|
|
7
|
+
export class WaveLinkClient {
|
|
8
|
+
ws = null;
|
|
9
|
+
requestId = 0;
|
|
10
|
+
pendingRequests = new Map();
|
|
11
|
+
eventHandlers = new Map();
|
|
12
|
+
reconnectAttempts = 0;
|
|
13
|
+
reconnectTimer = null;
|
|
14
|
+
isManuallyDisconnected = false;
|
|
15
|
+
options;
|
|
16
|
+
currentPort = 1884;
|
|
17
|
+
minPort = 1884;
|
|
18
|
+
maxPort = 1893;
|
|
19
|
+
portAttempts = 0;
|
|
20
|
+
maxPortAttempts = 60;
|
|
21
|
+
constructor(options = {}) {
|
|
22
|
+
this.options = {
|
|
23
|
+
host: options.host || "127.0.0.1",
|
|
24
|
+
autoReconnect: options.autoReconnect ?? true,
|
|
25
|
+
reconnectDelay: options.reconnectDelay || 2000,
|
|
26
|
+
maxReconnectAttempts: options.maxReconnectAttempts || 10,
|
|
27
|
+
origin: options.origin || "streamdeck://",
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Connect to Wave Link
|
|
32
|
+
* Automatically tries ports 1884-1893 until a connection is established
|
|
33
|
+
*/
|
|
34
|
+
async connect() {
|
|
35
|
+
this.isManuallyDisconnected = false;
|
|
36
|
+
// Reset port attempts on new connection attempt
|
|
37
|
+
if (this.portAttempts === 0) {
|
|
38
|
+
this.currentPort = this.minPort;
|
|
39
|
+
}
|
|
40
|
+
return this.tryConnect();
|
|
41
|
+
}
|
|
42
|
+
async tryConnect() {
|
|
43
|
+
if (this.portAttempts >= this.maxPortAttempts) {
|
|
44
|
+
const error = new Error(`Failed to connect to Wave Link after ${this.maxPortAttempts} attempts. ` +
|
|
45
|
+
`Tried ports ${this.minPort}-${this.maxPort}. ` +
|
|
46
|
+
`Make sure Wave Link is running.`);
|
|
47
|
+
this.emit("error", error);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
const url = `ws://${this.options.host}:${this.currentPort}`;
|
|
51
|
+
try {
|
|
52
|
+
this.ws = await createWebSocket(url, {
|
|
53
|
+
origin: this.options.origin,
|
|
54
|
+
});
|
|
55
|
+
// Connection successful!
|
|
56
|
+
this.reconnectAttempts = 0;
|
|
57
|
+
this.portAttempts = 0;
|
|
58
|
+
// Set up event handlers
|
|
59
|
+
this.ws.addEventListener("message", (event) => {
|
|
60
|
+
const data = event.data || event;
|
|
61
|
+
this.handleMessage(typeof data === "string" ? data : data.toString());
|
|
62
|
+
});
|
|
63
|
+
this.ws.addEventListener("close", () => {
|
|
64
|
+
this.handleDisconnect();
|
|
65
|
+
});
|
|
66
|
+
this.ws.addEventListener("error", (error) => {
|
|
67
|
+
this.emit("error", error instanceof Error ? error : new Error(String(error)));
|
|
68
|
+
});
|
|
69
|
+
this.emit("connected");
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
// Connection failed, try next port
|
|
73
|
+
this.portAttempts++;
|
|
74
|
+
// Move to next port
|
|
75
|
+
if (this.currentPort >= this.maxPort) {
|
|
76
|
+
this.currentPort = this.minPort;
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
this.currentPort++;
|
|
80
|
+
}
|
|
81
|
+
// If we've cycled back to the starting port, emit an error
|
|
82
|
+
if (this.currentPort === this.minPort && this.portAttempts > 0) {
|
|
83
|
+
const cycleError = new Error(`Failed to connect on ports ${this.minPort}-${this.maxPort}. ` +
|
|
84
|
+
`Attempt ${Math.floor(this.portAttempts / (this.maxPort - this.minPort + 1)) + 1}. ` +
|
|
85
|
+
`Retrying...`);
|
|
86
|
+
this.emit("error", cycleError);
|
|
87
|
+
}
|
|
88
|
+
// Try the next port
|
|
89
|
+
return this.tryConnect();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Disconnect from Wave Link
|
|
94
|
+
*/
|
|
95
|
+
disconnect() {
|
|
96
|
+
this.isManuallyDisconnected = true;
|
|
97
|
+
if (this.reconnectTimer) {
|
|
98
|
+
clearTimeout(this.reconnectTimer);
|
|
99
|
+
this.reconnectTimer = null;
|
|
100
|
+
}
|
|
101
|
+
if (this.ws) {
|
|
102
|
+
this.ws.close();
|
|
103
|
+
this.ws = null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Check if connected
|
|
108
|
+
*/
|
|
109
|
+
isConnected() {
|
|
110
|
+
return this.ws !== null && this.ws.readyState === WebSocketState.OPEN;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Add event listener
|
|
114
|
+
*/
|
|
115
|
+
on(event, callback) {
|
|
116
|
+
if (!this.eventHandlers.has(event)) {
|
|
117
|
+
this.eventHandlers.set(event, new Set());
|
|
118
|
+
}
|
|
119
|
+
this.eventHandlers.get(event).add(callback);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Remove event listener
|
|
123
|
+
*/
|
|
124
|
+
off(event, callback) {
|
|
125
|
+
const handlers = this.eventHandlers.get(event);
|
|
126
|
+
if (handlers) {
|
|
127
|
+
handlers.delete(callback);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Remove all event listeners for an event
|
|
132
|
+
*/
|
|
133
|
+
removeAllListeners(event) {
|
|
134
|
+
if (event) {
|
|
135
|
+
this.eventHandlers.delete(event);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
this.eventHandlers.clear();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
emit(event, ...args) {
|
|
142
|
+
const handlers = this.eventHandlers.get(event);
|
|
143
|
+
if (handlers) {
|
|
144
|
+
handlers.forEach((handler) => {
|
|
145
|
+
try {
|
|
146
|
+
handler(...args);
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
console.error(`Error in ${event} handler:`, error);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
handleDisconnect() {
|
|
155
|
+
this.ws = null;
|
|
156
|
+
this.emit("disconnected");
|
|
157
|
+
// Reject all pending requests
|
|
158
|
+
this.pendingRequests.forEach(({ reject }) => {
|
|
159
|
+
reject(new Error("Connection closed"));
|
|
160
|
+
});
|
|
161
|
+
this.pendingRequests.clear();
|
|
162
|
+
// Auto-reconnect if enabled
|
|
163
|
+
if (this.options.autoReconnect &&
|
|
164
|
+
!this.isManuallyDisconnected &&
|
|
165
|
+
this.reconnectAttempts < this.options.maxReconnectAttempts) {
|
|
166
|
+
this.reconnectTimer = setTimeout(() => {
|
|
167
|
+
this.reconnectAttempts++;
|
|
168
|
+
this.connect().catch((error) => {
|
|
169
|
+
this.emit("error", error);
|
|
170
|
+
});
|
|
171
|
+
}, this.options.reconnectDelay);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
handleMessage(data) {
|
|
175
|
+
try {
|
|
176
|
+
const message = JSON.parse(data);
|
|
177
|
+
// Check if it's a response or notification
|
|
178
|
+
if ("id" in message) {
|
|
179
|
+
// Response
|
|
180
|
+
this.handleResponse(message);
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
// Notification
|
|
184
|
+
this.handleNotification(message);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
this.emit("error", error instanceof Error ? error : new Error(String(error)));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
handleResponse(response) {
|
|
192
|
+
const pending = this.pendingRequests.get(response.id);
|
|
193
|
+
if (pending) {
|
|
194
|
+
this.pendingRequests.delete(response.id);
|
|
195
|
+
if (response.error) {
|
|
196
|
+
pending.reject(new Error(response.error.message));
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
pending.resolve(response.result);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
handleNotification(notification) {
|
|
204
|
+
const { method, params } = notification;
|
|
205
|
+
// Emit specific event
|
|
206
|
+
switch (method) {
|
|
207
|
+
case "inputDevicesChanged":
|
|
208
|
+
this.emit("inputDevicesChanged", params);
|
|
209
|
+
break;
|
|
210
|
+
case "inputDeviceChanged":
|
|
211
|
+
this.emit("inputDeviceChanged", params);
|
|
212
|
+
break;
|
|
213
|
+
case "outputDevicesChanged":
|
|
214
|
+
if (Array.isArray(params)) {
|
|
215
|
+
this.emit("outputDevicesChanged", {
|
|
216
|
+
mainOutput: params[0],
|
|
217
|
+
outputDevices: params[1],
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
break;
|
|
221
|
+
case "outputDeviceChanged":
|
|
222
|
+
this.emit("outputDeviceChanged", params);
|
|
223
|
+
break;
|
|
224
|
+
case "channelsChanged":
|
|
225
|
+
this.emit("channelsChanged", params);
|
|
226
|
+
break;
|
|
227
|
+
case "channelChanged":
|
|
228
|
+
this.emit("channelChanged", params);
|
|
229
|
+
break;
|
|
230
|
+
case "mixesChanged":
|
|
231
|
+
this.emit("mixesChanged", params);
|
|
232
|
+
break;
|
|
233
|
+
case "mixChanged":
|
|
234
|
+
this.emit("mixChanged", params);
|
|
235
|
+
break;
|
|
236
|
+
case "levelMeterChanged":
|
|
237
|
+
if (Array.isArray(params)) {
|
|
238
|
+
this.emit("levelMeterChanged", {
|
|
239
|
+
inputs: params[0],
|
|
240
|
+
outputs: params[1],
|
|
241
|
+
channels: params[2],
|
|
242
|
+
mixes: params[3],
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
break;
|
|
246
|
+
case "focusedAppChanged":
|
|
247
|
+
if (Array.isArray(params)) {
|
|
248
|
+
this.emit("focusedAppChanged", {
|
|
249
|
+
appId: params[0],
|
|
250
|
+
appName: params[1],
|
|
251
|
+
channel: params[2],
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
// Emit generic notification event
|
|
257
|
+
this.emit("notification", method, params);
|
|
258
|
+
}
|
|
259
|
+
async call(method, params = null) {
|
|
260
|
+
if (!this.isConnected()) {
|
|
261
|
+
throw new Error("Not connected to Wave Link");
|
|
262
|
+
}
|
|
263
|
+
const id = ++this.requestId;
|
|
264
|
+
const request = {
|
|
265
|
+
id,
|
|
266
|
+
jsonrpc: "2.0",
|
|
267
|
+
method,
|
|
268
|
+
params,
|
|
269
|
+
};
|
|
270
|
+
return new Promise((resolve, reject) => {
|
|
271
|
+
this.pendingRequests.set(id, { resolve, reject });
|
|
272
|
+
this.ws.send(JSON.stringify(request));
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
// API Methods
|
|
276
|
+
/**
|
|
277
|
+
* Get application information
|
|
278
|
+
*/
|
|
279
|
+
async getApplicationInfo() {
|
|
280
|
+
return this.call("getApplicationInfo", null);
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Get all input devices
|
|
284
|
+
*/
|
|
285
|
+
async getInputDevices() {
|
|
286
|
+
return this.call("getInputDevices", null);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Get all output devices
|
|
290
|
+
*/
|
|
291
|
+
async getOutputDevices() {
|
|
292
|
+
return this.call("getOutputDevices", null);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Get all channels
|
|
296
|
+
*/
|
|
297
|
+
async getChannels() {
|
|
298
|
+
return this.call("getChannels", null);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Get all mixes
|
|
302
|
+
*/
|
|
303
|
+
async getMixes() {
|
|
304
|
+
return this.call("getMixes", null);
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Set input device properties
|
|
308
|
+
*/
|
|
309
|
+
async setInputDevice(params) {
|
|
310
|
+
await this.call("setInputDevice", params);
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Set output device properties
|
|
314
|
+
*/
|
|
315
|
+
async setOutputDevice(params) {
|
|
316
|
+
await this.call("setOutputDevice", params);
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Set channel properties
|
|
320
|
+
*/
|
|
321
|
+
async setChannel(params) {
|
|
322
|
+
await this.call("setChannel", params);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Set mix properties
|
|
326
|
+
*/
|
|
327
|
+
async setMix(params) {
|
|
328
|
+
await this.call("setMix", params);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Add application to channel
|
|
332
|
+
*/
|
|
333
|
+
async addToChannel(params) {
|
|
334
|
+
await this.call("addToChannel", params);
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Subscribe to notifications
|
|
338
|
+
*/
|
|
339
|
+
async setSubscription(params) {
|
|
340
|
+
return this.call("setSubscription", params);
|
|
341
|
+
}
|
|
342
|
+
// Convenience Methods
|
|
343
|
+
/**
|
|
344
|
+
* Mute or unmute a channel
|
|
345
|
+
*/
|
|
346
|
+
async setChannelMute(channelId, isMuted) {
|
|
347
|
+
await this.setChannel({ id: channelId, isMuted });
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Set channel volume (0.0 - 1.0)
|
|
351
|
+
*/
|
|
352
|
+
async setChannelVolume(channelId, level) {
|
|
353
|
+
await this.setChannel({ id: channelId, level });
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Set channel volume for specific mix
|
|
357
|
+
*/
|
|
358
|
+
async setChannelMixVolume(channelId, mixId, level) {
|
|
359
|
+
await this.setChannel({
|
|
360
|
+
id: channelId,
|
|
361
|
+
mixes: [{ id: mixId, level }],
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Mute or unmute a channel in specific mix
|
|
366
|
+
*/
|
|
367
|
+
async setChannelMixMute(channelId, mixId, isMuted) {
|
|
368
|
+
await this.setChannel({
|
|
369
|
+
id: channelId,
|
|
370
|
+
mixes: [{ id: mixId, isMuted }],
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Toggle channel mute
|
|
375
|
+
*/
|
|
376
|
+
async toggleChannelMute(channelId) {
|
|
377
|
+
const { channels } = await this.getChannels();
|
|
378
|
+
const channel = channels.find((c) => c.id === channelId);
|
|
379
|
+
if (channel) {
|
|
380
|
+
await this.setChannelMute(channelId, !channel.isMuted);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Set mix master volume (0.0 - 1.0)
|
|
385
|
+
*/
|
|
386
|
+
async setMixVolume(mixId, level) {
|
|
387
|
+
await this.setMix({ id: mixId, level });
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Mute or unmute a mix
|
|
391
|
+
*/
|
|
392
|
+
async setMixMute(mixId, isMuted) {
|
|
393
|
+
await this.setMix({ id: mixId, isMuted });
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Toggle mix mute
|
|
397
|
+
*/
|
|
398
|
+
async toggleMixMute(mixId) {
|
|
399
|
+
const { mixes } = await this.getMixes();
|
|
400
|
+
const mix = mixes.find((m) => m.id === mixId);
|
|
401
|
+
if (mix) {
|
|
402
|
+
await this.setMixMute(mixId, !mix.isMuted);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Set input device gain (0.0 - 1.0)
|
|
407
|
+
*/
|
|
408
|
+
async setInputGain(deviceId, inputId, value) {
|
|
409
|
+
await this.setInputDevice({
|
|
410
|
+
id: deviceId,
|
|
411
|
+
inputs: [{ id: inputId, gain: { value, maxRange: 0 } }],
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Mute or unmute input device
|
|
416
|
+
*/
|
|
417
|
+
async setInputMute(deviceId, inputId, isMuted) {
|
|
418
|
+
await this.setInputDevice({
|
|
419
|
+
id: deviceId,
|
|
420
|
+
inputs: [{ id: inputId, isMuted }],
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Set output device volume (0.0 - 1.0)
|
|
425
|
+
*/
|
|
426
|
+
async setOutputVolume(deviceId, outputId, level) {
|
|
427
|
+
await this.setOutputDevice({
|
|
428
|
+
outputDevice: {
|
|
429
|
+
id: deviceId,
|
|
430
|
+
outputs: [{ id: outputId, level }],
|
|
431
|
+
},
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Switch output to different mix
|
|
436
|
+
*/
|
|
437
|
+
async switchOutputMix(deviceId, outputId, mixId) {
|
|
438
|
+
await this.setOutputDevice({
|
|
439
|
+
outputDevice: {
|
|
440
|
+
id: deviceId,
|
|
441
|
+
outputs: [{ id: outputId, mixId }],
|
|
442
|
+
},
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Subscribe to focused app changes
|
|
447
|
+
*/
|
|
448
|
+
async subscribeFocusedApp(enabled = true) {
|
|
449
|
+
await this.setSubscription({
|
|
450
|
+
focusedAppChanged: { isEnabled: enabled },
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Subscribe to level meter changes
|
|
455
|
+
*/
|
|
456
|
+
async subscribeLevelMeter(type, id, enabled = true) {
|
|
457
|
+
await this.setSubscription({
|
|
458
|
+
levelMeterChanged: { type, id, isEnabled: enabled },
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,cAAc,GACf,MAAM,wBAAwB,CAAC;AAwBhC;;;;GAIG;AACH,MAAM,OAAO,cAAc;IACjB,EAAE,GAA4B,IAAI,CAAC;IACnC,SAAS,GAAG,CAAC,CAAC;IACd,eAAe,GAAG,IAAI,GAAG,EAM9B,CAAC;IACI,aAAa,GAAG,IAAI,GAAG,EAAyB,CAAC;IACjD,iBAAiB,GAAG,CAAC,CAAC;IACtB,cAAc,GAA0B,IAAI,CAAC;IAC7C,sBAAsB,GAAG,KAAK,CAAC;IAE/B,OAAO,CAAkC;IACzC,WAAW,GAAW,IAAI,CAAC;IAClB,OAAO,GAAW,IAAI,CAAC;IACvB,OAAO,GAAW,IAAI,CAAC;IAChC,YAAY,GAAW,CAAC,CAAC;IAChB,eAAe,GAAW,EAAE,CAAC;IAE9C,YAAY,UAAiC,EAAE;QAC7C,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,WAAW;YACjC,aAAa,EAAE,OAAO,CAAC,aAAa,IAAI,IAAI;YAC5C,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,IAAI;YAC9C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,EAAE;YACxD,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,eAAe;SAC1C,CAAC;IACJ,CAAC;I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C7C,mBAAmB,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elgato Wave Link 3.0 API Types
|
|
3
|
+
*/
|
|
4
|
+
export interface JsonRpcRequest {
|
|
5
|
+
id: number;
|
|
6
|
+
jsonrpc: "2.0";
|
|
7
|
+
method: string;
|
|
8
|
+
params: unknown;
|
|
9
|
+
}
|
|
10
|
+
export interface JsonRpcResponse<T = unknown> {
|
|
11
|
+
jsonrpc: "2.0";
|
|
12
|
+
id: number;
|
|
13
|
+
result?: T;
|
|
14
|
+
error?: JsonRpcError;
|
|
15
|
+
}
|
|
16
|
+
export interface JsonRpcNotification {
|
|
17
|
+
jsonrpc: "2.0";
|
|
18
|
+
method: string;
|
|
19
|
+
params: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface JsonRpcError {
|
|
22
|
+
code: number;
|
|
23
|
+
message: string;
|
|
24
|
+
data?: unknown;
|
|
25
|
+
}
|
|
26
|
+
export interface ApplicationInfo {
|
|
27
|
+
appID: string;
|
|
28
|
+
name: string;
|
|
29
|
+
interfaceRevision: number;
|
|
30
|
+
}
|
|
31
|
+
export interface InputDevice {
|
|
32
|
+
id: string;
|
|
33
|
+
isWaveDevice: boolean;
|
|
34
|
+
inputs: Input[];
|
|
35
|
+
}
|
|
36
|
+
export interface Input {
|
|
37
|
+
id: string;
|
|
38
|
+
isMuted: boolean;
|
|
39
|
+
gain: {
|
|
40
|
+
value: number;
|
|
41
|
+
maxRange: number;
|
|
42
|
+
};
|
|
43
|
+
micPcMix: {
|
|
44
|
+
value: number;
|
|
45
|
+
};
|
|
46
|
+
effects?: Effect[];
|
|
47
|
+
dspEffects?: Effect[];
|
|
48
|
+
}
|
|
49
|
+
export interface Effect {
|
|
50
|
+
id: string;
|
|
51
|
+
isEnabled: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface InputDevicesResult {
|
|
54
|
+
inputDevices: InputDevice[];
|
|
55
|
+
}
|
|
56
|
+
export interface OutputDevice {
|
|
57
|
+
id: string;
|
|
58
|
+
outputs: Output[];
|
|
59
|
+
}
|
|
60
|
+
export interface Output {
|
|
61
|
+
id: string;
|
|
62
|
+
level: number;
|
|
63
|
+
isMuted: boolean;
|
|
64
|
+
mixId: string;
|
|
65
|
+
}
|
|
66
|
+
export interface OutputDevicesResult {
|
|
67
|
+
mainOutput: string;
|
|
68
|
+
outputDevices: OutputDevice[];
|
|
69
|
+
}
|
|
70
|
+
export interface Channel {
|
|
71
|
+
id: string;
|
|
72
|
+
type: "Software" | "Hardware";
|
|
73
|
+
isMuted: boolean;
|
|
74
|
+
level: number;
|
|
75
|
+
image: {
|
|
76
|
+
name: string;
|
|
77
|
+
imgData?: string;
|
|
78
|
+
};
|
|
79
|
+
apps: App[];
|
|
80
|
+
effects?: Effect[];
|
|
81
|
+
mixes: ChannelMix[];
|
|
82
|
+
}
|
|
83
|
+
export interface App {
|
|
84
|
+
id: string;
|
|
85
|
+
name: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ChannelMix {
|
|
88
|
+
id: string;
|
|
89
|
+
level: number;
|
|
90
|
+
isMuted: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface ChannelsResult {
|
|
93
|
+
channels: Channel[];
|
|
94
|
+
}
|
|
95
|
+
export interface Mix {
|
|
96
|
+
id: string;
|
|
97
|
+
name: string;
|
|
98
|
+
level: number;
|
|
99
|
+
isMuted: boolean;
|
|
100
|
+
image: {
|
|
101
|
+
name: string;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export interface MixesResult {
|
|
105
|
+
mixes: Mix[];
|
|
106
|
+
}
|
|
107
|
+
export interface SetInputDeviceParams {
|
|
108
|
+
id: string;
|
|
109
|
+
inputs: Partial<Input>[];
|
|
110
|
+
}
|
|
111
|
+
export interface SetOutputDeviceParams {
|
|
112
|
+
outputDevice: {
|
|
113
|
+
id: string;
|
|
114
|
+
outputs: Partial<Output>[];
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export interface SetChannelParams {
|
|
118
|
+
id: string;
|
|
119
|
+
isMuted?: boolean;
|
|
120
|
+
level?: number;
|
|
121
|
+
mixes?: Partial<ChannelMix>[];
|
|
122
|
+
effects?: Effect[];
|
|
123
|
+
}
|
|
124
|
+
export interface SetMixParams {
|
|
125
|
+
id: string;
|
|
126
|
+
level?: number;
|
|
127
|
+
isMuted?: boolean;
|
|
128
|
+
mixId?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface AddToChannelParams {
|
|
131
|
+
appId: string;
|
|
132
|
+
channelId: string;
|
|
133
|
+
}
|
|
134
|
+
export interface SetSubscriptionParams {
|
|
135
|
+
focusedAppChanged?: {
|
|
136
|
+
isEnabled: boolean;
|
|
137
|
+
};
|
|
138
|
+
levelMeterChanged?: {
|
|
139
|
+
type: "input" | "output" | "channel" | "mix";
|
|
140
|
+
id: string;
|
|
141
|
+
subId?: string;
|
|
142
|
+
isEnabled: boolean;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
export type NotificationCallback = (method: string, params: unknown) => void;
|
|
146
|
+
export interface FocusedAppChangedParams {
|
|
147
|
+
appId: string;
|
|
148
|
+
appName: string;
|
|
149
|
+
channel: {
|
|
150
|
+
id: string;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
export interface LevelMeterChangedParams {
|
|
154
|
+
inputs: unknown[];
|
|
155
|
+
outputs: unknown[];
|
|
156
|
+
channels: unknown[];
|
|
157
|
+
mixes: unknown[];
|
|
158
|
+
}
|
|
159
|
+
export interface WaveLinkClientOptions {
|
|
160
|
+
host?: string;
|
|
161
|
+
autoReconnect?: boolean;
|
|
162
|
+
reconnectDelay?: number;
|
|
163
|
+
maxReconnectAttempts?: number;
|
|
164
|
+
origin?: string;
|
|
165
|
+
}
|
|
166
|
+
export type WaveLinkEventMap = {
|
|
167
|
+
connected: [];
|
|
168
|
+
disconnected: [];
|
|
169
|
+
error: [Error];
|
|
170
|
+
inputDevicesChanged: [InputDevicesResult];
|
|
171
|
+
inputDeviceChanged: [Partial<InputDevice>];
|
|
172
|
+
outputDevicesChanged: [{
|
|
173
|
+
mainOutput: string;
|
|
174
|
+
outputDevices: OutputDevice[];
|
|
175
|
+
}];
|
|
176
|
+
outputDeviceChanged: [Partial<OutputDevice>];
|
|
177
|
+
channelsChanged: [ChannelsResult];
|
|
178
|
+
channelChanged: [Partial<Channel>];
|
|
179
|
+
mixesChanged: [MixesResult];
|
|
180
|
+
mixChanged: [Partial<Mix>];
|
|
181
|
+
levelMeterChanged: [LevelMeterChangedParams];
|
|
182
|
+
focusedAppChanged: [FocusedAppChangedParams];
|
|
183
|
+
notification: [string, unknown];
|
|
184
|
+
};
|
|
185
|
+
export type EventName = keyof WaveLinkEventMap;
|
|
186
|
+
export type EventCallback<E extends EventName> = (...args: WaveLinkEventMap[E]) => void;
|
|
187
|
+
//# sourceMappingURL=types.d.ts.map
|