General developer forum

Custom media filter not displaying player - why?!

This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Caroline Moore
Custom media filter not displaying player - why?!

I'm writing a filter that will grab specific types of media URLs and turn them into JWplayers. I have a test page outside of Moodle with an embedded JWplayer that works beautifully. However, when my filter generates the exact same code inside of a Moodle page, it displays nothing. (The page source, however, shows identical code to that on my test page.) 

I'm using the cloud-hosted player, in case that matters, but I've also tried a Moodle JWplayer plugin that uses a local player, and that didn't work either (said "loading," but didn't generate any player code).

I feel like I'm missing some obvious reason why the JWplayer would not be displaying inside of Moodle. Does anyone have any ideas about why this is happening? 



Average of ratings: -
Picture of Justin Hunt
Re: Custom media filter not displaying player - why?!
Group Particularly helpful MoodlersGroup Plugin developers


I used to bundle the JW Player along with the PoodLL filter and had it working then. I removed JW player but left the code in place. That was so if someone did want to use it, they still could. But I have not checked it for a while now. You might try though.

I think you would really need to post a little code so that we have something to go on to help here.

I think the most likely cause of problems is the javascript loading. If you are trying to do it the moodle way, your javascript functions will be deferred until the page has loaded, and then called. That usually works pretty well. Possibly your javascript functions to load the player are not being called at all, or are being called too early.

Is there any output in the browsers javascript console that might shed light on it? Can you check from the console if the javascript helper files for jwplayer are actually being loaded?

Average of ratings: -
Matt Bury
Re: Custom media filter not displaying player - why?!
Group Plugin developers

Hi Caroline,

As Justin mentioned, we'd be able to help more if you posted your code. What Flash embed method are you using? Just object tags or JS, e.g. SWFObject or UFO? Static or dynamic?

Average of ratings: -