Preventing multimedia plugins from jumping in in some cases (by classname for example)

Preventing multimedia plugins from jumping in in some cases (by classname for example)

by Alexander Lebeth -
Number of replies: 3

I wrote a custom script to alter links to particular mp3 files into HTML5 <audio> tags with certain IDs. Since i have multimedia plugin enabled (and want it to be enabled!), the plugin jumps in and alters the links by it's own; altering the weight of the filter on the filters overview page is no solution because even when my custom script is executed before all others, the new <audio> tags get altered once again by the plugin.

So how can i prevent the plugin from jumping in in some cases? Can i add a certain classname to the <audio> tag to stop the filter plugin?

What's the proper moodle-way to do this?


Average of ratings: -
In reply to Alexander Lebeth

Re: Preventing multimedia plugins from jumping in in some cases (by classname for example)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Alexander,

It would help to know which version of Moodle, but in general on the newer versions, you can edit the Filter settings for just about any individual Moodle item or activity. So in this case, in the Administration block for your 'activity' go turn off any multimedia filters you do not want to have access to what you've created. The multimedia filters will still be available and work as usual for the rest of your Moodle site.

In reply to AL Rachels

Re: Preventing multimedia plugins from jumping in in some cases (by classname for example)

by Alexander Lebeth -

Dear Al Rachels,


i am using Moodle 2.9.1 and i know the feature you mentioned. What i am looking for is different from your suggestion: i need the multimediaplugins enabled in all my courses and all activites, but i want some manually selected <audio> elements not being processed by the multimedia plugins. So i thought, there may be a convention how to prevent a tag from not being processed, like <audio class="do_not_process_by_plugin_x"> or something similar.

In reply to Alexander Lebeth

Re: Preventing multimedia plugins from jumping in in some cases (by classname for example)

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Sorry, I don't know of anything like that.