Download or play options for mp3 files

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
johndavid
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 04 Oct 2012, 04:07

Download or play options for mp3 files

Post by johndavid »

I would like to give visitors to my website the option of either downloading an mp3 file or playing the file. Does the Download plugin support this requirement? What would the code look like?
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9449
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Download or play options for mp3 files

Post by Benno »

Hi,
see the demo page: https://www.phoca.cz/joomlademo/phoca-download-plugin

Kind regards,
Benno
johndavid
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 04 Oct 2012, 04:07

Re: Download or play options for mp3 files

Post by johndavid »

I have gone over the demo page quite carefully. Let me explain a little more what I am trying to do. I have an mp3 and would like to allow visitors to download the file so they can put it into iTunes, onto their ipods etc.. The File (Direct download) example uses a file test.zip. I would prefer not to have to zip the file. I assume this is done because otherwise the mp3 will play automatically and not give you the option to save the file. I realize that most people can handle unzipping a file but it is an extra step. Thanks for your reply. I was hoping for a solution where you would click to play and right-click to save... or something that simple.
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9449
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Download or play options for mp3 files

Post by Benno »

Hi,
I'm not sure if I understood you well.
Why don't you use two instances of the Phoca Download Plugin?

The first to play the file phocadownload view=fileplay|id=1|playerwidth=328|playerheight=200|playerheightmp3=30 ({ and } is missing!)
The second to download the mp3 file (not zipped) phocadownload view=file|id=1|text=MP3 Test|target=s ({ and } is missing!)

See:
Image

Kind regrds,
Benno
johndavid
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 04 Oct 2012, 04:07

Re: Download or play options for mp3 files

Post by johndavid »

Thanks for your suggestion. When I use "phocadownload view=file|id=2|text=MP3 test|target=s" I get the icon and "MP3 Test" text. If I right click on the text I have an option to "Save Link As" and I can save the MP3 to my hard drive. A left click on the text opens up a window and the MP3 plays. So I actually have what I was looking for. Thanks again.
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9449
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Download or play options for mp3 files

Post by Benno »

Ok.

Kind regards,
Benno
Post Reply