mirror of
https://github.com/bvanroll/rpiRadio.git
synced 2025-08-29 12:02:42 +00:00
Initial Commit
This commit is contained in:
41
ProjectNow/NodeServer/toconvert/index.html
Executable file
41
ProjectNow/NodeServer/toconvert/index.html
Executable file
@@ -0,0 +1,41 @@
|
||||
<!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>
|
Reference in New Issue
Block a user