Embed a YouTube video in Desire2Learn

Well, I put this video together and demonstrated this technique at a video workshop for our faculty last week, only to have it fail miserably in Internet Explorer 7. Of course. Go figure.

I have embedded dozens of YouTube videos in blogs, wikis, discussion boards and in older version of D2L (prior to 8.3) and have never had a problem. But the D2L HTML editor (which I believe is based on the open source TinyMCE editor) strips out the embed tag when you cut and paste using IE7.

This is a brutal bug, imho, and I’ve reported it to D2L as well as posted it in the D2L user community.

At any rate, here is the video, complete with a spiffy annotation (my first for a YouTube video) explaining this does not work in IE 7.

 

Clint Lalonde

Just a guy writing some stuff, mostly for me these days on this particular blog. For my EdTech/OpenEd stuff, check out https://edtechfactotum.com/.

 

11 thoughts on “Embed a YouTube video in Desire2Learn

  1. Thanks to everyone for the information. I’m pretty sure embedding “Under Pressure” by Queen and Bowie in anticipation of an exam is pedagogically sound.

  2. I have found that you can go into the preferences in the My Preferences and go to the Appearences & Accessibility tab to turn off the HTML editor. Then you can create the News item and paste the embed code in the text box. Save the news item and then turn the HTML editor back on. This will keep the HTML editor from modifying the code and the video will display. Just don't modify the news item afterwords with the HTML editor or the code will be changed and no longer work.

    1. Ahhhh! Good workaround. I forgot you could actually go in and turn off
      the HTML editor. Thanks for the reminder.

      Still, wouldn't it be nice if the HTML editor would just leave the
      code alone? Sigh.

  3. Your video shows a blank field when you toggle to HMTL, We have a wack of code that I ask people to delete and then paste the Youtube code.
    Yes! I'm glad to see Firefox works.

    1. I have found that, depending on where you access the D2L HTML editor from, what you see in the edit HTML code is different. In some instances, there is no existing code (like with the News widget), and in others you see the HTML head and body tags (as in the content editor).

      If there is a block of code already in the HTML editor, I usually leave it there and paste any new code inside the body html tag.

  4. Thanks for the tip. Yeah, that works – a bit awkward trying to grab *just* the video player. This is really unnecesary and cumbersome, though, especially when an elegant solution is right there in front of our face – the embed code. Plus, I suspect this workaround violates the YouTube terms of use. C. You agree not to access User Submissions (defined below) or YouTube Content through any technology or means other than the video playback pages of the Website itself, the YouTube Embeddable Player, or other explicitly authorized means YouTube may designate.I read that clause to mean you can't do the workaround you describe, unless you ask YouTube explicitly to do that. To which they would probably reply ,"well, why not use the embed code? That's what we put it there for." 🙂

  5. Easy fix. don't insert the html into the topic… just literally highlight and copy the video off the page, and paste it in, in the same manner you'd copy and paste anything else (in WYSIWYG mode). Little known easter egg. You can paste almost ANYTHING into the HTML editor. Just tested it in IE 7 and it works perfectly.

    i.e. take the following steps:
    1. Go to youtube, find your video
    2. highlight the video player (i.e. select/drag over it with your mouse)
    3. hit CTRL-C (to copy)
    4. go to HTML editor in D2L, and go to where you want to put the video in your topic
    5. hit CTRL-V (to paste it)
    6. Save topic… voila! video inserted.

    1. Thanks for the tip. Yeah, that works – a bit awkward trying to grab *just* the video player.

      This is really unnecessary and cumbersome, though, especially when an elegant solution is right there in front of our face – the embed code. Plus, I suspect this workaround violates the YouTube terms of use.

      C. You agree not to access User Submissions (defined below) or YouTube Content through any technology or means other than the video playback pages of the Website itself, the YouTube Embeddable Player, or other explicitly authorized means YouTube may designate.

      I read that clause to mean you can't do the workaround you describe, unless you ask YouTube explicitly to do that. To which they would probably reply ,"well, why not use the embed code? That's what we put it there for." 🙂

  6. Thanks Jesse and Dennis.

    It looks like the problem is with the HTML editor and an HTML sanitizer D2L has in place to strip out invalid code before it gets saved via the HTML editor. That's what I got from D2L. Strange thing is, FireFox doesn't strip the code while IE 7 does, so if it is the sanitizer, then shouldn't it work on the server side and be browser agnostic?

    The workaround is to take nothing bu the code in the <embed> tag and manually strip out the <param> tags. That seems to work. But it makes the process of embedding videos for my faculty, especially those that are not comfortable editing HTML, more cumbersome than it needs to be.

  7. Also is to create html document in the file area with the youtube or other media and use iframe tag in the news item to link the "src" to that html file. It is a work around for any trouble some javascript, media, or flash code you need to run.
    </dennis>

Comments are closed.