{{SeeCompatTable}}{{APIRef("Web MIDI API")}}
The MIDIAccess
interface of the Web MIDI API provides methods for listing MIDI input and output devices, and obtaining access to those devices.
Properties
- {{domxref("MIDIAccess.inputs")}} {{readonlyinline}}
- Returns an instance of {{domxref("MIDIInputMap")}} which provides access to any available MIDI input ports.
- {{domxref("MIDIAccess.outputs")}} {{readonlyinline}}
- Returns an instance of {{domxref("MIDIOutputMap")}} which provides access to any available MIDI output ports.
- {{domxref("MIDIAccess.sysexEnabled")}} {{readonlyinline}}
- A boolean attribute indicating whether system exclusive support is enabled on the current MIDIAccess instance.
Event Handlers
- {{domxref("MIDIAccess.onstatechange")}}
- Called whenever a new MIDI port is added or an existing port changes state.
Examples
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('WebMIDI API','#midiaccess-interface')}} | {{Spec2('WebMIDI API')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatChrome(43.0)}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatNo}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |