Log in

View Full Version : Looking for a video embed code please read for details



Franken
03-20-2016, 02:12 AM
Sorry but I don't know the exact name of what I am looking for so I will attempt to explain. I don't know if I will need to do this with HTML, CSS or Javascript.

I have a Wordpress site and I embed videos for people to watch. These are third party videos not the standard youtube or vimeo. I embed multiple mirrors per video in case one breaks. The problem is that I have been loading all the iframes on the same page at the same time and this slows down the page loading and seems rather inefficient to me.

What I would like to do is have the page load only one (the first) video mirror, and then have a list of links below the video to load the other mirrors as alternates if the first one is broken. Either open the second mirror below the first or reload the page completely with the new mirror as the main video. Either way will work. Simply showing or loading one mirror at a time. Can anyone help me do this withing the Wordpress framework? If there is a plugin already out there please let me know.

Thanks

Beverleyh
03-20-2016, 10:00 AM
Depending on how this 3rd party video service is setup, you might be able to use a target attribute on a hyperlink and the name attribute on the iframe ("opening target links in a named iframe"). Here's a small demo http://jsfiddle.net/HnXFj/2/

You could also look for a script to "change iframe src by clicking on link" (try Googling this phrase)

Without knowing anything about the video service though, it's hard to offer any more help.

As for asking if there is already a Wordpress plugin out there, we're not really the people to ask - the Wordpress community will be able to give more advice.

Please also bear in mind that while we can offer general advice on script usage and setup in a standalone web page, it's unlikely that we can tell you how to modify and install anything on your Wordpress theme - you would need to know how to do that already (such as modifying template code or working with a 3rd party script/plugin that allows you to add custom code blocks)

Franken
03-21-2016, 11:24 PM
Thank you for your help Beverly. I googled the phrase you mentioned and I was able to find exactly what I needed. Pretty much like your example. Any HTML works perfectly inside of Wordpress so I don't have to use any fancy plugins to do what I need. Thanks again.