The Flash MP3 player again

The Flash MP3 player again

by Josep M. Fontana -
Number of replies: 8
Hi,

I was having problems (yet one more time) getting one of the Flash MP3 players (mp3player.swf) with Hot Potatoes and I checked this forum to see if I could find some relevant information. I came across a message where Gordon made reference to the use of square brackets to call the Flash player and the MP3 file without having to introduce the <object> labels.

Is this supposed to work in current versions of Moodle? I tried it with the hbs player and I wasn't able to get it to work. When I did it, the brackets and the contents within the brackets showed up in the HP exercise, not the player.
Average of ratings: -
In reply to Josep M. Fontana

Re: The Flash MP3 player again

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Joseph,
I afraid to say that the square brackets notation does not work with the HotPot module.

The square brackets notation only works with QuizPort, which is not yet part of standard Moodle, but hopefully it will take over from HotPot in Moodle 2.0.

In the meantime, QuizPort works well with Moodle 1.6 - 1.9 as a non-standard module, so please feel free to download it and try it out.

One of the many things that QuizPort does better than the HotPot module, is that it let's you insert media players using just a file name in square brackets. For example, if the media file is an mp3 file in the same folder as the quiz folder, you could use any of the following to insert a media player:
  • [mysound.mp3]
    inserts the standard Moodle player

  • [mysound.mp3 hbs]
    inserts the HBS player, which I think is the one you were interested in :=)

  • [mysound.mp3 pyg center]
    inserts the PYG player centered on a new line

  • [mysound.mp3 dyer width=200]
    inserts the Bernard Dyer player, which is a variant of the HBS player, and notice that the width or any other parameter can be passed to the player within the square brackets
If you would like help inserting a media player using the HotPot module, please could you upload the quiz and the player to my server:
hope that is clear smile
Gordon

In reply to Gordon Bateson

Re: The Flash MP3 player again

by Josep M. Fontana -
Hi Gordon,

First of all I'd like to apologize for taking so long in acknowledging and thanking you for your response.

I posted my message because of an emergency at a very busy moment in our quarter. I managed to solve the problem by linking directly to the Moodle Flash video player but I completely forgot to respond the message and thank you. Sorry about that.

Now that things have calmed down a little bit I can devote a little time to this subject. This is good news. I had not been following the Moodle forums for quite a while and I didn't know that you had developed what looks like a completely new module. I will have a look at it as soon as I can.

The problem is that now that we have Moodle as the official LMS in our university most of my colleagues won't be able to use your new module for a long time since the IT people are very reluctant to install non-standard modules.

Although I have my courses on a different Moodle installed on a different server and hence I will be able to take advantage of your new module, I like to help my colleagues to solve their problems in the official Moodle as they cannot always find the support they need. So here's my question. With HotPot module is it possible to use some Flash player other than the one that comes with Moodle? As I said, I found a way to make it work by adding the following code:

<object type="application/x-shockwave-flash" width="300" height="250" data="/whatever_your_Moodle_is/filter/mediaplugin/flvplayer.swf?file=savingenergy.flv&autoStart=false">

For some colleagues, this creates problems because they have old Hot Potatoes exercises that they have used in other Moodle installations and they are intimidated by the code. They'd like a system where they would simply have to unzip a folder with all the necessary files and simply link to the Hot Potatoe file when creating the activity.

Is this possible at all? I mean, can one use some player other than the one living in the Moodle /mediaplugin folder?


In reply to Josep M. Fontana

Re: The Flash MP3 player again

by Glenys Hanson -
Hello Josep,

I've used several other Flash players with Hot Potatoes on Moodle. The one I use at the moment is Dewplayer

You just have to answer No to Force media plugins and the player you've used to make the exercise will be used instead of the one in Moodle.

You can see an example here : Jeanne's Introduction: Find the mistakes and there's a tutorial with it - in French but with a lot of screenshots so it should be clear. The course is open to guests.

Cheers,
Glenys



