Did you know... how to get the most out of embedded YouTube clips - Digital Learning

Monday, 15 October 2012

Did you know... how to get the most out of embedded YouTube clips

Did you know... that you can customise the embed code that YouTube provides to get more out of it? We use YouTube videos a lot in ScHARR so I thought I'd share the code we go for when embedding YouTube videos in MOLE... 

<iframe id="ytplayer" type="text/html" width="640" height="360"src="https://www.youtube.com/embed/ paste the id of your video (11 nonsense characters at the end of the video link) here, with no spaces between the ...embed/ and ?modest... ?modestbranding=1&rel=0&autohide=1" frameborder="0" allowfullscreen>&nbsp;</iframe>

It's a perfect width in MOLE 2 for people with small monitors, the buttons for turning it to hi-def and fullscreen are there, the YouTube branding is reduced to a little logo, they aren't shown links to random videos once this ends and the controls hide themselves when the viewer isn't moving the mouse. The &nbsp; is just there to stop the editor in MOLE 2 doing odd things. The result looks like this:





If you ever find you're having trouble embedding online media content in MOLE the <iframe> tag is worth a shot. For instance, the embed code Prezi currently provides doesn't work in MOLE... it uses tags that the editor strips out. But this will work*:
<p>By Claire Beecroft</p><iframe id="prezi" type="text/html" width="550" height="400" src="http://prezi.com/hmrjmq_nxuiz/view/" frameborder="0">&nbsp;</iframe> 



*you don't have to namedrop Claire Beecroft, but you do need something, anything else in the item apart from the iframe, otherwise the MOLE editor will reject it.

Dan

No comments:

Post a Comment