UFo to SWFObject

UFo to SWFObject

by Stan Bogdanov -
Number of replies: 1

Hi Gordon,

Facts and justification for migration to SWFObject.

So far Moodle up to v1.9 has used ufo javascript for the media plugins to embed flash content through JW's mediaplayer. (There are other Moodle plugins which use the JW mediaplayer too)

ufo and swfobject 'married' and gave swffix, later renamed back to SWFObject2 to offer the ultimate and best embedding of flash content.

JW mediaplayer uses SWFObject to dynamically embed flv.

JW mediaplayer can 'do' mp3, mp4, swf, images, flv and other video formats, xml playlists;html5 support, skins, colours, and basically it's the best out there.

If HotPot is to live in the core of Moodle 2, and Moodle 2 is to implement SWFObject 2 for the media plugins, then HotPot can use SWFObject too, eliminating redundancy and complying with the latest and best in the dev.

Currently, on my Moodle 1.9, If I have SWFObject2.2.js in a hotpotatoes exercises via QuizPort or HotPot, I also get the ufo.js. Consequently, both scripts start fighting which one to display the flash and I end up with no player.

if the above is to happen after a migration, there'll be swfobject.js referenced twice resulting in duplication but giving no error and still displaying the flash content.

I solve my problem currently by using neither HotPot nor Quizport but display a simple 'Resource'. Or I use the squarebrackets notation and trick them into using my JW mediaplayer, asuming its dewplayer or another one, but getting only the basic JW mediaplayer.

If you decide to migrate from ufo to swfobject, you can use the core Moodle URL re-write routines; and you can include JW mediaplayer in the square bracket notation.

(I believe someone will get down to writing the Help/Documentation for the squarebrackets notation for new users.)

We can also improve the square brackets notation to include background colours and other enhancements for the JW mediaplayer.

What do you think?

Stan

Average of ratings: -
In reply to Stan Bogdanov

Re: UFo to SWFObject

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Stan,

thanks for the extra info. The HotPot module uses the standard Moodle player embedding method, which is currently UFO. IT may change to SWFObject at some point, but I don't have much influence on that decision.

In the meantime though, we can certainly add a new HotPot mediaplugin filter so that people can specify via the square bracket notation that they want to use the SWFObject. Something like this:

  • [myaudio.mp3 moodle swfobject=true]

I will add it to my todo list.

thakns
Gordon