mpe-player icon indicating copy to clipboard operation
mpe-player copied to clipboard

Browser Permission Policies seem to have changed.

Open efi opened this issue 5 years ago • 2 comments

Hi!

In Google Chrome 78.0.3904.70 on Windows 10 (with Seaboard Block connected through BLE via MIDIBerry and Midi Loopback Device, but that should not matter) I recieve error messages instead of a working page:

script.js?v1.0.0:53 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
(anonymous) @ script.js?v1.0.0:53
script.js?v1.0.0:388 [Deprecation] Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions since M77, around September 2019. See https://www.chromestatus.com/feature/5138066234671104 for more details.
init @ script.js?v1.0.0:388

Maybe that means only a few changes to the code?

efi avatar Nov 09 '19 10:11 efi

I've been able to work around this locally by adding a Promise or async/await that waits for a "click" by the user on the page before trying to load the MpePlayer.init and re-initalizing the AudioContext.

The weird thing I'm running into is that the Seaboard or Lightpad block images never actually show up on the page even after I've connected them, but running with Debug allows me to see the notes being pressed.

espoelstra avatar May 13 '20 16:05 espoelstra

Man, I have no idea how I missed this issue getting reported. I will take a look at what is going on here. Seems like Chrome just added a security measure to require user interaction first, so might need to swap out the library to add hooks for engagement.

manifestinteractive avatar May 13 '20 19:05 manifestinteractive