/    Sign up×
Community /Pin to ProfileBookmark

Putting sound in a web page

Hi, could anyone tell me how would i have sound playing in a webpage when people go on it please?

thanks

to post a comment
Full-stack Developer

8 Comments(s)

Copy linkTweet thisAlerts:
@rhsundergroundNov 16.2004 — [code=php]<embed src="sound.mid" autoplay="false" loop="false" />[/code]
Copy linkTweet thisAlerts:
@Robert_WellockNov 17.2004 — You use the <object> element <embed /> only exists on sites where you use eXtensible Markup and a customised DTD like my own.

<object width="100" height="100">

<param name="FileName" value="file.wav" type="audio/wave" />

<param name="ShowDisplay" value="0" />

<param name="ShowControls" value="0" />

<param name="AutoStart" value="-1" />

<p>Fallback</p>

</object>
Copy linkTweet thisAlerts:
@rhsundergroundNov 17.2004 — ? embed is xHTML only?
Copy linkTweet thisAlerts:
@David_HarrisonNov 17.2004 — [i]Originally posted by Robert Wellock [/i]

[B]...and a customised DTD...[/B][/QUOTE]
Basically he means he added the element to the DTD so that his page would validate. ?
Copy linkTweet thisAlerts:
@Robert_WellockNov 18.2004 — Yes you'll have to use: http://www.yoyodesign.org/doc/dtd/alt_wdg_xml.html

As the W3C Validator is screwed up for checking customised eXtensible XHTML DTD.

The <embed> was Netscape invention and just happens to work in old browser because M$ decided they'd copy some of Netscape's ideas - it was never a W3C recommendation.
Copy linkTweet thisAlerts:
@rhsundergroundNov 19.2004 — [i]Originally posted by Robert Wellock [/i]

[B]Yes you'll have to use: http://www.yoyodesign.org/doc/dtd/alt_wdg_xml.html



As the W3C Validator is screwed up for checking customised eXtensible XHTML DTD.



The <embed> was Netscape invention and just happens to work in old browser because M$ decided they'd copy some of Netscape's ideas - it was never a W3C recommendation. [/B]
[/QUOTE]
rats. big ones.:mad:
Copy linkTweet thisAlerts:
@james_gilesauthorNov 24.2004 — Hi, thanks for your replies but i didnt understand most of the terms, i dont know much html, i just use dreamweaver
Copy linkTweet thisAlerts:
@rhsundergroundNov 25.2004 — [i]Originally posted by james giles [/i]

[B]Hi, thanks for your replies but i didnt understand most of the terms, i dont know much html, i just use dreamweaver [/B][/QUOTE]
well all you need to do is open up your page in the code view and insert the following code somewhere between the <body> and </body> tags:
[code=php]<object width="100" height="100">
<param name="FileName" value="file.wav" type="audio/wave" />
<param name="ShowDisplay" value="0" />
<param name="ShowControls" value="0" />
<param name="AutoStart" value="-1" />
<p>Fallback</p>
</object>[/code]
and replace 'file.wav' with the appropriate filename
×

Success!

Help @james_giles spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...