audiojs
audiojs copied to clipboard
Music loading takes too long in chrome
Everything is just fine but the music load too long in chrome. It seems that the player doesn't want play the music while buffering..
I try in firefox and it play smoothly while buffering..
Thanks in advanced.
sorry for my bad english. I hope you understand.
I have this problem too, can't figure it out, and I don't want to switch players. Chrome 24.0.1312.57 on OS X 10.8.2.
Any luck on this @eantz?
I solved it with something like this :
var a = audiojs.createAll(); var audio = a[0]; first = $('div#music').attr('data-src'); audio.load(first);
I think this happen only in new update of Chrome. Because it used to be just fine before the update.
I hope this can help you.
@eantz would it be possible for you to share where you inserted this in the code? Thanks!
Okay.. here is the code :
<div id="music" data-src="<?php echo base_url() . 'uploads/audios/' . $song->file; ?>">
<audio autoplay></audio>
</div>
<script type="text/javascript" src="path/to/jquery.js"></script>
<script type="text/javascript" src="path/to/audio.js"></script>
<script type="text/javascript">
$(function() {
var a = audiojs.createAll();
var audio = a[0];
first = $('div#music').attr('data-src');
audio.load(first);
});
</script>
I insert this code within the body tag.
I hope it can help you
This doesn't work for me.
This doesn't work for me either.
What's interesting is that if you open Chrome Dev Tools then the audio file is loaded right away and you can play it. This is repeatable.
If you open the page without Chrome Dev Tools and then open the tools then again the file loads right away. If you then close Chrome Dev Tools and then reload, the audio file loads right away.
In any event, this still is not resolved.
Hi guys,
FYI, the snippet that I posted for more than a year ago still working in one of my client's site. Actually I don't handle that site anymore, but as far as I know the site is still working without any complaint, at least until this time.
I have no clue if the snippet doesn't solve your problem, sorry.
But, since this script is not under active development, I suggest you to pick other library like mediaelement or jplayer if you just starting your project. You may get better response there when you face any problem like this.
Thanks for the reply - while I use the mp3jPlayer WordPress plugin (based on jPlayer) for most of my site's audio players, I'm using audio.js for a single player on one page because it is really light and easier to style.
I can confirm that this issue does not exist in Chrome Canary and seems to be intermittent in Chrome (37.0.2062.120 Mac OSX). Hopefully it will be fixed in a later update of Chrome.