1

I have a little bit problem with a Firefox extension. So, the extension has a content script and this script inserts HTML code (image and SWF) into loaded pages. It works in google chrome and with the code below it shows image and also plays SWF:

// OK

<img src="chrome-extension://{extension_id}/data/images/loader.gif">

// OK

<embed type="application/x-shockwave-flash" src="chrome-extension://{extension_id}/data/images/anim.swf" width="100%" height="100%" menu="false" quality="autohigh" wmode="transparent" loop="false" play="true">

But Firefox has a problem with the SWF file:

// OK

<img src="resource://{extension_id}/{extension_name}/data/images/loader.gif">

// SWF is not loaded

<embed type="application/x-shockwave-flash" src="resource://{extension_id}/{extension_name}/data/images/anim.swf" menu="false" quality="autohigh" wmode="transparent" loop="false" play="true" height="100%" width="100%">

It shows an error: Security Error: Content at http://localhost/ may not load or link to resource://{extension_id}/{extension_name}/data/images/anim.swf.

Also another thing, when I enter the URL

"resource://{extension_id}/{extension_name}/data/images/anim.swf"

directly to the address bar then it doesn't play the file but on the left from the address bar is a small icon with a popup where is text "Adobe Flash is enabled on .....".

Is there any way how to bypass this security issue?

martinsuly
  • 11
  • 1
  • have you tried [this](http://stackoverflow.com/a/11262787/3219121)? – matagus Mar 06 '14 at 17:31
  • Not yet. But in google chrome is loaded this flash file from the address with prefix chrome-extension:// without problems, so I suppose that resource:// and chrome-extension:// are not like file:///. Also our SWF file doesn't load any external files. It's just a file with an animation. – martinsuly Mar 06 '14 at 20:14
  • Also it plays from file:///{path_to_the_file}/images/anim.swf in firefox and google chrome without problems, it just doesn't work from resource:// – martinsuly Mar 06 '14 at 20:25

0 Answers0