Search Google Appliance

Information Technology

Embed Video or Audio on a Moodle Page

Audio and visual media can be very powerful tools in a Moodle course. Students can view material from the web, catch up on lectures they have missed, and see demonstrations of content discussed in class. 
 
This page covers methods instructors and course designers can use to post media in Moodle.  
Copyright reminder: There are no restrictions on sharing original material (e.g., recordings of your own lectures, or your own video content). For content that is copyright-protected, fair use guidelines apply. Please also consider that media posted by others on sharing sites such as YouTube, Vimeo, and SlideShare may be taken down without warning. For more information please read Copyright & Fair Use at UMass Amherst.

Ways to Share Media in Moodle

Embed Media

When media is embedded, a media player appears directly on the page allowing students to view or listen without leaving the page.

  • Audio
    To embed audio clips directly on your course page, insert the audio in a Label. The audio player takes up minimal page area and will fit nicely in your list of activities within a course Section. Audio can also be embedded in a Page, Forum post, Activity description, or anywhere you see the Moodle HTML Editor.
  • Video and presentations
    In most cases we recommend embedding video or embeddable presentations on a Page resource, or in the Description for an Activity such as an Assignment or Forum. This allows you to add text next to the media, such as guidelines for responses to an Assignment, or context about a video added to a Forum post.
    • We do not recommend embedding video directly on your main course page (for example, using a Label or in a Section summary); doing so can take up valuable page space and will slow down the page load time.
    • We do not recommend embedding more than one video on a page: Because videos pre-load as soon as a page opens, if more than one or two videos are present it will significantly slow down load time.

Link to Media

In some situations, video cannot be embedded directly on a Moodle page (e.g, video hosted on the UMass Libraries eReserves streaming server, or on screencast.com), or you may simply wish to use a link instead of displaying embedded media.

  • URL Resource or Text Link
    To create a text-based link to media you can add a URL Resource to your course page, or anywhere you see an HTML Editor in Moodle, you can create a link to the Web page where the video is hosted. See Link to a Web Page from a Moodle Course.
  • File Resource
    Post media as a File Resource on your course page and, depending on the file type, the media player available in the student's browser, the media will open and play on a new page in Moodle, or the file will download for them to play. See Add a File to a Moodle Course.

Post a Screencast as a Web Page

Embed Media Hosted Outside Moodle (using Media button)

The preferred way to embed media hosted outside of Moodle is to use the Media button in Moodle's HTML editor. Moodle will automatically display the video in a media player. This method can be used for media hosted on Vimeo, YouTube, Ted Talks, SlideShare, Issue, SoundCloud, Office 365 Video, Office Mix, or Sway.

  1. Get the URL for the video from a supported service (Vimeo, YouTube, Ted Talks, SlideShare, Issue, SoundCloud, Office 365 Video, Office Mix, or Sway):
    • Go to the page on the website where the media is hosted and copy the URL from your browser's location bar.
      Note: Do not copy  "embed" code, if provided.
  2. In your Moodle course, click Turn editing on, and Add/Edit the activity or resource where the embedded media will appear.
  3. Click in the Moodle Editor entry box where you want the video to appear.
  4. In the Editor toolbar, click the Media button (media button). The Insert media pop-up will open.
    15th button: is Insert Media.
  5. In the Insert media pop-up:
    - For Enter URL, paste the address you copied in step 1.
    - Important! For Enter Name, enter a title for the video. The media will not appear unless you complete this step.
    (Naming the video will also make your content more accessible to students who are listening to your Web page using screen reader software).
  6. Click Insert media. The pop-up will close and you will be returned to the HTML editor.
    Note: The embedded video will not display in the HTML Editor—you will see only a link, but after you save, the video will display embedded in your activity or resource.
  7. Important! The link to the media URL must be on it's own line for the embed to work.On your keyboard, press Enter/Return to create a new paragraph.
  8. Add additional content to your entry (as needed).
  9. To make video resize to fit the available space on any device (by default video appears at 300 x 400 pixels; this step makes video "responsive"):
    In the text entry box, highlight the link you just added, then in the Editor toolbar, click the Style button (paintbrush icon to the right of the insert media button) and select </> Responsive video.
    16th button: Style > Responive video
    Important! This step must be the last thing you do on a page.  If additional content will appear on the page, add additional content before completing this step.
  10. Click Save and display or Update (depending on the activity type).
  11. Open the Activity or Resource to make sure the media plays correctly.

Upload a Video or Audio File to Moodle

You can upload a media file to Moodle and insert embedded media wherever you see an HTML editor toolbar, including Activity Descriptions, Forum posts, Assignment submissions, Database, Wiki or Glossary entries, Page or Label resources, etc.

