PDA

View Full Version : Add Sound To A Website



tomyknoker
10-24-2006, 05:48 AM
I have a 5 second piece of sound which I want to play when my website loads, can I do this without Flash?

tech_support
10-24-2006, 05:50 AM
<bgsound src="src">

...to the head section of your page.

tomyknoker
10-24-2006, 05:53 AM
<bgsound src="src">

...to the head section of your page.Will it just load? Do I need to do any kind or pre loading?

tech_support
10-24-2006, 05:53 AM
Will it just load?

Yep.


Do I need to do any kind or pre loading?

Nope.

tomyknoker
10-24-2006, 05:54 AM
Yep.



Nope.Cool! Also what filetype I have all three... wav, mp3, aif

tech_support
10-24-2006, 05:55 AM
Only wav.

For all other file types, you'll need to embed. Here's the code:



<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer">
<param name="URL" value="source here">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="invisible">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
</object>

tomyknoker
10-24-2006, 05:57 AM
Only wav.

For all other file types, you'll need to embed. Here's the code:



<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer">
<param name="URL" value="source here">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="invisible">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
</object>Hmm doesn't play in Safari any ideas?

djr33
10-24-2006, 05:59 AM
windows media player won't work for mac/linux.

I don't think wmp is for linux... correct me if I'm wrong.

you can install it for mac, but it's hard to find and most (almost all) mac users don't have it.

Quicktime is more standard, and usually on most PCs, comes standard with mac and available for linux.
However, that is mac proprietary, so while better, not perfect.


I guess I've just narrowed it down to there not being a very compatible solution. Heh. Oops :p
(But it's true....)

tech_support
10-24-2006, 05:59 AM
You'll need Windows Media Player to play it. I'm assuming your on a Mac right?

Then install the Windows Media Player for Mac.

(Sorry, replied at the same time djr33!)

tomyknoker
10-24-2006, 06:03 AM
windows media player won't work for mac/linux.

I don't think wmp is for linux... correct me if I'm wrong.

you can install it for mac, but it's hard to find and most (almost all) mac users don't have it.

Quicktime is more standard, and usually on most PCs, comes standard with mac and available for linux.
However, that is mac proprietary, so while better, not perfect.


I guess I've just narrowed it down to there not being a very compatible solution. Heh. Oops :p
(But it's true....)But when I test it in Internet Explorer on the Mac it plays... Can I make it an mp3 then so it will play on everones compuetr?

djr33
10-24-2006, 06:04 AM
Yeah, idea.... don't use that code :p

You might as well use flash... it's got a plugin for all (of the major) browsers, at least.

It's possible to find WMP9 for mac, but it takes a while.

The code is fine, but since it relies on WM, it just is annoying. Again, microsoft is up to no good.

Try to find something with Quicktime.... it will play on almost all PCs, and has more control than windows media. Windows media, among the other problems, is just an awful player. I hate how it works, especially not being able to go frame by frame and skip around on the playbar, like you can in quicktime.

tomyknoker
10-24-2006, 06:11 AM
Yeah, idea.... don't use that code :p

You might as well use flash... it's got a plugin for all (of the major) browsers, at least.

It's possible to find WMP9 for mac, but it takes a while.

The code is fine, but since it relies on WM, it just is annoying. Again, microsoft is up to no good.

Try to find something with Quicktime.... it will play on almost all PCs, and has more control than windows media. Windows media, among the other problems, is just an awful player. I hate how it works, especially not being able to go frame by frame and skip around on the playbar, like you can in quicktime.Would an mp3 work?

tech_support
10-24-2006, 06:11 AM
Yep. For both QuickTime and WMP.

tech_support
10-24-2006, 06:13 AM
Actually, you could use this code:



<embed src="source" autostart="true" loop="true" hidden="true"></embed>

tomyknoker
10-24-2006, 06:15 AM
Yep. For both QuickTime and WMP.I added it here
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>FREE WHEELIN'</title>

<bgsound src="sound/harley.mp3">

<script type="text/javascript" src="scripts/mouseover.js"></script> But no luck it doesn't play in Safari...

tech_support
10-24-2006, 06:16 AM
Try the one I posted above.

tomyknoker
10-24-2006, 06:21 AM
Try the one I posted above.Awsome! Thanks :)

tech_support
10-24-2006, 07:04 AM
Your welcome :)

lainlives
10-25-2006, 05:09 PM
Only wav.

For all other file types, you'll need to embed. Here's the code:



<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer">
<param name="URL" value="source here">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="invisible">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
</object>


The Newest IE will play mp3 wav midi rmi mid

tech_support
10-25-2006, 11:58 PM
IE doesn't play anything. What matters is if you have Windows Media Player or Quicktime etc. on your computer.

lainlives
10-27-2006, 04:26 PM
i meant the <bgsound src="whatever.bla">