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

New example file for the midi-player with 2 players

Open efreja opened this issue 6 years ago • 2 comments

A new song file was added (example-song2.js) There are 2 separate divs for the 2 players. Two separate instances of the MidiPlayerClass are created, each of them getting the div id as parameter + an additional list of options allowing to change the progress bar color for example. Although this interface is not compatible with the previous code, it was kept as close as possible to the former one. BR

efreja avatar Jun 26 '19 09:06 efreja

Interface changed:

  • No need for having an extra link for loading the song when it's time to play it: This function (loadScore) is passed to MyPlayerClass constructor
  • It's the 'play' button of the player that starts the MyPlayerClass play method

efreja avatar Oct 15 '19 20:10 efreja

Note that the example must now be run from a web server, as browsers don't accept that local resources (here wildwebmidi.data) are pulled with file protocol (only HTTP) : CORS error

efreja avatar Oct 16 '19 07:10 efreja