Playing a sound on a website

  • RTG101564
  • Novice
  • Novice
  • RTG101564
  • Posts: 17
  • Loc: Wilmington, DE

Post 3+ Months Ago

Can anyone help me with playing sound on my website? Against my wishes, I am being asked to play as sound.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

eeuuw!
Code: [ Select ]
<embed src="sound.mid" hidden="true" autostart="true">
  • RTG101564
  • Novice
  • Novice
  • RTG101564
  • Posts: 17
  • Loc: Wilmington, DE

Post 3+ Months Ago

Righteous ---Thanks for the info. When I use this method, IE asks me to ok the use of ActiveX content. I am looking for something that is transparent to the user. I also need to be able to adjust volume without user interaction. Is this possible?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

Take a look at SoundManager2 Its a javascript/flash combo that seems to work pretty well. I used it on this site and there haven't been any browser issues that I'm aware of...
  • wanna kill
  • Beginner
  • Beginner
  • User avatar
  • Posts: 36

Post 3+ Months Ago

Hi

Create a Clickable Link to a Sound File

The HTML to add a clickable link to a sound file is simple. You'll want to add a tag that looks like this:

<A HREF="cat.wav"> Click here to hear my cat meow.</A>

Create Sound Files That Play Automatically
Now things get sticky. You'll need to use two different HTML tags to play a sound automatically for both Internet Explorer and Netscape Navigator. However, before we jump in, take a moment to think:
Do I really, really, really want to automatically load an audio file?

If a web site visitor has to wait for an audio file to load, you're giving them an opportunity and an excuse to leave your web site. The longer the wait, the larger the chances are that they will leave. So carefully consider your file sizes and placement of automatically playing sound files.

Here are the tags you'll need. The BGSOUND SRC tag is for Internet Explorer, the Embed tag is for Netscape Navigator:

<BGSOUND SRC="sound.wav" LOOP=INFINITE>
<EMBED SRC="sound.wav" AUTOSTART="true" HIDDEN="true" LOOP="true">

This will create an infinitely looping sound for both IE and Netscape. To create a sound that doesn't loop:

<BGSOUND SRC="sound.wav" LOOP=0>
<EMBED SRC="sound.wav" AUTOSTART="True" HIDDEN="True" LOOP="false">

With the later versions of Internet Explorer, however, the above tag will give IE users two sound controls. To avoid that, add the NOEMBED and closing /NOEMBED tag around the BGSOUND SRC tag:

<NOEMBED>
<BGSOUND SRC="sound.wav" LOOP=0>
</NOEMBED>
<EMBED SRC="sound.wav" AUTOSTART="True" HIDDEN="True" LOOP="false">

hope it works
thanks
  • RTG101564
  • Novice
  • Novice
  • RTG101564
  • Posts: 17
  • Loc: Wilmington, DE

Post 3+ Months Ago

Hi everyone, I followed Wanna Kills advice and used soundManager to implement the sound on my site. It is working pretty much the way I want. The music plays inline and all that is great. However, the songs are on the page as links and I don't want the user to be able to d/l them. Any one know how I can accomplish that?
  • RTG101564
  • Novice
  • Novice
  • RTG101564
  • Posts: 17
  • Loc: Wilmington, DE

Post 3+ Months Ago

Sorry guys the advice I followed was graphixboy's.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

Hmm unfortunately I don't know that SoundManager can do that. IMO its strength its allowing you to easily play an mp3 thats already set as a link. I think your only real option for masking it would be to use something like PHP to pass the correct audio file into a swf audio player. At that point people could still get the audio file if they watch the download streams but it would be much harder.

We discussed it when I implemented SoundManger and decided that knowing to view the source and get the link name was enough of a deterrent. Maybe thats enough maybe not but at least it will stop the casual thief.
  • Richard123
  • Born
  • Born
  • Richard123
  • Posts: 1

Post 3+ Months Ago

RTG101564 wrote:
Can anyone help me with playing sound on my website? Against my wishes, I am being asked to play as sound.


The two tags most commonly used to add sound, <bgsound> and <embed> are not valid in the HTML or XHTML schemas. The alternative, <object> is still not widely supported by browsers other than Safari. :D
  • RosieJanette
  • Born
  • Born
  • RosieJanette
  • Posts: 4

Post 3+ Months Ago

RTG101564 wrote:
Can anyone help me with playing sound on my website? Against my wishes, I am being asked to play as sound.

that would be cool, but no. even if there was one, it would be wrong. All cats have very different vocals, over one hundred. I have four cats, and they all make different sounds.

Sadie - chirps like a cheetah/dolphin

Cornell - is lucky to get a squeak out; he can't meow.

Gracie - screams like a wounded rabbit
  • righteous_trespasser
  • Scuffle
  • Genius
  • User avatar
  • Posts: 6230
  • Loc: South-Africa

Post 3+ Months Ago

WHAT!??
  • markandreson
  • Born
  • Born
  • markandreson
  • Posts: 1

Post 3+ Months Ago

When sound is included in a web page, or as part of a web page, it is called inline sound.

If you plan to use inline sounds in your web applications, be aware that many people find inline sound annoying. Also note that some users might have turned off the inline sound option in their browser.

Our best advice is to include inline sound only in web pages where the user expects to hear the sound. An example of this is a page which opens after the user has clicked on a link to hear a recording.
  • bishop_ian
  • Newbie
  • Newbie
  • bishop_ian
  • Posts: 14

Post 3+ Months Ago

The simple and easy way to play sound on your website is..

Use the <embed></embed> tags to create sounds inside your website.
The <embed> tags are:

Example.1.
<EMBED src="file.wav" autostart=true loop=false volume=100 hidden=true>

EMBED src="file.wav" = This show where your files is sorted.
autostart=true = This allows the music to start playing automatically when the user enters the website.
loop=false = This means that the audio will play once and then stop.
volume=100 = This is the obvious one. It sets the volume of music.
hidden=true = This specifies that the embedded object is visible on the screen.
This will definitely help you out....

Post Information

  • Total Posts in this topic: 13 posts
  • Users browsing this forum: No registered users and 78 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.