Hello there,
JDownloads is using Flowplayer to display preview files (MP3 or videos), but actually only in Flash form. Does anyone knows a way to switch the Flash display to HTML5 as Flowplayer explicitly suports it ?
I need displaying some MP3 previews on smartphones and tablets, as Flash is not an option anymore for these devices.
Thanks.
PS : https://flowplayer.org
Hi,
yes you have right we must find a solution for this very soon.
Yes Please! :) :) :)
This is a very much needed feature as more and more users want to get away from the security risk flash and mobile devices generally don't support it at all.
A relatively easy solution (if you know a little bit of PHP) is to change the relevant code in each DEFAULT.PHP file of the various views, located in their TMPL subfolders.
But you have to repeat this change each time you upgrade to the latest version of jdownloads.
Example for the 'category' view (which lists all downloads of a certain category):
file 'default.php' in '\components\com_jdownloads\views\category\tmpl' -
Search for this line:
$html_file = str_replace('{mp3_player}', $mp3_player, $html_file);
And insert this line before:
$mp3_player = '<audio><source src="'.$mp3_path.'" type="audio/mpeg"></audio> ';
Of course this only works for audio files. One could add a condition to use the <video> tags instead if it's a video file...
Let me know if anyone needs more detailed instructions.
Hi matthiku,
thanks for your example.
We will change this very fast now. But we should add for this also a special option in configuration.
It seems that in the meantime nearly all current browser versions supported HTML5 video and audio elements.
See here:
http://caniuse.com/#feat=videoand here:
http://caniuse.com/#feat=audioSo i think we need not really a solution with fallback function (to flash).
So i will add only a simple option for use html5 instead flash.
This should be enough, or?
Edit:
We can in the next main version jD 3.3 add the open source HTML5 video player from www.Videojs.com.
Totally agree. No need for a fallback to any flashplayer.
Thanks for all your great efforts with jDownloads!
Any idea when this feature will be available?
I will try to get it ready this week. ;)
I know it is important!
A few snapshots from the new feature... ;)
[gelöscht durch Administrator]
I would have prefer Video.js or MediaElements.js, but this is already a nice evolution !
A Simple question, do the width/height parameters also apply to audio elements ?
QuoteA Simple question, do the width/height parameters also apply to audio elements ?
No. But i have a little problem with the .ogg file format. This can be a video or an audio file.
So i must use it as default as video file (with width/height parameters). Or has anybody another solution?
video.js will come in the next step.
Generally, ogg files come with the .oga extension for audio, and .ogv extension for video. At least that's what i used in the past.
Sad for the width of the audio player, as i need it to be to a very specific size (see file attached)... This is one of the reason why i prefer MediaElements or Video.js.
[gelöscht durch Administrator]
Quote from: Arno on 09.09.2015 13:09:18video.js will come in the next step.
I wonder if MediaElement.js is not a better choice these days ?
http://mediaelementjs.com
QuoteI wonder if MediaElement.js is not a better choice these days ?
Seems that every user has her own favorite script. Everybody tells me another. ::)
I have not enough experiences with this type of scripts. So i can not really compare it.
It should be an open source solution and the configuration should be not to complicated.
And i am not sure that it must have a flash option.
We have in the current release the Flowplayer which is for me a little bit complicated and not really free.
So we must find a better solution with supported also HTML5.
QuoteGenerally, ogg files come with the .oga extension for audio, and .ogv extension for video. At least that's what i used in the past.
Thanks for this info. I have not worked with this format until today.
I wondering why in all examples is used the .ogg file extension (for video AND audio elements)? ::)
QuoteSad for the width of the audio player, as i need it to be to a very specific size (see file attached)..
Okay. We can use also a param for the width from the audio player.
[gelöscht durch Administrator]
Perfect for me, excellent work Arno !
As for the choice of the JS player, yes i understand it's not easy to choose. Here is a simple and recent comparison chart that may help you : http://praegnanz.de/html5video/
Note that Video.js is not that great for a basic audio player, it's really video centric.
Hm... i test in the moment the video.js script. It seems to be very simple and easy to use. Maybe i should directly use a solution like this. I will reconsider this tonight. :)
MediaElement.js seems to be more complicated (on the first look).
Video.js doesn't use JQuery, which might be an advantage for sure. But for audio, even with the latest release (>4.9, <audio> canvas support), it has to display a "picture" of the size of a potential video, generally the "jacket" (not sure of the english word, sorry).
MediaElement has much better support for audio, and can just display a simple "bar", as usual.
Your choice Arno ;-) .
Please other users, let us know what you think about this !
Hi
This might be a bit of a simplistic view but why not have two sets! One that is very good for Audio only files and the other that works well for Video. ;D
Flow player managed to do both quite well but it used Flash so not good now. There is nothing that says there should be a "catch all".
jD uses imagemagic for graphics, no one expects it to support audio, video and ....
And it always strikes me that trying to do all things can lead to compromises!
It is also probably simpler for users to understand the setup if they are separate. As far as I am concerned Audio and Video are different animals; it just happens that video has an audio facility that is married to the video. I am sure that Dode can recommend an excellent audio only package.
We should not let one facility compromise another one.
Colin
FlowPlayer is kindda commercial now, so it seems out of the equation.
Maybe separating audio and video displaying is the solution (i love SoundManager2 for audio http://www.schillmania.com/projects/soundmanager2/), but it will get things complicated, no ? MediaElement.js seems to me the simpliest solution for JDownloads : single setup, to rule them all.
Arno is right, it must be simple and cover most usages.
I would love to see other users opinion.