News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

MP4 preview does not working

Started by webgobe, 11.11.2016 19:25:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

webgobe

Hi!

I have set up the latest version on latest Joomla.
I need to offer downloads of mp4 video files with downloads. Everything works, but  the preview. I can easily add the new files with any supported methods (uploading via component, FTP in, etc) and the files are downloadable, etc, but the video preview function fails.

I have sh404SEF - tought that is the potential culprit, taked down first the support for jDownloads only, then the sh404 entirely, then kikced off the core Joomla SEF support too, the error is  still around.
I can give you superadmin access if you want to examine, any help and/or clues are very appreciated!!





Thos screenshoot is done with Firefox, but is not the browser, i tested it with other browsers too. http://nimb.ws/Sm8oC5
  •  

ColinM

#1
Hi
There are a couple of points here.  At the moment if you load an MP4 or similar video file as a download then there is no preview created automatically.  That is you actually need to upload it as a preview as well. And yes this is a future change! But we are where we are!   
As from v46, if the downloadable file is a media file and no preview file is specified then the downloadable file will be also used as the preview.The reasoning is that the preview was aimed at being a 'clip' of the main Download.

And if uploading from the frontend make sure the relevant User Groups can upload that preview file type field "Allowed Preview File Types" in UG settings Group Creation/Editing Settings.

Colin
Colin M
  •  

webgobe

Hmm, I might not be very clear there:
what I try to accomplish to actually let the MP4 files play. Don't need a separate preview file to be generated/used, I have some small clips wich should be viewable before they are downloaded.
the actual code the component outputs is this (using flowplayer there, but same happens with HTML5 one too):
<a href="/jdownloads/promo-videos/VibrantGeneralFemalePromo.mp4" style="display:block;width:300px;height:200px;" class="player" id="player3"><object id="player3_api" name="player3_api" data="https://www.theaxesgroup.com/components/com_jdownloads/assets/flowplayer/flowplayer-3.2.16.swf" type="application/x-shockwave-flash" width="100%" height="100%"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="quality" value="high"><param name="bgcolor" value="#000000"><param name="flashvars" value="config={&quot;plugins&quot;:{&quot;controls&quot;:{&quot;fullscreen&quot;:true,&quot;height&quot;:30,&quot;autoHide&quot;:true}},&quot;clip&quot;:{&quot;autoPlay&quot;:false,&quot;url&quot;:&quot;/jdownloads/promo-videos/VibrantGeneralFemalePromo.mp4&quot;},&quot;playerId&quot;:&quot;player3&quot;,&quot;playlist&quot;:[{&quot;autoPlay&quot;:false,&quot;url&quot;:&quot;/jdownloads/promo-videos/VibrantGeneralFemalePromo.mp4&quot;}]}"></object></a>


The files referenced are phisically located on the injected location. But the player fails to load them (these are ALL files around 15 MB in size, standard MP4 files. ) And - if that counts - I am a seasoned Joomla developer ;) trying yo use your component withouth "fixing" it by hacking somewhere into the code. Seeking for advice....
  •  

ColinM

Hi
First apologies as I was a bit out of date in saying we need the MP4 file as both the downloadable file and as the associated Preview file!  As from v46, if the downloadable file is a media file and no preview file is specified then the downloadable file will be also used as the preview.
The attached pics show that the preview does appear.  I have just checked on Firefox, Chrome, Safari, IE11 and Edge.
So could you advise which Files Layout file you are using please.  Typically a v3.2 style layout includes a line such as
  <div class="jd_preview" style="">{preview_player}</div>

Colin
PS I have edited my earlier reply to correct the mistake!
Colin M
  •  

webgobe

No problems.
I am using actually the Files Layout with Readmore and checkboxes 3.2 - as is out of the box, no customizations. But the result is the same with the files Layout Full Info 3.2.

I am dazzled, the entire site is about videos (http://vibrant.tv is the live, http://theaxesgroup.com is the development/playground site) and don't have any problems with displaying videos, so don't really thing that could be something related with Apache settings or something similar.
  •  

webgobe

#5
Hmm, seemingly solved it... From the very first moment I suspected that is some setting related problem... and indeed that was.

the "culprit" is the Security>Protect your downloads directory setting.
If that is set to NO , everything works as expected.

I think, the default setting is YES (At least I don't remember to changed it, but not sure 100%)


So probably you simply need to tweak a bit the displayed text for that setting, wich actually is this:
If Yes, the htaccess.txt file will be copied to your Download root-directory and renamed as .htaccess. This enables protection so that all external file and subdirectory accesses are blocked.

Important: If you use the MP3-Player, or you have deactivated the option: Send Downloads over PHP Script you must set this protection option to No.
   
A mentioning that the YES setting can have this side effect potentially saved hours of fiddling. Just to be clear: I am NOT complaining ;) just trying to help. Anyway, will continue to dig and play with settings, to see if there is anything else.
  •  

ColinM

Hi
Excellent  :) I had forgotten that interaction!   :(

Thought the default option for "Protect your Download-directory?" was No but will double check. Think it should be No as otherwise it will cause some people downloading problems.  Will do some more testing later today.  Presume the problem also affects HTML5 but will check.

Think that it might be better to add a reference to "Protect your Download-directory?" in the Media setup section as that is where people will be focusing. Something like:
Important: If you use the MP3-Player check that you have set the field "Protect your Download-directory?" in the Security tab to No, leaving it at Yes will disable video previews.

Never thought you we complaining - we are always very grateful for help.
Colin
Colin M
  •  

ColinM

Hi
Just for reference the pics below show the likely language file changes.
Colin

[gelöscht durch Administrator]
Colin M
  •  

webgobe

Looks OK on my end!
Thanks for support - and thanks for the great component!
  •