AllVideos is an excellent plugin that uses the JW player to display videos in different formats. It’s excellent and it usually works without a hitch. However, if you have been using it for a long time in different environments, you might have seen the following error:
The video could not be loaded, either because the server or network failed or because the format is not supported. [absolute URL to the video the player is trying to load] undefined.
The first time we have seen the above error we have spent literally a whole day trying to solve it – we just didn’t know what the cause of it was, and it was not happening on all machines and it was happening only on FireFox.
We first thought that it might have something to do with FireFox’s version, so we upgraded FireFox to the latest version (which is 21 at the time of writing this post). That didn’t help…
Our second attempt was to update Flash to the latest version – that didn’t help either…
Our third attempt was to read through the code and see how the video was embedded, and we noticed that the new JW Player does not use absolute URLs in its embed code – so we changed that. We opened the file sources.php which is located under the /plugins/content/jw_allvideos/jw_allvideos/includes folder and we ensured that all the URLs in the embed code were absolute. Unfortunately, that didn’t work… (By the way, doing this might solve other issues you’re having on the website – for example when the player is unable to find the video, so what we did was not a complete waste after all!)
We finally did some research, and we discovered that FireFox has issues displaying videos using HTML5. Hmmm…. So, we checked the embed code again, and we saw this:
'modes': [
{ 'type': 'html5'},
{ 'type': 'flash', src: '[URL to the flash player]' },
{ 'type': 'download' }
]
Ahaaaa! As you can see, the first option is to load the video using HTML5 – which is the heart of the problem since FireFox has issues when it comes to loading videos using HTML5. So, in order to solve the problem, we decided to change the sequence of loading; we decided to make the Flash player the primary tool to load the videos. Here’s how we did it:
- We opened the sources.php file located under the /plugins/content/jw_allvideos/jw_allvideos/includes directory.
-
We flipped lines 23 and 24. So, line 23 became line 24, and line 24 became line 23. In other words, we moved the line:
{ 'type': 'html5' },
below the line:
{ 'type': 'flash', src: '{PLUGIN_PATH}/includes/js/mediaplayer/player.swf' },
This step ensured that the browser will first try to load the videos in the Flash container – and, if Flash is nowhere to be found, then it tries to load it using HTML5.
-
We saved the file and we uploaded it back and that fixed the problem! Hooray!
Now, if you have the same problem but are not too technical to fix it using the above technique, then probably your best option would be to contact us; we’ll do it for you at a very competitive rate and in the blink of an eye! (Well, not literally, but we are really fast!)
Hi, I have the same problem but mine is not a Joomla site. Its built on code igniter and in my jwplayer folder, I have jwplayer.flash.swf and jwplayer.html5.js and jwplayer.js
It works fine in chrome but doesn’t load the plugin in firefox and the codes on jwplayer.js has no such lines on 23 and 24.
Please any help would be appreciated
Hi,
Can you email us (through the “Contact Us” form) the page where you’re having the problem?
I had the same problem with Windows 7/Internet Explorer 11. Your solution works perfectly. Thanks!
Hi, I have the same problem that you wrote about, but I use version 4.6.1 of AllVideos and tried your method, but I can’t find the lines 23 and 24(In your case), there aren’t any lines with the text:
‘modes’: [
{ ‘type’: ‘html5’},
{ ‘type’: ‘flash’, src: ‘[URL to the flash player]’ },
{ ‘type’: ‘download’ }
]
I am new with Joomla and AllVideos and need help please.
Hi Marlon,
The latest version of AllVideos (unfortunately), has the above logic in the JS file rather than in the PHP file. I suggest you try finding an older version.