rmcgibbo / slidedeck

Beautiful HTML5 slides in markdown. A easy-to-use fork of the google-io-2012 slide deck
317 stars 47 forks source link

Youtube IFrame #12

Open kyleabeauchamp opened 11 years ago

kyleabeauchamp commented 11 years ago

I was having difficulty getting embedded youtube iframes. I think this is probably the preferred way to handle most videos, so it would be good for these to work.

<iframe data-src="http://www.slashdot.com">
</iframe>

<iframe data-src="http://www.google.com">
</iframe>

<iframe width="640" height="385" src="http://www.youtube.com/embed/T0w7thr_d04?html5=1"></iframe>

https://developers.google.com/youtube/iframe_api_reference#Examples

The top iframe works, but the bottom two do not. For the google example, this is because Google has a "no-iframe" security feature. I've also tried setting the HTML5 tag. This makes the youtube page appear, but disappear after clicking play.

PS: I don't expect you to solve this issue--I'm just documenting my progress here so we have a paper trail for instructional purposes.

rmcgibbo commented 11 years ago

The ipython notebook uses an iframe to display youtube videos in the notebook: https://github.com/ipython/ipython/blob/master/IPython/lib/display.py#L42. They're using a slightly different format, but it's still an iframe.