grimmdude / MidiPlayerJS

♬ MIDI parser & player engine for browser or Node. As a parser converts MIDI events into JSON. Works well with single or multitrack MIDI files.
https://grimmdude.com/MidiPlayerJS/
MIT License
359 stars 52 forks source link

Player slows down in unfocused browser tab #2

Closed grimmdude closed 6 years ago

grimmdude commented 7 years ago

The player relies on setInterval, and in a browser if the tab is not in focus this does not work correctly. It slows down.

grimmdude commented 7 years ago

It looks like Chrome no longer slows down setInterval process when tab is not in focus.

grimmdude commented 6 years ago

I don't think there's much I can do to resolve this right now.