1
votes

I want to embed jwplayer.flash.swf with my own swf. For that I am using swfloader component.

<s:SWFLoader id="jwPlayer" width="320" height="240" 
   source="jwplayer.flash.swf?file=http://localhost/application/streams/myfile.flv"/>

While loading I got security sandbox violation error.

*** Security Sandbox Violation ***
Connection to jwplayer.flash.swf?file=http://localhost/application/streams/myfile.flv 
halted - not permitted from http://localhost/application/main.swf

But I have correct crossdomain.xml file with allow access to all domain. First I want to know embedding jwplayer with in another swf is possible or not.

1
Just for your reference, a crossdomain.xml file wouldn't help here, because both SWF's are coming from the same domain (localhost). What happens if the source is just: source="jwplayer.flash.swf" Do you get the same error? - Sunil D.
<?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain="*" secure="false"/> </cross-domain-policy> This is my crossdomain.xml - arulraj.net
I would like to reiterate that the crossdomain.xml is not the problem. It's not required in this situation. Sorry I can't help more than that. - Sunil D.
That is definitely not something that is supported. Embedding the JW Player inside of another SWF is not an intended use case and not something we test for, or support, I'm afraid. - emaxsaun
SwfLoader is not helped me in this case.. so I just used Iframe.. - arulraj.net

1 Answers

0
votes

Finally I have embed jwplayer with in another swf using https://github.com/flex-users/flex-iframe Here I am using jwplayer 5.8 version. This is my sample code

<flexiframe:IFrame id="jwPlayer" width="480" height="360"
 source="http://localhost/application/player.swf?
file=http://localhost/application/streams/myfile.flv&amp;controlbar=bottom&amp;
viral.allowmenu=false&amp;viral.onpause=false&amp;viral.oncomplete=false"/>

More on wiki https://github.com/flex-users/flex-iframe/wiki/Users-guide#create-an-iframe

embed jwplayer in another swf