Implementing pluggable video/audio players in Moodle

Re: Implementing pluggable video/audio players in Moodle

by Michael Milette -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Take a look at the implementation of the media player in the WET-BOEW framework, developed by the Government of Canada i collaboration with the WET community, which places an emphasis on accessibility and multiple language support.

You can start learning about and viewing the documentation and source code by visiting the WET- BOEW Multimedia Player Working Examples page for the media player at:
https://wet-boew.github.io/v4.0-ci/demos/multimedia/multimedia-en.html

The benefits of this approach includes:

  • WCAG 2.0 Level AA accessibility compliance
  • Support for multiple languages
  • One plugin to support both video and audio
  • Support for 2 video formats: MPEG4 (H264+AAC), WebM (VP8).
  • Support for 2 audio file formats: MP3, Ogg Vorbis.
  • Supported closed captions sources: Timed Text Markup Language (TTML), HTML5 Data file and HTML5 Inline Data. 
  • Support for YouTube: Although you can embed a YouTube video in a page, using this player enables your YouTube videos to match the common look and feel of your site for a consistent UX.

"the multimedia player leverages the native HTML5 video tag and relies on Flash as a fallback mechanism when the HTML5 video tag is not implemented. The MPEG 4 format (H264 codec) is the minimum requirement for video because the Flash fallback relies on it and H264 is the standard video format on many mobile devices. An optional but highly recommended Webm (VP8 codec) should be added as well to allow some browsers such as Firefox that do not include native support for H264 to leverage the native HTML5 performance gains. The multimedia player's timeline relies on the HTML5 progress element and uses a polyfill when the element is not supported."

Open source code is available on GitHub under the MIT license.

I believe it should be possible to do something similar as a Moodle Media plugin.

Hope this helps.

Best regards,

        Michael

In reply to Michael Milette

Re: Implementing pluggable video/audio players in Moodle

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Michael,

Thanks for the link. I did not want to talk about the player choice in this forum post but rather discuss media API.

But speaking about player accessibility, I was recommended able player which works good from accessibility point of view but does not look that great to be honest. Player you linked to has the same problem - it adds a huge controls block under the video which is good for accessibility but unnecessary clutters the interface for majority of users. Videojs looks so much nicer and actually has lots of accessibility points addressed too.

This only proves that point that there is no universal answer which player is the best and we need this media API.

However at the same time I realised that we missed very important point in all previous discussions - should media players be user preference?

We are really close to the code freeze now and I'm afraid I won't have time to add user preferences to the media players before 3.2 release if we want to have media api then.

Also, http://prototype.moodle.net/media/ was updated with the new players (still work in progress).

In reply to Marina Glancy

Re: Implementing pluggable video/audio players in Moodle

by Innocent Sizwe -

Hi Guys

I have a problem, im uploading multiple video files using core_files_upload and core_user_add_user_private_files api.

When i view the files it shows, "The media could not be loaded, either because the server or network failed or because the format is not supported. 

Using version 3.3