Created
December 21, 2012 19:09
-
-
Save will-in-wi/4355041 to your computer and use it in GitHub Desktop.
Example for streaming audio issue.
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>This is an audio tag test.</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> | |
<script src="soundmanager/script/soundmanager2.js"></script> | |
<script> | |
$(function(){ | |
soundManager.setup({ | |
url: 'soundmanager/swf/', | |
flashVersion: 9, | |
useFlashBlock: false, | |
onready: function() { | |
$('.fire3').click(function(e){ | |
e.preventDefault(); | |
var mySound = soundManager.createSound({ | |
id: 'aSound', | |
url: 'http://currentstream1.publicradio.org/', | |
}); | |
mySound.play(); | |
}); | |
$('.pause_sound').click(function(e){ | |
e.preventDefault(); | |
soundManager.destroySound('aSound'); | |
}); | |
} | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div> | |
<h1>Audio Tag Test</h1> | |
<a class="fire3" href="#">Fire</a> | |
<a class="pause_sound" href="#">Pause</a> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment