Last active
December 14, 2015 14:39
-
-
Save edwerner/5102549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>wolves.js quickstart guide</title> | |
<!-- link wolves.js javascript --> | |
<script src="wolves-1.0.min.js"></script> | |
</head> | |
<body> | |
<!-- audio courtesy of http://www.noiseaddicts.com/ --> | |
<audio id="audio_01" class="demo-audio" name="WOLVES_DEMO_AUDIO" preload="auto" autobuffer="autobuffer"> | |
<source src="http://www.noiseaddicts.com/samples/3910.mp3" type="audio/mp3"> | |
</audio> | |
<script> | |
// create new sound manager instance | |
var soundManager = new WolvesSoundManager(); | |
// create local params hash | |
var audioParams = { | |
'id': 'audio_01', // audio id | |
'class': 'demo-audio', // audio class | |
'alias': 'WOLVES_DEMO_AUDIO' // audio alias | |
}; | |
// add new sound instance to sound manager | |
// passing in params hash | |
soundManager.addSound(audioParams); | |
</script> | |
<button id="play" onclick="soundManager.play('WOLVES_DEMO_AUDIO');">play</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment