admin管理员组文章数量:1398789
Support for the Web MIDI API has been added to Chrome Canary since early 2013.
Why then, when I type requestMIDIAccess
in the JavaScript console and hit enter, do I get "ReferenceError: requestMIDIAccess is not defined"?
According to official documentation, it should be a defined function.
What gives?
Support for the Web MIDI API has been added to Chrome Canary since early 2013.
Why then, when I type requestMIDIAccess
in the JavaScript console and hit enter, do I get "ReferenceError: requestMIDIAccess is not defined"?
According to official documentation, it should be a defined function.
What gives?
Share Improve this question asked Feb 17, 2014 at 5:00 JonJon 2,1561 gold badge20 silver badges29 bronze badges2 Answers
Reset to default 8The Web MIDI API is available by default only in Chrome versions 43 and newer.
In earlier versions it is not enabled by default, but can be enabled as an experimental feature flag. In Chrome, load the special URL chrome://flags
and search within the page for "Enable Web MIDI API".
The options on the flags page require the browser to be restarted before they will take effect. The features hidden behind these flags are in an experimental state and are subject to change at any time, so the API in older versions may differ from what is available in Chrome 43.
Note also that the requestMIDIAccess
function is a method of window.navigator
, not directly of window
. Therefore you need to call it as navigator.requestMIDIAccess
.
Also note that after you plug-in a new MIDI device, you may need to quit and restart Chrome. It does not seem to handle dynamic adjustment of the device list.
本文标签: javascriptWeb MIDI API not implemented in Chrome CanaryStack Overflow
版权声明:本文标题:javascript - Web MIDI API not implemented in Chrome Canary? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744623357a2616163.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论