You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Audio plugin problems Created 3 weeks and 3 days ago

This thread is solved

Views: 250     Replies: 6     Last reply 13 days ago  
You must login first before you can use this feature

andrew_k

Posts: 5

Registered:
3 weeks and 3 days ago

Audio plugin problems

Posted: 3 weeks and 3 days ago

Hi everyone!

I'm currently facing the audio plugin problems which stops me from using flowplayer at all :(

If the url of audio clip refers to non-existent file (server gives 404 responce), flowplayer does nothing, not reporting errors via onError callback and just waits forever. I expect to receive error code 200: "Stream not found" to correctly process it, but i get just a player doing something inside (or doing nothing inside).

It does not happen to *.flv files. Only to *.mp3.

This error is easy to reproduce:
just change "/demos/plugins/fake_empire.mp3"
to "/demos/plugins/fake_empire_blah_blah.mp3"
in the example: "Flowplayer as a music box" http://static.flowplayer.org/plugins/streaming/audio.html) and see what happens.

Any ideas?

Thanks,
Andrew.

andrew_k

Posts: 5

Registered:
3 weeks and 3 days ago

» Audio plugin problems

Posted: 3 weeks and 3 days ago

Reply to: Audio plugin problems, from andrew_k
Dear developers,

this is what i've got from the AudioProvider.as ActionScript file:

private function onIoError(event:IOErrorEvent):void {
log.error("Unable to load audio file: " + event.text);
//dispatching this error causes crashes in Safari:
//_clip.dispatch(ClipEventType.ERROR, "Unable to load audio file: " + event.text);
}

As it seems to me, the line which should propagate the IO (reading) error to upper level classes is commented because of Safari buggy behaviour? And this is why onError callback of Player object keeps silence? Right?

Is there anything we could do with it?

andrew_k

Posts: 5

Registered:
3 weeks and 3 days ago

» Audio plugin problems

Posted: 3 weeks and 2 days ago

Reply to: Audio plugin problems, from andrew_k
SOLVED!

So, I did it! I uncommented the line

_clip.dispatch(ClipEventType.ERROR, "Unable to load audio file: " + event.text);

than i rebuilt this plugin,
and now i'm getting beautiful and graceful onError callback in the case of missing mp3 (404 and other errors) or network errors during the transfer.

Error code is: "0"
Error text is: "Unable to load audio file: Error #2032"

This is enough for me to detect the failure.

And by the way, comment
//dispatching this error causes crashes in Safari
is not valid any longer (at least to my experience): Safari (ver. 4.0.3, Windows build) produces the same error message with no crashes.

You may download the corrected version of Audio plugin here:
http://beta.iu3.ru/flowplayer.audio-3.1.2.swf
(I do not give much guarantee that this link will live forever ).

I hope the developers will uncomment this line and will supply the corrected version in further releases.

Thanks to everyone who was interested in this topic.
Andrew.

rchari

Posts: 8

Registered:
Oct 12, 2009

» » Audio plugin problems

Posted: 2 weeks ago

Reply to: » Audio plugin problems, from andrew_k
Hi Andrew
First of all thanks for posting this.
I am facing the same issue ---- at least I think so.
I am using the flowplayer commercial version 3.1.5 as an audio player on our site. I frequently hit a case wherein the player hangs - there is no music, it is not streaming the file and no operation on the player works. The only option is to reload the page.
In the firefox console I see the following error:
Error: uncaught exception: Error calling method on NPObject! [plugin exception: Error in Actionscript. Use a try/catch block to find error.].

And if I enable Firebug logs, I could see an Audio Plugin error: unable to load file error #2032

If you have solved this can you please share the plugin. I think the link you posted does not work. It gives me a really small file which I dont think is correct. Also can you tell me if there is a error callback and how to handle the error gracefully
Thanks
RC

andrew_k

Posts: 5

Registered:
3 weeks and 3 days ago

» » » Audio plugin problems

Posted: 2 weeks ago

Reply to: » » Audio plugin problems, from rchari
Hi!

Try this link:http://www.iu3.ru/flowplayer.audio-3.1.2.swf
The file is really not big (2868 bytes).

To handle this error I use standard technique described in the Flowplayer docs:

currPlayer = $f( "played_dom_id", {
src: http://yourdomainname/swf/flowplayer-3.1.5.swf",
version: [9, 115],
wmode: 'transparent',
onFail: function() { alert('No flash plugin!'); }
}, {

plugins: {
audio: { url: 'http://yourdomainname/swf/flowplayer.audio-3.1.2.swf' } },

clip: { autoPlay: false },

onError: function( in_code, in_msg ) {
currPlayer.close();
alert("Error code: "+in_code+", error text:"+in_msg);
}

});

In the code above I provide onError callback, which is called in the case of all errors, as well as in the case of audio plugin error, which appears as a result of possible network and server errors during transmition of mp3 file to player.

Pay a special attention to the "currPlayer.close();" in onError callback - it stops all attempts of the player to download the file over possibly broken connection and brings the player back to life (it becomes controllable again).

Hope this helps.
Cheers!
Andrew.

rchari

Posts: 8

Registered:
Oct 12, 2009

» » » » Audio plugin problems

Posted: 13 days ago

Reply to: » » » Audio plugin problems, from andrew_k
Andrew
Works like a charm - I hope this gets into the official audio plugin. Your post was REALLY helpful for a novice like me.

Just another question - although this may be a generic flash setting on my browser - my browser pops a flash error with a "Continue"/"Dismiss All" option when the error happens and after I click either of these options, my onError function gets executed. Is this normal?
The error is below:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at org.flowplayer.view::Launcher/onClipError()
at EventListener/notify()
at org.flowplayer.model::EventDispatcher/_dispatchEvent()
at org.flowplayer.model::EventDispatcherhttp://flowplayer.org/core/internal::doDispatchEvent()
at org.flowplayer.model::Clip/onClipEvent()
at EventListener/notify()
at org.flowplayer.model::EventDispatcher/_dispatchEvent()
at org.flowplayer.model::EventDispatcherhttp://flowplayer.org/core/internal::doDispatchEvent()
at org.flowplayer.model::ClipEventDispatcher/dispatch()
at org.flowplayer.audio::AudioProvider/onIoError()

andrew_k

Posts: 5

Registered:
3 weeks and 3 days ago

» » » » » Audio plugin problems

Posted: 13 days ago

Reply to: » » » » Audio plugin problems, from rchari
I'm glad that my post helps you!

I do not see any flash errors popping up in any of my 5 different web browsers. I guess you can see error #1009 as a result of enebled debug mode (or something) in your flash plugin. So I think, the error is really there, but it is not fatal one and most users will never see it without having debug mode of flash plugin enebled. But this is just a guess, I do not state it for certain.

Best regards,
Andrew.