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

Your preferred username that is used when logging in.

Configuring flowplayer in an adobe air html app Created Jul 9, 2009

This thread is solved

Views: 1143     Replies: 4     Last reply Aug 24, 2009  
You must login first before you can use this feature

gowiththeflow

Posts: 3

Registered:
Jul 9, 2009

Configuring flowplayer in an adobe air html app

Posted: Jul 9, 2009

Hi folks

Trying to get flowplayer working in an Adobe AIR html app, and so far failing.

When player initialisation is attempted, I get the following error in the player window:

300: Player initialization failed: SecurityError: Error #2142

I've been following the 'minimal installation' directions. I've added the FP swf and js files to the project, have made sure that both are packaged. I have included the js in the main html page, created the anchor container, and am instantiating the player as shown in the tutorial.

Looks like the above problem is some sort of Flex / Air security sandbox issue, but I've been unable to find anything concrete relating to it - has anyone else had it and / or solved it?

Any pointers appreciated.

gowiththeflow

Posts: 3

Registered:
Jul 9, 2009

» Configuring flowplayer in an adobe air html app

Posted: Jul 10, 2009

Reply to: Configuring flowplayer in an adobe air html app, from gowiththeflow
After some further poking around, I've found that the error is caused by setting the current SecurityDomain (line loaderContext.securityDomain = SecurityDomain.currentDomain;
in PluginLoader). This is in turn done since the call to URLUtil.localDomain returns false.

The reason for localDomain returning false is that AIR prepends local path references with the app: URI scheme. Therefore I've been able to get FP working with AIR by adding the following check to URLUtil.localDomain:

if (swfUrl.indexOf("app:") == 0) return true;

I've validated this fix locally and it's worked great for me.

What are the chances of getting this patch into the next Flowplayer release?

Many thanks

Streamapp

Posts: 2

Registered:
Aug 22, 2009

Configuring flowplayer in an adobe air html app

Posted: Aug 22, 2009

Reply to: » Configuring flowplayer in an adobe air html app, from gowiththeflow
gowiththeflow were to add this line i am not gettin if (swfUrl.indexOf("app:") == 0) return true;
I m to trying Configuring flowplayer in an adobe air app wen i gave the relative path i m gettin the same security error but wen i m giving absolute path it is running perfectly example (file:///C:/abc/flowplayer/swf) but i want relative path in my code.
Should i have 2 edit flowplayer.swf file
Can we do anything with security sandbox of adobe air
Please help me out ...PLease

gowiththeflow

Posts: 3

Registered:
Jul 9, 2009

» Configuring flowplayer in an adobe air html app

Posted: Aug 23, 2009

Reply to: Configuring flowplayer in an adobe air html app, from streamapp
Hi

What I did was check out the Flowplayer project source code, and make the change in the URLUtil file as described above.

Once the change is made, you would need to rebuild the project using ant, which would give you your very own flowplayer swf.

Obviously this isn't the same as the FP team would make this change (or a different one). You should also be mindful of licensing issues if you consider going down this route. I believe FP is licensed under GPL, which would presumably mean that your Air app would have to conform to a similar licence.

I didn't get anywhere with air security sandbox stuff. I don't believe that's the issue here.

Hope this is useful. FWIW I decided not to use FP for my air project in the end, opting instead to use adobe APIs directly.

Streamapp

Posts: 2

Registered:
Aug 22, 2009

Configuring flowplayer in an adobe air html app

Posted: Aug 24, 2009

Reply to: » Configuring flowplayer in an adobe air html app, from gowiththeflow
Thnx for quick reply ....
One more question
How to build project using ant
i have downloaded flowplayer src folder and there is some build.xml how build it into flowplayer.swf
PLease help out.....
i made changes in urlutil.as
but don't know to build swf file of the src folder