fivem
fivem copied to clipboard
Cannot use MIDI devices in NUI
Hi, FiveM dev! I'm working on a MIDI player script for FiveM, but now I run into an issue, I can't use MIDI device in NUI, every time I'm trying to access the MIDI device it will always return this error:
An attempt was made to break through the security policy of the user agent.
Here is the code to reproduce the issue:
navigator.requestMIDIAccess();
I also tried the sysex
option, it doesn't work.
navigator.requestMIDIAccess({
sysex: true
});
Thanks.