From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/midiaccess/index.html | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 files/zh-cn/web/api/midiaccess/index.html (limited to 'files/zh-cn/web/api/midiaccess/index.html') diff --git a/files/zh-cn/web/api/midiaccess/index.html b/files/zh-cn/web/api/midiaccess/index.html new file mode 100644 index 0000000000..695470ce94 --- /dev/null +++ b/files/zh-cn/web/api/midiaccess/index.html @@ -0,0 +1,56 @@ +--- +title: MIDIAccess +slug: Web/API/MIDIAccess +tags: + - API + - Web MIDI API + - 引用 + - 接口 +translation_of: Web/API/MIDIAccess +--- +

{{SeeCompatTable}}{{APIRef("Web MIDI API")}} 

+ +

Web MIDI API 的 MIDIAccess 接口提供查询 MIDI 输入和输出设备的列表以及获取这些设备的使用权限。

+ +

属性

+ +
+
{{domxref("MIDIAccess.inputs")}} {{readonlyinline}}
+
返回 {{domxref("MIDIInputMap")}} 的实例,以提供对任何可用的 MIDI 输入端口的访问权限。
+
{{domxref("MIDIAccess.outputs")}} {{readonlyinline}}
+
返回 {{domxref("MIDIOutputMap")}} 的实例,以提供任何可用的 MIDI 输出端口的访问权限。
+
{{domxref("MIDIAccess.sysexEnabled")}} {{readonlyinline}}
+
一个布尔型的属性,指明系统是否对现有的 MIDIAccess 实例支持。
+
+ +

事件处理程序

+ +
+
{{domxref("MIDIAccess.onstatechange")}}
+
当添加新的 MIDI 端口或者一个存在的端口状态发生改变时被调用。
+
+ +

例子

+ + + +

标准

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('WebMIDI API','#midiaccess-interface')}}{{Spec2('WebMIDI API')}}Initial definition.
+ +

浏览器兼容性

+ +
{{Compat("api.MIDIAccess")}}
-- cgit v1.2.3-54-g00ecf