Files
rpiRadio/ProjectNow/NodeServer/toconvert/index.html
2018-05-19 02:20:19 +02:00

42 lines
1.5 KiB
HTML
Executable File

<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JavaScript MIDI player</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="wildwebmidi.js"></script>
<script type="text/javascript" src="midiplayer.js"></script>
<script type="text/javascript" src="example-song.js"></script>
<link rel="stylesheet" href="midiplayer.css">
</head>
<body>
<div style="position: fixed; top: 50%; left: 50%; margin-top: -50px; margin-left: -225px;">
<a href="javascript:startPlaying();">Click to play!</a>
<div id="player"></div>
</div>
<script type="text/javascript">
var midiUpdate = function(time) {
console.log(time);
}
var midiStop = function() {
console.log("Stop");
}
function startPlaying() {
$("#player").midiPlayer.play(song);
}
$( document ).ready(function() {
$("#player").midiPlayer({
color: "red",
onUpdate: midiUpdate,
onStop: midiStop,
width: 250
});
});
</script>
</body>
</html>