471,603 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 software developers and data experts.

how to get an .mp3 file to play without asking user to download

Hi, I am using the following code on my site:
Click to hear song:<p>
<a target="_blank" href="kokako-short.mp3">
<img border="0" src="images/playIcon.png" width="50" height="50"></a>

but it asks the user which program they want to download to play the mp3 file. I have tried remove the target="blank" but it does the same thing... is it out of my control and depends on the audio software of the computer in question... or is there anyway around it to ensure the audio plays for everyone without any browser questions???
Thanks alot in advance for any help.
Rina
Sep 6 '07 #1
2 1470
Death Slaught
1,137 1GB
Hi, I am using the following code on my site:
Click to hear song:<p>
<a target="_blank" href="kokako-short.mp3">
<img border="0" src="images/playIcon.png" width="50" height="50"></a>

but it asks the user which program they want to download to play the mp3 file. I have tried remove the target="blank" but it does the same thing... is it out of my control and depends on the audio software of the computer in question... or is there anyway around it to ensure the audio plays for everyone without any browser questions???
Thanks alot in advance for any help.
Rina
Well there's a number of different ways to do this, but they all depend on what you wan't here are a few options:

A. You can embed a music player.

B. You can make a link that opens windows media player.

C. You click an image to play the music.

there are more options these are just a few off the top of my head.


Thanks, Death


PS - if none of these are what you wan't please explain what it is your trying to do. ( I think your tryin to get an image to play if so try this:

<p>
<a href="kokako-short.mp3">
<img border="0" src="="images/playIcon.png"
width="50"
height="50">
</a>
</p>

the reason i took out the "target="_blank" is because it opens up a knew page then it opens windows media player.)

lol well I don't know what your problem is the script i just put works for me i just used a different picture and song. ( It's funny because they're the same thing, I just took out "target="_blank" but it worked when i had it. )
Sep 6 '07 #2
drhowarddrfine
7,435 Expert 4TB
is it out of my control and depends on the audio software of the computer in question.
Yes, it is out of your control. If the browser is asking the user to download a program to play the file then either the user has no player or the browser was never told what program to use.
Sep 6 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by atse | last post: by
3 posts views Thread by BOHICA | last post: by
12 posts views Thread by A.M. | last post: by
4 posts views Thread by Drew | last post: by
3 posts views Thread by bfmcfarlane | last post: by
4 posts views Thread by sravan_reddy001 | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.