1

If access to MIDI is requested via

navigator.requestMIDIAccess({sysex: true})

the user has to confirm the access in a modal in Chrome and Opera.

Is there a way to check if a user already has allowed access to MIDI without triggering the modal?

The reason I want to that is for usability reasons: if a user visits the one page site the first time he should not be greeted with a security modal, where 90% instantly click "block access" out of habit.

The user should read first what is all about and than trigger the requestMIDIAccess routine with a button push. He should have to do this only once.

Is there a method in the API I am missing or is there a workaround like reading the entries in chrome://settings/contentExceptions#midi-sysex ?

solitud
  • 683
  • 5
  • 15

1 Answers1

0

I don't think your user click "block access" out of habit if you develop MIDI web solution. This is not a "standard" user but a engineer musical man.

Access to MIDI is not a basic operation. Access to MIDI with Sysex is more complex and important right access. I don't want that website read and write in my MIDI Devices with sysex without accept.

the specification say :

Requesting MIDI access SHOULD prompt the user for access to MIDI devices, particularly if system exclusive access is requested. In some scenarios, this permission may have already been implicitly or explicitly granted, in which case this prompt may not appear

Perhaps this is a parameter in Chrome navigator which authorize automatically this prompt question.

It seems that you are fund alone your response with settings location on Chrome navigator. Based on domain name you can accept automatically this MIDI authorization with delcaration domain site, I think...

Why don't you test exist of MIDIAccess object ? If MIDIAccess object exist you have user which already accept authorization MIDI sysex.

miltone
  • 4,416
  • 11
  • 42
  • 76