I'm evaluating JW FLV Player for a possible commercial license and love it, especially the API. However, I've run into a problem that is truly mysterious to me. I hope you have some insight.
I'm hosting my FLV's on Amazon's S3 service which has the ability to create urls that are valid only for a certain length of time (to prevent leeching). I have a simple PHP function that returns to currently valid URL for the specified FLV file. It might sound complicated if you haven't used it before, but it's quite simple.
I have to urlencode the file name to get them to work, and it works fine. Mostly. Except on some files. Some files return a "file not found" error, even though they are there if I directly enter the URL into the browser. There's something in the way they're being interpreted by either javascript or JWFLV.
For example, if I set flashvars { file: } to
http://video.icapwebshops.com/03-01.flv?AWSAccessKeyId=0FCXSNM7KPNCFYG8QA02&Expires=1231736410&Signa...
then it works. However, if I use the follow url, it gives me the "Video not found" error:
Here are the two lines, urlencoded:
http%3A%2F%2Fvideo.icapwebshops.com%2F03-01.flv%3FAWSAccessKeyId%3D0FCXSNM7KPNCFYG8QA02%26Expires%3D1231736410%26Signature%3DIzp%252F6ex6rKg6uIknSOPD%252FdGEge0%253D
http%3A%2F%2Fvideo.icapwebshops.com%2F04-01.flv%3FAWSAccessKeyId%3D0FCXSNM7KPNCFYG8QA02%26Expires%3D1231736410%26Signature%3D8%252BfnypVUPj2w4kCp0ekQ7lJr1QU%253D
The files would have likely expired by the time you read this, but I can assure you, when I enter the non-urlencoded URLs into the browser right now, they are found.
There's evidently something wrong with the second url, and I have no idea why. Some of the videos work perfectly, and others not at all. I've double-checked that the files have the correct permissions set at S3.
Any ideas? I told you this was a real head-scratcher!
At first I thought it might be the way swfobject.js encoded the flashvars, but it seems to be working perfectly.
Is there a way to expand on the error message ("Video not found: [url]" that's given by JWFLV? For example, to obtain the http response code?