Sanjeev
unread,Jan 3, 2012, 2:45:27 AM1/3/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jPlayer: HTML5 Audio & Video for jQuery
The Javascript function
<script type="text/javascript">
$(document).ready(function() {
var myCirclePlayer = new CirclePlayer("#jquery_jplayer_1",
{
mp3:"mp3/brobob.mp3"
}, {
cssSelectorAncestor: "#cp_container_1",
swfPath: "js/",
wmode: "window",
solution: "html,flash"
});
});
</script>
Change following line in circle.player.js
//supplied: "m4a, oga",
to
supplied: "mp3",
and go to following function in circle.player.js and change to
CirclePlayer.prototype = {
_createHtml: function() {
},
_initPlayer: function() {
var self = this;
this.player.jPlayer(this.options);
this.player.bind($.jPlayer.event.ready + this.eventNamespace,
function(event) {
if(event.jPlayer.html.used && event.jPlayer.html.audio.available) {
self.audio = $(this).data("jPlayer").htmlElement.audio;
}
//$(this).jPlayer("setMedia", self.media); // Makes Player
Autoplay off -
$(this).jPlayer("setMedia", self.media).jPlayer('play'); // To
make Autoplay on -
self._initCircleControl();
});
also go to following function in circle.player.js and change to
setMedia: function(media) {
this.media = $.extend({}, media);
//this.player.jPlayer("setMedia", this.media); // Makes Player
Autoplay off -
this.player.jPlayer("setMedia", this.media).jPlayer('play'); // To
make Autoplay on -
},
After two days of hard work it worked on almost every
browser(IE,Chrome,Firefox)(safari not tested) for all types of audio
file, just change to supplied: "m4a, oga", according to your file
format. Good luck.