Forum Discussion

sullysnack's avatar
sullysnack
Khoros Alumni (Retired)
12 years ago

Desire: Configurable iframe parameters & attributes for member-posted youtube videos

A suggestion... we would like the ability to configure the youtube iframe markup which Lithium embeds into messages when a community member posts a youtube video. Here's an example of what happens now...

 

Member clicks the message post editor video icon and sees the video embedpage popup. In the popup the member pastes a youtube link in the external video URL text box, e.g.:

http://www.youtube.com/watch?v=dDwf4XmS8ww

The member clicks Preview, chooses video size, chooses video alignment and then clicks Insert video. Back on the message post page the member clicks Post.

 

When members view the post they see a youtube video player. The embed iframe code behind the player will look something like this:

<iframe src="//www.youtube.com/embed/dDwf4XmS8ww" width="320" height="265" frameborder="0" allowfullscreen="true"></iframe>


We would like a feature in Studio or Admin that allows us to configure the iframe markup for all future youtube video posts, so the code behind the player could look like this instead:

<iframe src="//www.youtube.com/embed/dDwf4XmS8ww?wmode=transparent" width="320" height="265" frameborder="0" allowfullscreen="true"></iframe>

 

The only difference in the above example is the new iframe src attribute has ?wmode=transparent appended. We like to do this so that youtube video iframes do not appear above our static overlay divs in Safari and IE. There are no CSS tricks to solve for the problem in those browsers otherwise. Yes, not even z-index. Here's a primer on the topic:

http://www.scorchsoft.com/blog/youtube-z-index-embed-iframe-fix/

 

 

We can modify the src attribute with jQuery after the page has loaded but this causes unwanted flickering in the player thumbnail. If the video is already playing when you modify the src attribute on the fly, then the video stops playing and its iframe is reloaded. We would prefer that the iframe markup come with the extra parameter already there.

 

There are a few other attributes we may want to add to the youtube iframe tag. It would be great if Lithium let us configure extra src parameters and extra attributes for member-posted youtube video iframes.

 

Thank you,

Dave