Adding Preview files

Describes how to add audio or video preview files to a Download

jDownloads supports adding either an audio file or a video file, which may have embedded audio, to a Download. Typically these are shown in the Files view and the Download Details view as controlled by the relevant layout.

If an Audio preview file is added then it will be shown as a simple control bar

or, optionally,as a control bar together with various details about the audio file as illustrated opposite.

The audio Control bar is show with the {preview_player} placeholder in the layout, and the audio details are shown

by including the {mp3_id3_tag} placeholder.

preview01

A video preview will be show as illustrated opposite. This is shown by including the {preview_player} placeholder in the layout.

This is usually in Files layouts and Download Details layouts as mentione earlier.  The tag {mp3_id3_tag} has no action for video files.

You can also  show the url of the video by including the placeholder {preview_url}. It is just the location and name of the preview file, it is not a link.

preview02
   

Adding a perview file is straightforward in either the backend or the front end.  Here we show adding in the Front End, adding in the backend is very similar

The Files tab in the Create/Edit form is the place where the preview is added as illustrated opposite.

The active Files layout must contasin the {preview_player} tag or the older {mp3_player} tag. Both tags support video and audio, the mp3_player tag is just retained for compatibility with older layouts.

The size of the preview player is controlled by  Configuration - Media tab

For video priewview you may selct either the HTML5 (recommended) or the Flowplayer option.  There are fields which set the heght and width in pixels.  Actuall they set the maximum height and width so that the screen scales properly for small devices.

The Audio preview is similar and again the HTML5 choice is recommended.  As for the video the preview with parameter actually sets the maximum width so it scales for smaller devices.

 preview03

The typs of preview file and the permitted maximum upoload size in kB are set for each User Group that has permission to create or edit a Download.

Audio file types are: mp3, oga, wma and wav.

Video file types are mp4, ogv and webm. 

One could also allow ogg types which are assumed as video but this is not recommended as they could be audio.

 

Note: According to Wikipedia, https://en.wikipedia.org/wiki/HTML5_video ,MP4in the regular H264 version seems to be supported in all browsers.

 preview04

ColinM  August 2016

  • Sunday, 27 September 2015
  • Posted in: FAQ