problem with ajax requests while downloading mp3

39 views
Skip to first unread message

mrsticks

unread,
Jul 7, 2009, 8:15:11 AM7/7/09
to jPlayer: the CSS styleable jQuery audio player plugin
Hey Mark,

I have a problem in jquery when a mp3 is downloading.
If i see the download progress indicator and while its going if i do a
ajax request it
will wait till the buffer download is finished and then execute it.

So there is a fair delay when working with ajax stuff if the download
is going.

Did you come across this? and do you know a possible work around or
solution?

tnx!

Mark P

unread,
Jul 8, 2009, 7:18:21 PM7/8/09
to jPlayer: the CSS styleable jQuery audio player plugin
Hi mrsticks,

I just did a basic test on my demo-01.htm by creating a simple php
file and adding the ajax request:

ajax-test.php:

<?php
echo "Testing, testing, 1, 2, 3.";
?>

demo-01.ajax.htm (addition to $(document).ready()):

$("#ajax-request").click( function(e) {
$.ajax( {
url: "ajax-test.php",
success: function (data, textStatus) {
$("#ajax-response").text(data);
}
});
return false;
});

demo-01.ajax.htm (addition to HTML):

<p>Test simple <a href="#" id="ajax-request">AJAX request</a>.</p>
<p id="ajax-response">Nada!</p>

I then cleared my cache and reloaded the page and clicked the link
while the mp3 file was downloading.
I found that the ajax response worked while the mp3 file was
downloading, and the "Nada!" text was replaced with "Testing, testing,
1, 2, 3.".

Maybe if you provide me with a development area link I'll be able to
investigate further.

Best regards,
Mark P.

mrsticks

unread,
Jul 9, 2009, 5:17:19 AM7/9/09
to jPlayer: the CSS styleable jQuery audio player plugin
I'm glad to hear that its not the flash then.
It might be some strange lib or jquery thing i'm using.

Its really anoying and was thinking about putting the player in an
iframe to fix it.

I'm really hoping my little project will be finished soon so i can
post it to you Mark.
I think you're really gonna like it.

Thank you for jplayer ;)
Reply all
Reply to author
Forward
0 new messages