Download
User Rating: 4.9/5 ( 1 votes)
UbaPlayer – The jQuery HTML5 Audio Player with Flash Fallback.
UbaPlayer is a simple jQuery plugin that plays audio natively in modern browsers and uses Flash where native playback is impossible. It is tested to work in the following browsers:
-
Mac (Chrome 10+, Safari 4+, Firefox 3.5+, Opera)
-
PC (Chrome 10+, Safari 4+, Firefox3.5+, Opera, IE6+)
-
iOS 3+ (Safari Mobile)
-
Android 2.2+ (Chrome, Firefox 4, Opera 11)
Source: brianhadaway.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" href="css/styles.css" />
<script src="js/jquery.min.js"></script>
<script src="js/jquery.ubaplayer.min.js"></script>
2. HTML
<div id="ubaplayer"></div>
<ul class="ubaplayer-controls">
<li><a class="ubaplayer-button" href="media/FiftyYears.mp3">Fifty Years</a></li>
<li><a class="ubaplayer-button" href="media/AwMan.mp3">Aw Man</a></li>
<li><a class="ubaplayer-button" href="media/ItsAThang.mp3">It's a Thang...</a></li>
</ul>
3. JAVASCRIPT
$(function(){
$("#ubaPlayer").ubaPlayer({
volume: 0.1
});
});
4. OPTIONS
defaults: {
audioButtonClass: 'ubaplayer-button',
autoPlay: null,
codecs: [{
name: 'OGG',
codec: 'audio/ogg; codecs="vorbis"'
}, {
name: 'MP3',
codec: 'audio/mpeg'
}],
continuous: false,
controlsClass: 'ubaplayer-controls',
extension: null,
fallbackExtension: '.mp3',
fallbackFunctions: {
error: null,
pause: null,
play: null,
resume: null
},
flashAudioPlayerPath: 'swf/player.swf',
flashExtension: '.mp3',
flashObjectID: 'ubaplayer-flash',
loadingClass: 'ubaplayer-loading',
loop: false,
playerContainer: 'ubaplayer-container',
playingClass: 'ubaplayer-playing',
swfobjectPath: 'js/swfobject.js',
volume: 0.5,
}