diff --git a/imports/shared-app/audio/Player.d.ts b/imports/shared-app/audio/Player.d.ts index 42d9106..af245e8 100644 --- a/imports/shared-app/audio/Player.d.ts +++ b/imports/shared-app/audio/Player.d.ts @@ -1,5 +1,5 @@ export interface OutputDevice { - device_id: string; + deviceId: string; driver: string; name: string; } diff --git a/modules/renderer/audio/AudioPlayer.ts b/modules/renderer/audio/AudioPlayer.ts index 78bc90e..c7a7b0c 100644 --- a/modules/renderer/audio/AudioPlayer.ts +++ b/modules/renderer/audio/AudioPlayer.ts @@ -54,7 +54,7 @@ export class NativeAudioPlayer implements AudioBackend { }); return devices.map(entry => ({ - device_id: entry.device_id, + deviceId: entry.device_id, driver: entry.driver, name: entry.name })); @@ -62,7 +62,11 @@ export class NativeAudioPlayer implements AudioBackend { getCurrentDevice(): OutputDevice { if(this.currentDevice) { - return this.currentDevice; + return { + name: this.currentDevice.name, + driver: this.currentDevice.driver, + deviceId: this.currentDevice.device_id + }; } const defaultDevice = native.audio.available_devices().find(entry => entry.output_default); @@ -70,13 +74,13 @@ export class NativeAudioPlayer implements AudioBackend { return { name: defaultDevice.name, driver: defaultDevice.driver, - device_id: defaultDevice.device_id + deviceId: defaultDevice.device_id }; } return { name: "Default device", - device_id: "default", + deviceId: "default", driver: "default driver" }; }