The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> play or download mp3 file
arthur
post Dec 11 2006, 02:37 AM
Post #1





Group: Members
Posts: 5
Joined: 11-December 06
Member No.: 1,261



I have an mp3 file that I want visitors to my web site to be able to either play or download.

How do I do this?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 11 2006, 03:13 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,403
Joined: 9-August 06
Member No.: 6



Link to it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
arthur
post Dec 11 2006, 12:25 PM
Post #3





Group: Members
Posts: 5
Joined: 11-December 06
Member No.: 1,261



QUOTE(pandy @ Dec 11 2006, 12:13 AM) *

Link to it.



Sorry. I should be more acurate.

I created a link to it and then when I clicked on the link, the mp3 starts to play. But I want to give visitors the option to either play it or download it. Is there html that will do this?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Dec 11 2006, 12:46 PM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,316
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Please see the FAQ entry How do I force the browser to download a file? How do I force the browser to show/play a file itself? How do I force a file to be opened by a particular program?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 11 2006, 02:19 PM
Post #5


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,403
Joined: 9-August 06
Member No.: 6



arthur, every browser I know have that option built in. Either you click on a link and the browser opens it if it can or you rightclick and choose "Save Target As" or similar. If you don't think your users know that - tell them. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post Dec 11 2006, 02:26 PM
Post #6


This is My Life
*******

Group: Members
Posts: 1,125
Joined: 24-August 06
From: t-dot
Member No.: 16



Why don't you embed it for people who want to play it in addition to having a link for those who want to download it?

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
arthur
post Dec 11 2006, 07:52 PM
Post #7





Group: Members
Posts: 5
Joined: 11-December 06
Member No.: 1,261



How can I modify this link so that it always asks the user to download the file?

<a href="http://www.createyourvision.com/audio/file.mp3">
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Dec 11 2006, 09:55 PM
Post #8


WDG Member
********

Group: Root Admin
Posts: 8,316
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE(arthur @ Dec 11 2006, 04:52 PM) *
How can I modify this link so that it always asks the user to download the file?

<a href="http://www.createyourvision.com/audio/file.mp3">
You can't. Please see the FAQ entry How do I force the browser to download a file? How do I force the browser to show/play a file itself? How do I force a file to be opened by a particular program?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
arthur
post Dec 12 2006, 01:05 AM
Post #9





Group: Members
Posts: 5
Joined: 11-December 06
Member No.: 1,261



In DAn's Web Tips it says "best MIME type to use is application/octet-stream; this will usually cause a "save" dialog box to appear.

Where do I put this "application/octet-stream;" ???
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 12 2006, 01:31 AM
Post #10


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,403
Joined: 9-August 06
Member No.: 6



In the server configuration.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Peter1968
post Dec 12 2006, 01:33 AM
Post #11


Serious Coder
*****

Group: Members
Posts: 448
Joined: 23-September 06
Member No.: 213



What difference does it make if the end user plays it or saves it? There's no difference in bandwidth cost to you.

Let the user decide for themselves what they want to do. In fact, as you'll find out, you will have little or no choice in the matter.

The octet-stream method doesn't work if Windows has associated mp3 files with an app anyway.

This post has been edited by Peter1968: Dec 12 2006, 01:33 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
arthur
post Dec 13 2006, 02:08 PM
Post #12





Group: Members
Posts: 5
Joined: 11-December 06
Member No.: 1,261



Another source just told me that the simple solution is to instruct users to right click on the link if they want to be able to download the mp3 file rather than listen to it. Then select "Save target as"

I tried this on IE 7 and Netscape 8 and it worked as expected.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Dec 13 2006, 02:21 PM
Post #13


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,403
Joined: 9-August 06
Member No.: 6



Uhm, that's kinda what I said from the start. blink.gif

Well, I applaud your choice of method. tongue.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 22nd October 2019 - 08:43 AM