PDA

View Full Version : FLVPlayback Component broken with Query String?


blankfist
06-01-2006, 10:56 PM
Has anyone else run into this problem? I cannot find information on it anywhere. When using the FLVPlayback component, query strings in the content path seem to break the component altogether. Here's essentially what I'm doing:

flvPath = "http://mydomain.com/mymovie.flv?str=info&str=moreinfo"
myFLVPlayback.load(flvPath)

I've also tried myFLVPlayback.setMedia(flvPath, "FLV") and myFLVPlayback.contentpath = flvPath, and everyone seems to return an error such as "Error opening URL" or "Unable to make connection to server or to find FLV on server".

I've also tried converting the query to ASCII Decimal values, URL encoded values and escaping and a slew of other things, but nothing seems to be working.

Anyone else suffering from this problem? Please tell me I'm not the only one. :)

-blank

blankfist
06-02-2006, 10:52 PM
The credit for this has to go to another Flash Developer who discovered why query strings break the FLVPlayback component. He traced it back to the source code of the component to this line in the NCManager.as class:

if (parseResults.streamName.slice(-4).toLowerCase() == ".flv") {

If the last four characters of the url are not ".flv" then it assumes it would be a SMIL file. A work around he provided (which I cannot share because it's his code, not mine) was write a class extending the NCManager class and seach anywhere within the url for ".flv" instead of just the last four characters.

Anyhow, I just wanted to share.

CyanBlue
06-04-2006, 04:44 AM
Can you possibly ask the developer to see if he could share what he has found out??? That'd be helping lots of other people... ;)

ihcmik
03-16-2007, 05:03 AM
I encountered this problem. Turns out all you need to do is make the URL have .flv at the end, and it'll work.

....mymovie.flv?str=info&str=moreinfo&dummy=.flv

Condor
05-29-2008, 02:21 PM
I used the suggested workaround, but it doesn't seem to work :(.

Could this have something to do with the changed URL processing in update 3 of Flash Player 9 (http://www.adobe.com/devnet/flash/articles/flvplayback_fplayer9u3_03.html)?

Does somebody know how I can get this to work ?

(and, no, I can't change the URL, because all URLs are generated by the CMS I am required to use)