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

how to play musics and videos

Started by mehrangan, 25.02.2013 20:55:51

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mehrangan

hi
i've just installed jdownloder and i want to play musics and videos in my site

how can i do that?
  •  

Arno

Hi,
please go to the jD configuration TAB: Audio.

You can install any Video Player plugin to view a video in your downloads descriptions.
Alternate exist also a view hacks to add a other player for jDownloads, see here:
http://www.jdownloads.com/forum/index.php?topic=4005.msg15346#msg15346
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

peterjack

Really i'm benefited by the link you provided. Instructions for JW player is very helpful. Thanks.
  •  

jamonprive

Hi,

Once you have downloaded JW player you must upload jwplayer to the website folder.

Open jdownloads.html.php and replace the existing code by this:

// mp3 player
    if ($file->extern_file){
      $extern_mp3 = true;
      $filetype = strtolower(substr(strrchr($file->extern_file, '.'), 1));
    } else {
      $filetype = strtolower(substr(strrchr($file->url_download, '.'), 1));
      $extern_mp3 = false;
    }
    if ($filetype == 'mp4' || $filetype == 'mov' || $filetype == 'flv' || $filetype == '3gp' ||  $filetype == '3g2' || $filetype == 'aac' || $filetype == 'm4a' || $filetype == 'mp3'){
        if ($extern_mp3){
            $mp3_path = $file->extern_file;
        } else {
            $mp3_path = JURI::base().$jlistConfig['files.uploaddir'].'/'.$cat->cat_dir.'/'.$file->url_download;
        }
            if ($filetype == 'mp4' || $filetype == 'mov' || $filetype == 'flv' || $filetype == '3gp' ||  $filetype == '3g2')
                $mp3_player =
                '<script type="text/javascript"  src="/components/com_jdownloads/jwplayer/jwplayer.js"></script>
                <div id="container">Loading the media player ...</div>
                <script type="text/javascript">
                    jwplayer("container").setup({
                        flashplayer: "/components/com_jdownloads/jwplayer/player.swf",
                        backcolor: "333333",
                        frontcolor: "FFFFFF",
                        lightcolor: "FF0000",
                        screencolor: "000000",
                        controlbar: "bottom",
                        file: "'.$mp3_path.'",
                        volume: 50,
                        height: 384,
                        width: 480
                    });
                </script>';
            if ($filetype == 'aac' || $filetype == 'm4a' || $filetype == 'mp3')
                $mp3_player =
                '<script type="text/javascript"  src="/components/com_jdownloads/jwplayer/jwplayer.js"></script>
                <div id="container">Loading the media player ...</div>
                <script type="text/javascript">
                    jwplayer("container").setup({
                        flashplayer: "/components/com_jdownloads/jwplayer/player.swf",
                        backcolor: "333333",
                        frontcolor: "FFFFFF",
                        lightcolor: "FF0000",
                        screencolor: "000000",
                        controlbar: "bottom",
                        file: "'.$mp3_path.'",
                        volume: 50,
                        height: 24,
                        width: 480
                    });
                </script>';
        if ($extern_mp3){
                $mp3_path_abs = JPATH_BASE.DS.$jlistConfig['files.uploaddir'].DS.$cat->cat_dir.DS.$file->url_download;
                }
                $html_file = str_replace('{mp3_player}', $mp3_player, $html_file);
            } else {
                $html_file = str_replace('{mp3_player}', '', $html_file);
    }

It is done!