Supporting the Moodle Mobile App

Supporting the Moodle Mobile App

The Moodle Mobile App(MMA) can display the content of your courses, and some of the activities such as pages, forums and quizzes. When the PoodLL filter delivers an audio or a video player, or a widget for a regular page it will often include javascript and CSS as well as html. Now a lot of the time this won’t work on the MMA. Why?

MMA and Filters.

The way PoodLL and most filters work, is to return the html to Moodle to display, and to add the CSS and Javascript to the global PAGE object. The PAGE object is a programming thingy which knows how and when to load those things (in the header and footer).

Many players just require a placeholder as html, and then later do the full set up of the player in the placeholder using javascript from the page footer. Flowplayer works like this and so does JW Player.

However that won’t work when delivered to the MMA. The MMA doesn’t know anything about PAGE and headers and footers. It will just expect (and just get) the html part.

bits of page

So in the case of Flowplayer and Audio JS Player on the MMA, the placeholder will be returned. But the player will never get set up. (Other players like Video JS add basic HTML5 video tags as html and use javascript to style them later. So if you are using Video JS, it might work on MMA.)

PoodLL (and Video Easy and Generico) to the Rescue

Here at PoodLL we have a solution for this tricky situation. We added “alternate content” fields to each template. This is where we put content to be returned to the MMA. In the Flowplayer and other player templates  we have added basic HTML5 video tags in the alternate content area. So when accessed through a browser you will see a flowplayer, when accessed via the MMA you will see a simple HTML5 video player.

This page on the PoodLL demo site illustrates this:

On the MMA it looks like this:

from MMA

From a desktop browser it looks like this:

desktop players