Hello Hello
I have a SWF loaded via a "swfobject.embedSWF()"
I use Javascript's methods to pass calls via the flash APIs: http://developer.longtailvideo.com/trac/wiki/Player4Api#Sendingevents
call.player.sendEvent('LOAD', theFile)
Using a XMLHttpRequest() call via GET to a PHP script I get a file url:
http://xx.yy.com/protected/5dde98716ad8f31127ab560d94f96b87/4cbabea0/test.mp4
Typing the URL into my browser starts the file, but passing the variable to the sendEvent() call does nothing. Why?
var response = http.responseText;
loadFile(response);
player.sendEvent('PLAY');
Is there something obvious that I am doing wrong? :/
Thanks.
EDIT1: Solution
I have gotten the generated url to load and play correctly by not just returning the video url with the XMLHttpRequest()
but returning an actual xml file with the necessary parameters to work with some of the modules I am using.
<rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
<channel>
<title>Example media RSS playlist</title>
<item>
<title>Lighttpd Video</title>
<media:content url="http://xx.yy.com/protected/91aa7dfa25596a7d59c3b9403fc4773f/4cbb35d6/test.mp4" />
<jwplayer:provider>http</jwplayer:provider>
<jwplayer:http.startparam>start</jwplayer:http.startparam>
</item>
</channel>
</rss>
I wonder if this is as obvious as it seems now. Can XMLHTTPRequest()
only return responses formatted as xml files? :/