Jump to content

bgsound


smiles

Recommended Posts

it would have to be one continuous song file without incorporating some other technology like flash - then you would not be using the bgsound tag or approach, you'd be using flash.

Link to comment
Share on other sites

:) well , before believing what you say is true , I will try  :)

You can do what you want with plain JavaScript, get the id of the bgsound then give it a new song, i have set it to play a new song after 5 then 10 seconds using setTimeout, just change that to 4 minutes or whatever, works like so:
<html><head><script type="text/javascript">function song2(){document.getElementById('bgsong').src="2.mp3";}function song3(){document.getElementById('bgsong').src="3.mp3";}setTimeout("song2()",5000) //play song 2 after 5 secondssetTimeout("song3()",10000) //play song 3 after 10 seconds</script></head><body><bgsound id="bgsong" src="1.mp3"></body></html>

Link to comment
Share on other sites

I think bgsound is not apreciated by W3.is there anotherway of doing it? in css or other language?

Link to comment
Share on other sites

See here: http://www.w3schools.com/media/media_browsersounds.asp

The <embed> element is supported by both Internet Explorer and Netscape, but it is not a standard HTML or XHTML element. The World Wide Web Consortium (W3C) recommend using the <object> element instead.
W£C recommends using <object>
Link to comment
Share on other sites

I checked this out, object tag: works in IE and Opera but not FireFox: http://www.w3schools.com/media/tryit.asp?f...soundwaveobjectGiven that The World Wide Web Consortium (W3C) recommend using the <object> element i find it hard to believe that FireFox doesn't play it, it's not even asking to download a plugin.Maybe someone can shed some light on this :)

Link to comment
Share on other sites

I checked this out, object tag: works in IE and Opera but not FireFox: http://www.w3schools.com/media/tryit.asp?f...soundwaveobjectGiven that The World Wide Web Consortium (W3C) recommend using the <object> element i find it hard to believe that FireFox doesn't play it, it's not even asking to download a plugin.Maybe someone can shed some light on this :)

Scott,Object Tag does indeed work with Firefox. Check out the code in this page, using the Object Tag: Object Tag TestI use Firefox 1.5.0.1 and I'm listening to the WAV file as I type this...
Link to comment
Share on other sites

Your link didn't work in my FireFox 1.0.7 or Opera 8Firefox did say i needed additional pluggins but then said they weren't available when i tried to download :)*Updated*Downloaded newer browser versions FireFox 1.5.0.1 - still asking for plugin which i cant downloadOpera 8.5.3 - works ok

Edited by scott100
Link to comment
Share on other sites

Scott,If you use QuickTime for WAV files then you need these files in Firefox's plugins folder:npqtplugin.dll npqtplugin2.dllnpqtplugin6.dllnpqtplugin7.dllnsIQTScriptablePlugin.xptQuickTimePlugin.classYou might also want to install the ActiveX plugin which is used for Windows Media Player (not the deadly Windows ActiveX). The filename is npmozax.dll, and can be either downloaded or installed here: http://www.iol.ie/~locka/mozilla/plugin.htm#download Use the plugin for Firefox 1.5, as it works for 1.5.0.1.Back to my original question, which I have answered for myself, after some research. Using both the bgsound and embed tags was definitely required in order for the sound files to be cross browser compatible, i.e., Netscape/Mozilla/Firefox/SeaMonkey/Opera/IE. However, with the newer browsers, as you found, it is no longer required. If you want your pages, which have sounds, to be backwards compatible, it is still necessary to use both the embed and object tags.Cheers!

Link to comment
Share on other sites

Here is a print screen of my problemhttp://www.myfilestash.com/userfiles/scott100/ff.jpgI click on install missing pluginsThe followings plugins are availableApple QuicktimeClick on nextApple Quicktime not availableIt has done this for FF 1.0.7 and 1.5.0.1, so im guessing the fault is with my pc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...