Embedding videos from Moodle in MediaWiki

Embedding videos from Moodle in MediaWiki

by Rian Stockbower -
Number of replies: 2

We produce videos using Camtasia, and our method of posting them is as follows:

  1. Zip the entire directory associated with the produced content
  2. Add a resource of type File
  3. Enter a name
  4. Enter a description
  5. Upload the zip file
  6. Unzip the package
  7. Set the [foo]_player.html as the main file
  8. We then display this file in a popup with specific dimensions

The popup's URL looks something like this:

example.com/moodle/pluginfile.php/1175/mod_resource/content/5/<filename>_player.html

We would like to be able to embed these videos in MediaWiki, and we have an extension that allows us to do that. This wouldn't be very difficult, except for the numbers in the URL: they don't have a rhyme or reason associated with them.

  • 1175 is the context id
  • 5 is something else (don't know that it has a name, but if you snip it off, it 404s)

In a perfect world, there would be a generic, unchanging GUID that I could use a pointer to this resource. Does such a thing exist?

(In the meantime, I know I can just have the user specify the two numbers when I extend the MW extension, but that's really pretty ugly, as these numbers have no semantic meaning to the person embedding the video.)

This is Moodle 2.4.3

Average of ratings: -
In reply to Rian Stockbower

Re: Embedding videos from Moodle in MediaWiki

by Rian Stockbower -

Something I forgot: the _player.html file is an abstraction layer around an MP4 file, that'll do the right thing when you view a video based on your device's capabilities. (I.e. fall back to flash if necessary, otherwise it'll use your device's built-in decoding capabilities.)

In reply to Rian Stockbower

Re: Embedding videos from Moodle in MediaWiki

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Rian

I think that is just how it is really. If I were doing it I would just have the MW extension user paste in the whole URL rather than fish around with the numbers. 

It would be possible to make a "pretty links" kind of plugin for Moodle, that would mask all of that.  That'd be pretty cool. But I guess thats overkill for the current task.