Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title> example </title>
- <script type="text/javascript" src="audio-player/audio-player.js"></script>
- </head>
- <body>
- <audio id="audioplayer" preload controls loop style="width:424px;">
- <source src="test.mp3">
- </audio>
- <script type="text/javascript">
- AudioPlayer.setup("audio-player/player.swf", { width: 290 });
- var audioTag = document.createElement('audio');
- if (!(!!(audioTag.canPlayType) && ("no" != audioTag.canPlayType("audio/mpeg")) && ("" != audioTag.canPlayType("audio/mpeg")))) {
- AudioPlayer.embed("audioplayer", {soundFile: "test.mp3"});
- }
- </script>
- <!--
- http://wpaudioplayer.com/standalone/
- http://matt.coneybeare.me/getting-html5-audio-tag-and-flash-fallback-to/
- http://stackoverflow.com/questions/11681856/html5-audio-tag-flash-fall-back/
- -->
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement