Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 01-28-2012, 03:25 PM   #1
Beta Member
 
Join Date: Jan 2012
Location: UK
Posts: 4
Default Audio on HTML site (basic question)

Hi,

I've just started working my way through the W3school website and I'm stuck already

Can't get my head round how you get audio files up. On the site is suggests code like the:

<a href="song.mp3">Play Song</a>

<script type="text/javascript" src="http://mediaplayer.yahoo.com/js">
</script>

but I don't get how you link the song.mp3 part to one of my own files. What am I missing? I thought you maybe had to upload a file to a host site or something and then put int the URL but couldn't get that to work. I'm new to all this, sorry. Any advice would be very much appreciated, thanks
__________________

CluelessChimp is offline   Reply With Quote
Old 01-30-2012, 07:31 PM   #2
Daemon Poster
 
wmorri's Avatar
 
Join Date: May 2007
Posts: 1,066
Send a message via AIM to wmorri
Default Re: Audio on HTML site (basic question)

Hi,

So you are right on track. You upload the file to your server, and then you set the href to the path of the file that you want. Since you are just starting with html I would recommend going with the html5 example below.

[html]
<audio controls="controls" height="50px" width="100px">
<source src="song.mp3" type="audio/mpeg" />
<source src="song.ogg" type="audio/ogg" />
<embed height="50px" width="100px" src="song.mp3" />
</audio> [/html]

Rather than coping what it says on the w3schools page just read that and it will help you understand each element.
__________________

__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS!
Linux Forever!

I thought you were a hispanic/african american? Who is the white guy in the pictures?
wmorri is offline   Reply With Quote
Old 01-31-2012, 04:40 PM   #3
Beta Member
 
Join Date: Jan 2012
Location: UK
Posts: 4
Default Re: Audio on HTML site (basic question)

Sorry, still utterly lost.

What do you mean upload the file to the server? You mean upload it to a site like this:

zSHARE - 2-07 Ravel_ Pr__lude.m4a - Free File Hosting Service | Audio and Video Sharing | Image Uploading | Web storage

Then what do I do? I've tried putting that wherever it says "song.something" but that seems to be wrong.

How does this href come into play? Do I need to put something like this:

<a href "http://www.zshare.net/download/989646174fee8078/">

lol, sorry for being dumb
CluelessChimp is offline   Reply With Quote
Old 01-31-2012, 05:03 PM   #4
Beta Member
 
Join Date: Jan 2012
Location: UK
Posts: 4
Default Re: Audio on HTML site (basic question)

OK so that link is BS. Ignore that.

Think I've got it to work now with the yahoo media player code. So I just have to link it to a file on my PC like this right:


<a href="C:\Users\Matt\Music\iTunes\iTunes Media\Music\Angela Hewitt\Bach_ The Well-Tempered Clavier, Book 1\1-02 Bach_ Well-Tempered Clavier, Bo.m4a">Play Song</a>

<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>


So if I want to actually put the page on the internet how do I get the file to go with it? If that makes sense? Will just need to be put in some directory or something and then I upload the whole thing? Long way off from getting anything hosted I'm just thinking out loud, sorry haha

thanks for your help.

I'll try and get it to work with some of the other audio methods now and prob will come back if I get stuck.

Thanks again :-)
CluelessChimp is offline   Reply With Quote
Old 01-31-2012, 05:31 PM   #5
Beta Member
 
Join Date: Jan 2012
Location: UK
Posts: 4
Default Re: Audio on HTML site (basic question)

OK I have another quick question. Is there a way to get it to play the audio without showing any of the play buttons or anything. I want to create a link where you just click on the word and it plays a sound, for example, on a language learning site where you click on a word and you just here how it's pronounced. It doesn't bring up any audio console type thing or direct you to another page; you just click on the word and it plays the sound. Can this be achieved in HTML or do I need to learn some other language for this?

Thanks for you help.
CluelessChimp is offline   Reply With Quote
Old 01-31-2012, 05:42 PM   #6
Daemon Poster
 
wmorri's Avatar
 
Join Date: May 2007
Posts: 1,066
Send a message via AIM to wmorri
Default Re: Audio on HTML site (basic question)

Yes there is. I am not able to think of what the html is right now but I will look it up and then get back to you with what it would be.
__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS!
Linux Forever!

I thought you were a hispanic/african american? Who is the white guy in the pictures?
wmorri is offline   Reply With Quote
Old 02-15-2012, 01:06 PM   #7
Daemon Poster
 
wmorri's Avatar
 
Join Date: May 2007
Posts: 1,066
Send a message via AIM to wmorri
Default Re: Audio on HTML site (basic question)

Hi,

I am very sorry I didn't get back to you sooner, I found what I think you are looking for on the w3schools site.

[html]
<a href="song.mp3">Play the song</a> [/html]
__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS!
Linux Forever!

I thought you were a hispanic/african american? Who is the white guy in the pictures?
wmorri is offline   Reply With Quote
Old 02-22-2012, 12:22 PM   #8
Beta Member
 
Join Date: Feb 2012
Location: India
Posts: 1
Default Re: Audio on HTML site (basic question)

www.LongPathTool.com

i have read this somewhere else also.anyway not bad.
__________________

harmanmann37 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 01:20 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0