-
-
Save joshuapowell/917841 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
This file contains hidden or 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> | |
<meta charset="UTF-8" /> | |
<meta name="description" content="" /> | |
<title></title> | |
<!-- Flash player dependant upon WP Audio Player by Martin Laine --> | |
<!-- Download Javascript & Flash player here http://wpaudioplayer.com/ --> | |
<script src="js/audio-player.js"></script> | |
<script type="text/javascript"> | |
AudioPlayer.setup("js/player.swf", { | |
width: 290 | |
}); | |
</script> | |
</head> | |
<body style="background-color: #F9F9F9;"> | |
<h1 style="font-family:Helvetica,Arial,sans-serif;">HTML5 Audio Test</h1> | |
<audio id="audioplayer" src="test.mp3" controls="controls">Your browser does not support the audio element.</audio> | |
<!-- Fallback for browsers that don't support playing MP3 files via <audio> --> | |
<script type="text/javascript"> | |
var audioTag = document.createElement('audio'); | |
if (!(!!(audioTag.canPlayType) && ("no" != audioTag.canPlayType("audio/mpeg")) && ("" != audioTag.canPlayType("audio/mpeg")))) { | |
AudioPlayer.embed("audioplayer", {soundFile: "test.mp3"}); | |
} | |
</script> | |
<footer><small>Originally based on the Gist by <a href="https://gist.github.com/coneybeare">coneybeare</a></small></footer> | |
</body> | |
</html> |
This file contains hidden or 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
<audio id="audioplayer" src="test.mp3" controls="controls"> | |
Your browser does not support the audio element. | |
</audio> | |
<!-- Fallback for browsers that don't support playing MP3 files via <audio> --> | |
<script type="text/javascript"> | |
var audioTag = document.createElement('audio'); | |
if (!(!!(audioTag.canPlayType) && ("no" != audioTag.canPlayType("audio/mpeg")) && ("" != audioTag.canPlayType("audio/mpeg")))) { | |
AudioPlayer.embed("audioplayer", {soundFile: "test.mp3"}); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment