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.  Students have more restricted options and should see Add Media to Moodle for Students.
 
Copyright reminder: Instructors can share as much original material as they choose (such as recordings of lectures). For content that is copyright-protected, fair use guidelines apply. For more information please read Copyright & Fair Use at UMass Amherst
 
Keep in mind that media posted by others on sharing sites such as YouTube, Vimeo, and SlideShare may be taken down without warning. 

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.
  • Video and presentations
    In most cases we recommend embedding video or embedable 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. Instead embed video in a Page resource or activity Description.
    • 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

  • URL Resource
    In some situations, video cannot be embedded directly on a Moodle page (for example, video hosted on the UMass Libraries eReserves streaming server, or on screencast.com). In this case you can link to the video using a URL resource on the course page. Alternately, 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
    You may also simply choose to post media as a File resource. In this case students will see a link to the resource, then, 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 download. See Add a File to a Moodle Course.

Post a Screencast as a Web Page

Embed Video Hosted Outside Moodle (using Media button)

The easiest way to embed video 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 YouTube, Vimeo, Ted Talks, SlideShare, Issue, SoundCloud, Office 365 Video, Office Mix, or Sway.

For files hosted on a remote drive such as Box, recommended file types include MP4, 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. 
Note: AVI and MOV files are not recommended because file sizes are typically very large. For help converting media files, instructors can contact the Instructional Media Lab.

  1. Get the URL for the video:
    • 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 address from your browser's location bar.
      Note: Do not copy  "embed" code, if provided.
    • Box: Locate the video file in the list of files in Box.  Click Share (at right). From the pop-up that opens, click Direct Link and copy the Direct Link URL. For Who can access: choose People with the link. 
  2. In your Moodle course, click Turn editing on, and Add or Edit the activity or resource where you will embed the media.
  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.
    Click the Media button to insert video or audio
  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.
    This method does not provide easy control the dimensions the video appears. Videos are embedded by default at 300 x 400 pixels (easily viewed on a mobile device) but can be expanded to full-screen.
  7. Click Save and display or Update (depending on the activity type).
  8. Open the Activity or Resource and ensure that 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 limit: The maximum file size that can be uploaded to Moodle is 100 MB. You can break large videos into smaller clips, or better yet, store large video files outside of Moodle (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. For help converting media files, instructors can contact the Instructional Media LabNote: For security reasons, in Forum, Wiki, Database or Glossary activities, SWF files (Flash movies) 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.
  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)

Embed Media Using <iframe> Code (Instructors Only)

Instructors can use iframe 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:

  • IFrame code is not allowed in Moodle activities to which all class members can contribute, including Assignment submissions, Wiki, Forum, Database and Glossary activities. In these activities iframe-embedded video displays in the HTML editor, but will be stripped out when posts or submissions are saved.
  • For security reasons, embedding using the <object> HTML tag is no longer allowed in Moodle and will be stripped out when changes are saved.

Part One: Copy the iframe 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 code beginning with "<iframe ...". You may also find options to customize the size, auto-play, or loop the video embedded on your course page.
    Note: Embed code beginning with "<object..." , provided by some sites such as screencast.com and flickr.com, will not work in Moodle.
    YouTube Embed Code  (Click to enlarge)
    Note: Video stored on Apps at UMass Amherst or Box can be embedded using the provided iframe code.
    In Google Drive the Embed code is hard to find: After opening the video in Drive, click the Pop-out button (at top right) (click to open videoin a pop-out). Once the pop-out is open the Embed code is found in the More menu (click More actions to get Embed code).
    In both Google Drive and Box, you must set Sharing settings for the file. Set the file visibility to Anyone with the link/People with the link, or for added protection and some degree of Fair Use compliance, you can set the file to be visible only to People at UMass Amherst/People in your company.
  3. Right-click on the highlighted iframe code and select Copy.

Part Two: Paste the iframe 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 and borders of the editor box will be highlighted blue.

  3. Right-click in the HTML Source Editor window and select Paste. The code that you copied from the media sharing site should appear in the pop-up window.

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

  5. Add additional content to your entry (as needed), then scroll to the bottom of the page and click Save and display, Save and return to course or Update (depending on the activity type).

  6. Open the Activity or Resource and ensure that the media plays correctly.