content icon indicating copy to clipboard operation
content copied to clipboard

Issue with "MIDIMessageEvent": deprecated example method

Open cafeTechne opened this issue 3 years ago • 2 comments

MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent

What information was incorrect, unhelpful, or incomplete?

This code snippet at the end of the article invokes a deprecated method:

// Printing all messages to console navigator.requestMIDIAccess().then(midiAccess => { Array.from(midiAccess.inputs).forEach(input => { input[1].onmidimessage = (msg) => { console.log(msg); } }) });

Specific section or headline?

Examples

What did you expect to see?

a snippet that will work in my browser or a link to how to construct a well formed expression to do as much. My chrome version is Version 89.0.4389.90 (Official Build) (64-bit)

Did you test this? If so, how?

copy and pasted in console and this was the output:

VM38:1 [Deprecation] Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions since around M82, around May 2020. See https://www.chromestatus.com/feature/5138066234671104 for more details.

MDN Content page report details
  • Folder: en-us/web/api/midimessageevent
  • MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent
  • GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/midimessageevent/index.html
  • Last commit: https://github.com/mdn/content/commit/63c69f3c933acbea9bfb24d359a7d2ffdb3c0bea
  • Document last modified: 2021-02-19T19:51:22.000Z

cafeTechne avatar Mar 27 '21 17:03 cafeTechne

I used "chrome://flags/#use-winrt-midi-api" in Chrome to disable 88 flags, after reading https://bugs.chromium.org/p/chromium/issues/detail?id=1106447&q=component%3ABlink%3EWebMIDI and this was the output:

VM272:1 [Deprecation] Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions since around M82, around May 2020. See https://www.chromestatus.com/feature/5138066234671104 for more details.

cafeTechne avatar Mar 28 '21 20:03 cafeTechne

bump. Would really like to learn this still. I don't know what i don't know--can someone link me to what i need to read and learn in order to fix this issue and point me to the line number and the file. I can implement it if you can see what needs to be done and communicate that to me. Would love to help out, thank you!

cafeTechne avatar May 31 '22 21:05 cafeTechne

Looking at http://webmidijs.org/forum/discussion/18/how-to-disable-web-midi-permission-warning, I don't think any action is needed. And I can't reproduce it in the latest Chrome version. As long as nothing breaks we'll assume it's fine to use since no API used in this example is marked as deprecated.

Josh-Cena avatar Jun 15 '24 16:06 Josh-Cena