Someone recently asked about embedding videos in a Moodle 2.0 HTML block:
I like to put videos in an html block on the side. As the blocks are small I use the ?d=160×160 or whatever resize method to get them to a small size – but I can’t do this with a Moodle 2.0 block and I can’t see how to do this. That massive “flow player” thingie won’t budge and I am a bit stuck. What am I missing?
Howdy! I just put a YouTube video in an HTML block using the embed code from YouTube, adjusting it to dimensions of 150×150. That worked.
However, embedding the video in HTML code, as well as just adding the “?d=160×160” to the end of the video (you know, highlight spaces, then link those and add the desired size) didn’t work at all.
Fortunately, the following code worked in HTML view and displayed correct size in the Moodle 2.0 HTML block:
The embed code worked. I adapted it from the embed code for MPEG movies that appears online in an HTML tutorial. One of the interesting tips for Moodle 1.9–not the 2.0 version–is that you could easily constrain the dimensions of an embedded video, especially one for an HTML block which fits in the sidebar of a Moodle course, using the “?d=160×160”
Unfortunately, that trick doesn’t seem to work in Moodle 2.0 HTML block when linking a video. Instead you have to paste in the embed code shown above.
Everything posted on Miguel Guhlin’s blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure