iconnectivity-js
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -14,2 +14,3 @@ /// <reference types="lodash" /> | ||
private _devices; | ||
private _midiInputIds; | ||
readonly devicesChanged: { | ||
@@ -16,0 +17,0 @@ addListener: (listener: (devices: Device[]) => void) => () => void; |
@@ -40,4 +40,10 @@ "use strict"; | ||
this._devices = []; | ||
this._midiInputIds = []; | ||
this.devicesChanged = (0, event_source_1.createEventSource)(); | ||
this.handleMidiStateChange = (0, debounce_1.default)(async () => { | ||
const inputIds = [...this.midiAccess.inputs.values()].map((i) => i.id); | ||
if ((0, isEqual_1.default)(this._midiInputIds, inputIds)) { | ||
return; | ||
} | ||
this._midiInputIds = inputIds; | ||
const devices = await this.getDevices(); | ||
@@ -44,0 +50,0 @@ if (!(0, isEqual_1.default)(devices.map((d) => d.serialNumber), this._devices.map((d) => d.serialNumber))) { |
{ | ||
"name": "iconnectivity-js", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81874
1756