wvuweb / cleanslate-cms

A place to file issues and view releases for CleanSlate CMS. http://cleanslatecms.wvu.edu
6 stars 0 forks source link

Responsive video snippet... #225

Open adamglenn opened 7 years ago

adamglenn commented 7 years ago

Can we get a snippet that accepts a YouTube URL and outputs the standard Youtube embed iframe (with no height or width) wrapped in a div with class "u-wvu-embed-container"? Also would be cool to have options such as "allowfulscreen" and whatever other standard parameters YouTube allows.

nreckart commented 7 years ago

Isn't this already possible? Insert "Media", choose "Video", paste a YouTube URL...

This results in the following output:

<iframe style="width: 774px; height: 353px;" src="//www.youtube.com/embed/JEJbyL5Zaaa?wmode=transparent" allowfullscreen="true" frameborder="0"></iframe>
adamglenn commented 7 years ago

Not that I know of, in order to have the video be responsive the class has to be applied to another div that wraps the iframe and there can be no height or width on the iframe. Unless you know a better way to do responsive videos. The media option applies class to iframe itself and adds a height + width.

nreckart commented 7 years ago

Ok, then I'd say the existing mechanism should be modified instead of creating a separate snippet. Having multiple ways to insert a YouTube videos sounds confusing. Consider it on the list.

nreckart commented 7 years ago

Can someone provide a list of the all the options we want to support for the YouTube embed, such as "allowfulscreen" mentioned above?

zeroedin commented 7 years ago

https://developers.google.com/youtube/player_parameters#Parameters

Assuming you'd want to support all of these. Below are the ones that might be preset or static.

cc_load_policy might just be static as 1 for accessibility.

autoplay should prolly always be 0 but could be made the case for just a preset and overridden.

hl prolly should be preset en but overridable for the campus in dubai?

Opinions?