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 view demonstrations of the 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 websites 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 videos directly on your main course page (e.g., 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 download 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. Depending on the file type and 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

  • If you have recorded a screencast that you have published as a folder of files rather than a single video file, see Upload a Screencast to Moodle.

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, or Sway.

  1. Get the URL for the video from a supported service (Vimeo, YouTube, Ted Talks, SlideShare, Issue, SoundCloud, Office 365 Video, 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 (green pencil icon Turn editing on (green pencil icon), top right), the edit links will appear. Add or Edit the activity or resource where the embedded media will appear.
  3. Click on the HTML editor entry box where you want the video to appear.
  4. In the Editor toolbar, click the Media button (Media Button Icon). The Insert media pop-up will open. 
    Media button in the Editor Tool bar
  5. In the Insert media pop-up:
    - For Enter URL, select the Link tab and paste the address you copied in Step 1.
    - For Enter Name, enter a title for the video. Naming the video will also make your content more accessible to students who are listening to your webpage using screen reader software.
  6. Click Insert media. The pop-up will close and you will be returned to the Moodle 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 its 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. By default, a video appears at 300 x 400 pixels to make the video "responsive" so that the video resizes to fit the available space on any device. In the text entry box, highlight the link you just added, then in the Editor toolbar, click the Style button (ink drop icon in the middle of the toolbar) and select </> Responsive video.
    Responsive Video Menu in the drop-down menu
    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). For details to change the upload limit, please see Important Settings for your Moodle Course. If students are submitting videos, 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 (e.g., YouTube or Vimeo, see Embed Media Hosted Outside Moodle above).

File types: Recommended file types include MP4 (recommended), M4VMP3, OGG. Other file types may not display embedded, in which case students will still see a link to the file that 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 at 413-545-2823 or instruct@umass.edu

  1. In your Moodle course, click Turn editing on (green pencil icon Turn editing on (green pencil icon), top right), the edit links will appear. Add or Edit the activity or resource where the embedded media will appear.
  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 Icon). The Insert media pop-up window will open.
  4. Click Browse Repositories. The File picker will open.
  5. Click Upload a file Choose 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 media. The dialog box will close and the file will appear as a hyperlink. Do not worry if you do not 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 a 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 display bar image
    • Video should display in a media player as seen below:
      Video display image  

 

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, the 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.

  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.
    Embed Video with Embed text-box  (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 (green pencil icon Turn editing on (green pencil icon), top right), and the edit links will appear. 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 on the HTML Source Editor window and select Paste.HTML Source Editor in the text box

  4. Click the HTML button again. The video should preview in the HTML editor
    Note:  The video will embed at the width and height specified in the video player from the host site. The <responsive> style described above for media hosted outside of Moodle does not work for media embeded using embed code.

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

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

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