Support Forum

Embedding Videos With An Iframe

EK Edward Koon
Edward Koon
Member

Another quick question.. smile

Been embedding a video here and there by clicking on the html button in the tinymce editor and pasting the videos share code copied to my clipboard. Works great the majority of the time, but some of the newer share embed codes uses an Iframe that SP don’t like. Any way around this?

Thanks again.

6 Answers

New Answer

MP Mr Papa
Mr Papa
Member

not really… iframes are a security risk and allowing your forum users to do so would not be pleasant for your site…

but wp and thus sp support oembeds… you just paste in the url to the video and it does all the embedding for you…

EK Edward Koon
Edward Koon
Member

That works for YouTube that i know of.

But this one from Fox news does not. Do i have to configure something else to set up oembeds?

http://video.insider.foxnews.com/v/1729745612001/

YS Yellow Swordfish
Yellow Swordfish
Member

Sorry to say that is not one that WP supports (at least currently). Do they only have an iFrame option?

MP Mr Papa
Mr Papa
Member

well, first a site, like foxnews, has to support oembeds too… then wp has a list or you can use hooks to add more… see: http://codex.wordpress.org/Embeds

you can embed videos – just not with iframes lest putting your server security at risk… do you really want any user who can post to use iframes??

Simple:Press Support wrote: >

EK Edward Koon
Edward Koon
Member

Hmmmm.. No that one just has a regular embed code, but tinymce strips it when saving. I ended up using Hanna Code Insert to make it play on the post, but that’s a pita. Another disadvantage of Hanna is, in my forum feed instead of showing the video it shows the Hanna short code. NBC videos show in the feed, as well as YT.

I use Hanna for blog posts and it works great, also when saving a blog post and saving a post copy to the forum Hanna works good. But for a quickie forum post it’s usually not worth the extra work, especially if I’m signed into the board with a non admin user acct.

Many including NBC and CBS work fine. It’s some of those weird not so heard of site videos that usually wont embed. Some seem to embed fine but don’t display when saving the post. I will start making a list of what works and what does not.

I didn’t realize that an Iframe was insecure. eBay puts a sellers html and self hosted photos in an Iframe within the listing that loads from another server. They said it was a security enhancement. When i sold cars on EBM i self hosted my own photos, and 20+ 800×600 images would produce a double scroll bar in Firefox.

MP Mr Papa
Mr Papa
Member

its not that iframes themselves are insecure but you want control over what is loaded in the iframe… the wp oembed stuff will actually put an iframe in there but the content is fixed… in a forum post, with any user being able to post and thus able to enter an iframe, the user can put anything in the iframe including external sites that might contain malware… its a bit different on the front then in the wp backend where you have explicit control over who can make a post…