Renamed device_id to deviceId
This commit is contained in:
parent
b8a3d9d01f
commit
fe947ea83b
2
imports/shared-app/audio/Player.d.ts
vendored
2
imports/shared-app/audio/Player.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
export interface OutputDevice {
|
||||
device_id: string;
|
||||
deviceId: string;
|
||||
driver: string;
|
||||
name: string;
|
||||
}
|
||||
|
@ -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"
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user