Home » Wordpress » How can I use flashvars parameters with iframe?

How can I use flashvars parameters with iframe?

Posted by: admin November 30, 2017 Leave a comment

Questions:

I have a self-hosted wordpress blog and I’m trying to embed a video with the code on the website:

<iframe src="http://www.viki.com/player/medias/80715" frameborder="0" width="640" height="360"</iframe>

It works fine however, the video has an autoplay feature which plays the next video automatically and I’d like it to just stop at the end. Also, the video has subtitles which defaults to English and I’d like the Spanish ones to load instead of the English ones.

I’m able to achieve that with this code:

<embed src="http://a3.vikiassets.com/swfs/vikiplayer.swf?1320909340" flashvars="language_codes=es&amp;source=direct&amp;media_id=80715" type="application/x-shockwave-flash" wmode="transparent" width="640" height="360" allowfullscreen="true"</embed>

but, is there any way to achieve that with iframe?

Answers:

Did you have any luck with this? I’ve got a similar issue but it is not as tidy as I would like.

I have a page on domain1.com which has an iFrame with this code loading the Flash file from another server – domain2.com.

index.html file on domain1.com:

<iframe name="iframe"  src="http://www.domain2.com/iframe.php?var1=myvar" scrolling="no" frameborder="no" height="600" width="970">
</iframe>

On domain2.com the iFrame code is a PHP page and requests the variable like this:

<?php $var1 = ($_REQUEST['var1']);

<object... (Flash embed etc)
<param name=FlashVars value="var1=<?php echo $var1;?>" />

I can load in many Flash variables to control the Flash file over different servers but ideally I’d like to iframe in an swf with the query string but this seems to do the trick.

If you had a better solution it would be good to see.
Thanks.