Upload limits: The default upload limit in a Moodle course is 50 MB. You can increase the course limit to 800 MB in your course Settings, however, the maximum upload limit for student submissions varies for different activities (e.g.,  50 MB for Assignment activities).  If students are submitting video, you should have them host the files offsite. We also recommend instructors break large videos into smaller clips, or better yet, share large video files outside of Moodle, for example on YouTube or Vimeo (see above).

File types: Recommended file types include MP4 (recommended), M4V, SWF, MP3, OGG. Other file types may not display embedded, in which case students will still see a link to the file which they can download but may need to install a player to view.  AVI and MOV files are not recommended because file sizes are typically very large and not all computers or devices can play them. For help converting media files, instructors can contact the Instructional Media Lab. Note: For security reasons, in Forum, Wiki, Database or Glossary activities, SWF files will not be embedded and will display only as a link.

  1. In your Moodle course, click Turn editing on, and Add or Edit the activity or resource where you will embed media.
  2. In the HTML Editor content box, click where you want to embed the video or audio file.
  3. In the HTML Editor toolbar click Insert Moodle media (media button). The Insert media pop-up window will open.
  4. Click Browse Repositories. The File picker will open.
  5. Click Upload a file to browse for the file on your computer, or Google Drive to copy the file from your Google Drive account, then click Upload this file. The File picker window will close. You should see the file name listed in the Insert media pop-up.
  6. Click Insert. The dialog box will close and the file will appear as a hyperlink. Do not worry if you don't see a preview of the media, the player will show on the saved Moodle page, but will not preview in the HTML editor.
    Note: The "</> Responsive style" described above for videos embedded from off-site, does not work for video uploaded to Moodle.
  7. Scroll to the bottom of the page and click Save and display, Save and return to course, or Update (depending on the activity type).
  8. Open the Activity or Resource and ensure that the media plays correctly.
    • Audio should display a media play bar:
      Audio playbar
    • Video should display in a media player as seen below:
      Embedded video file  (Click to enlarge)
       

Note: The <responsive> style described above for media hosted  outside of Moodle does not work for media uploaded to Moodle.

Embed Media Using "Embed Code" (Instructors Only)

Instructors can use embed code found on YouTube, Vimeo, Google Drive or other sharing sites to embed media in most Moodle activity types. Compared to the methods described above, embed code can provide additional control over the video display (e.g., dimensions, looping, auto-play, etc,.).

Note:

  • Embedding from Apps at UMass Amherst, google.com and box.com are not recommended: Video quality suffers significantly from compression, display size is difficult to control, and most importantly, the services choke bandwidth after a certain amount of downloads per day, which can unfairly impact students, especially in large classes.
  • Students are prevented from adding embed code in Moodle. Media inserted using embed code by a student will display in the HTML editor preview, but will be stripped out when posts or submissions are saved. Please refer your students to Add Media to Moodle for Students.
  • IFrame or javaScript code is not allowed in Moodle activities to which all class members can contribute. This includes Assignment submissions, Wiki, Forum, Database and Glossary activities. Media inserted using embed code will display in the HTML editor preview, but will be stripped out when posts or submissions are saved.
  • The <object> HTML tag is not allowed in Moodle for security reasons and will be stripped out when changes are saved.

Part One: Copy the embed code from the sharing website.

  1. Go to the media sharing site and open the video page in your browser.

  2. On the video page, look for (and click on) a link to Share the video. Click Embed (if needed) to find an Embed text-box containing HTML. You may also find options to customize the size, auto-play, or loop the video embedded on your course page.
    Note: Code beginning with "<iframe ..." or including code for loading JavaScript "<script..." should work.  Code beginning with "<object..." ,  will not work in Moodle.
    The embed code available in Vimeo  (Click to enlarge)
  3. Right-click on the highlighted embed code and select Copy.

Part Two: Paste the embed code into your course.

  1. In your Moodle course, click Turn editing on, and Add or Update the activity or resource where you will embed the video.

  2. In the HTML editor toolbar click the HTML button ( HTML button ). The HTML button will be shaded gray and the HTML Editor will change to display the source code view.

  3. Right-click in the HTML Source Editor window and select Paste.
    Make sure your Editor is in HTML mode (last toolbar button)

  4. Click the HTML button again. The video should preview in the HTML Editor

  5. Add additional content to your entry (as needed).

  6. To make video resize to fit the available space on any device (by default video appears at 300 x 400 pixels; this step makes video "responsive"):
    In the text entry box, highlight the embedded media you just added, then in the Editor toolbar, click the Style button (paintbrush icon to the right of the insert media button) and select </> Responsive video.
    16th button: Style > Responive video
    Important! This step must be the last thing you do on a page.  If additional content will appear on the page, add additional content before completing this step.

  7. Scroll to the bottom of the page and click Save and display, Save and return to course or Update (depending on the activity type).

  8. Open the Activity or Resource and make sure that the media plays correctly.