how to check if video file exist at different domain

9 views
Skip to first unread message

XMancs

unread,
Mar 29, 2012, 6:00:36 AM3/29/12
to bst-player
Hi!

I am using gwt and FlashMediaPlayer to watch a video from a different
domain. If the file exists at that location this is works fine, but if
something happened with that, the player still pops up and the only
thing that is rendered is the control bar. In firebug i got 404 error,
other than this i have no information of the status of the file, even
the FlashMediaPlayer's LoadException won't get fired. I want to give a
message to the user that "The file is unavailable at the moment" or
something like that, if 404 happens, i have tried using the java.net
package in gwt developement mode, and that worked fine. Unfortunately
gwt doesn't support the java.net package, so i tried other ways, and i
came across the SOP(same origin policy) problem. For that, i cannot
check the file with Http request, because it always returns statusCode
0.
Is there a way of checking if the file exists before actually starting
the FlashMediaPlayer, or the best way is to not use different domains?
I have googled for days and i didn't find solution for this type of
problem.

Thanx in advance,
XMancs
Reply all
Reply to author
Forward
0 new messages