Multimedia Exchange - HTML codes
LS1Adam
09-19-2004, 03:55 PM
Anyone know html codes for posting music up to a website? or maybe where I could find codes for a list of music options?
Thanks!
onehardmaro
09-19-2004, 07:05 PM
<bgsound src="url" loop="#" or "infinite"/> The you can loop a number of times by putting or number in or continually play it with infinite.
lapp6th
09-19-2004, 08:00 PM
midi or wave only in that case
XxNaSDaQxX
09-19-2004, 08:33 PM
Firstly, Java and Javascript are two seperate things.
You don't need either to allow music to be played. The best method, and most cross-browser, is just to call the sounds with a link....
<a href="soundFile1.mp3" title="Click to hear">sound file 1 </a>
You can, if you like, rely on a plug-in to play the sounds within the page, and the best way is to include it with the link.
This piece of code relies on Window Media Player 8,9 or 10
<object id="soundPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="0px" height="0px" type="application/x-oleobject" style="visibility:hidden">
<param name="URL" value="">
<param name="autoStart" value="true">
<param name="playCount" value="0">
<param name="volume" value="80">
<param name="rate" value="1">
<param name="uiMode" value="none">
</object>
Notice how there's no initial URL set for the player? This just embeds WMP into the page.
You can the use a function like this
function changeSound(newSound) {
document.getElementById("soundPlayer").url=newSound;}
To automatically play the sound using WMP
I have used this type of link on a friends site at http://intelligentaudio.net/audio , which plays sounds onmouseover with WMP or lets others hear the sound through the link.
<a href="soundFolder/soundFile1.mp3" title="Rollover or Click to Play" onmouseover="changeSound(this.href)">soundFile1.mp3</a>
There is probably a method to use with Real as well, but the script to work out which plugin is installed on the clients computer is complicated. I rely on WMP as it has alot more functions than others, and is more widespread. As long as you use a plain HTML link as well then all clients are kept happy
Anything else you would need an external player, i like to use flash to play my music, with or without a visual player.
Good luck......
riddler
09-22-2004, 04:54 AM
Firstly, Java and Javascript are two seperate things.
You don't need either to allow music to be played. The best method, and most cross-browser, is just to call the sounds with a link....
<a href="soundFile1.mp3" title="Click to hear">sound file 1 </a>
You can, if you like, rely on a plug-in to play the sounds within the page, and the best way is to include it with the link.
This piece of code relies on Window Media Player 8,9 or 10
<object id="soundPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="0px" height="0px" type="application/x-oleobject" style="visibility:hidden">
<param name="URL" value="">
<param name="autoStart" value="true">
<param name="playCount" value="0">
<param name="volume" value="80">
<param name="rate" value="1">
<param name="uiMode" value="none">
</object>
Notice how there's no initial URL set for the player? This just embeds WMP into the page.
You can the use a function like this
function changeSound(newSound) {
document.getElementById("soundPlayer").url=newSound;}
To automatically play the sound using WMP
I have used this type of link on a friends site at http://intelligentaudio.net/audio , which plays sounds onmouseover with WMP or lets others hear the sound through the link.
<a href="soundFolder/soundFile1.mp3" title="Rollover or Click to Play" onmouseover="changeSound(this.href)">soundFile1.mp3</a>
There is probably a method to use with Real as well, but the script to work out which plugin is installed on the clients computer is complicated. I rely on WMP as it has alot more functions than others, and is more widespread. As long as you use a plain HTML link as well then all clients are kept happy
Anything else you would need an external player, i like to use flash to play my music, with or without a visual player.
Good luck......
:eek2: Sweet Write Up :thumb:
vBulletin® v3.7.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO 3.5.2