chobo
chobo

Reputation: 32301

Flash not displaying in iframe

I have a flash video player that I would like to embed in other pages, so I created an iframe to do this. It has to be an iframe because it depends on other swf files that get loaded into it (plugins).

The weird thing is the video does not play when loaded inside the iframe, but if I go to the html source and cut and paste the tag outside of the iframe it works.

<iframe width="500px" height="500px" src="http://somedomain.com/embed.aspx" ></iframe>

Upvotes: 0

Views: 8005

Answers (2)

miktemk
miktemk

Reputation: 51

Check your console. If you are also getting these errors:

"Blocked script execution in '...' because the document's frame is sandboxed and the 'allow-scripts' permission is not set."

You can configure those sandbox flags on the iframe

<iframe width="100%" sandbox='allow-scripts allow-same-origin'></iframe>

Upvotes: 2

chobo
chobo

Reputation: 32301

Got it working by adding come css to the html page containing the flash player. It seems the absolute positioning made all the difference.

html, body, object { margin: 0px; padding: 0px; position: absolute; height: 100%; width: 100%; overflow: hidden; background-color: #000; }

Upvotes: 0

Related Questions