Average of ratings: Useful (1)
In reply to Glenys Hanson

Re: The Flash MP3 player again

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Josep,
Glenys' advice seems right on the mark to me. You can use any player you like if you set "Force media plugins" to "No".

If you need further help on getting a particular player to work in a particular HotPot please upload them both to my server so I can have a detailed look.


> I didn't know that you had developed
> what looks like a completely new module

It may be more helpful for you to think of it as the next generation of the HotPot module. It does everything the HotPot module does yet it is more efficient, flexible and robust, and furthermore it has a lot of functionality and potential that the HotPot module does not have. Most importantly, it does all this in a sustainable way, that is to say it is compliant with the programming standards of Moodle 2.0 and can probably support itself financially into the future while at the same time continuing to have an open source core.

You are welcome to download the QuizPort module and experiment with it:
Or you can use the access information for my server (see above) and try out the QuizPort module there.

all the best
Gordon
In reply to Gordon Bateson

Re: The Flash MP3 player again

by Josep M. Fontana -
Thanks Glenys and Gordon for your help.

I haven't tried the player Glenys recommends yet. But I uploaded all the files I used in my failed HP video quiz to Gordon's Moodle test site. As you will see, all the files involved (the HP quiz, the player and the .flv file) are in the same folder and the "Force media plugins" is set to "No". It still doesn't work.

I checked the code to see whether there was anything that was out of place and everything seems (to my inexpert eye) to be all right.
In reply to Josep M. Fontana

Re: The Flash MP3 player again

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Josep,

I am afraid that player doesn't seem to work with urls that go via Moodle's file.php. As a result it doesn't work either when run from the Files area of a Moodle course, or via the HotPot module.

As a workaround, you need to use an absolute URL that does not go via file.php. You could put the player outside of Moodle, e.g. http://mywebsite.com/flvplayer.swf. Alternatively, you could use the url of the flv player that is included in Moodle, e.g. http://mywebsite.com/moodle/filter/mediaplugin/flvplayer.swf. Whichever one you choose, you then need to replace all occurrences of that player in the quizzes with the absolute url.

The is also a workaround which will force the HotPot module to insert the standard Moodle flv player, and that is to replace all occurrences of the "flvplayer.swf" with "flvplayer.xxx". This will make the HotPot module ignore the url for the player and instead pick up the url of the flv file and insert the standard Moodle player for that.

For a similar reason, you could replace all your players with something like the following:
  • <object ><a href="myvideo.flv">any text</a></object>
The space after in the opening <object > tag is required.

Any of these workarounds require that you set the "Force media plugins" to "Yes".

Finally, you may decide to forget about flvplayer.swf and use the FlowPlayer that Glenys suggested. Here is the code if you want to use that:
  • <object type="application/x-shockwave-flash" data="FlowPlayer.swf" width="320" height="280" id="FlowPlayer">
    <param name="movie" value="FlowPlayer.swf" />
    <param name="autoPlay" value="false" />
    <param name="quality" value="high" />
    <param name="scale" value="noScale" />
    <param name="wmode" value="transparent" />
    <param name="flashvars" value="config={videoFile: 'myvideo.flv'}" />
    </object>
all the best
Gordon
In reply to Josep M. Fontana

Re: The Flash MP3 player again

by Jan Joost de Vries -
Hi,

I am trying to figure out how to get a hot potato activity working. I use moogle vers. 1.9 and the hot potatoes module. The sound file is a flash swf and appears on screen when the hot potato is loaded. But it doesn't work, no sound when I press the play button... Is this problem related to your problem or am I forgetting something / doing something wrong here?

Thanks Joost


In reply to Jan Joost de Vries

Re: The Flash MP3 player again

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Joost,

First try getting the player and media to display in the quiz's html file on your own PC - outside of Moodle. Once it is working there, upload the html file, swf file and player to the Files area of your Moodle course, and check everything still works if you click on the link for the html file. If so, you are ready to add the file as a HotPot.

all the best
Gordon