var $ = require("jquery");


// Initialize player and register event handler
var Player = new MidiPlayer.Player();

var playTrack = function (filename, pk) {
  // Load a MIDI file
  MIDIjs.stop();
  MIDIjs.play(filename);
  $("#play-" + pk).hide();
  $("pause-" + pk).show();
}

var pauseTrack = function (pk) {
  MIDIjs.stop();
  $("pause-" + pk).hide();
  $("play-" + pk).show();
}


@@ -25,96 +25,8 @@
 );%0A%0A
-%0A// Initialize player and register event handler%0Avar Player = new MidiPlayer.Player();%0A%0A
 var 
@@ -270,28 +270,100 @@
  $(%22play-%22 + pk).show();%0A%7D%0A%0A
+export default %7B%0A    playTrack: playTrack,%0A    pauseTrack: pauseTrack%0A%7D;

Update midi player javascript file