Discussion Forums HTML, XML, JavaScript... |
 |
Software Reviews Editors,Others... |
 |
Top100 JavaScript Tutorials, ... |
 |
Tutorials ASP, CSS, Databases... |
Discussion List FAQ, Roundup, Configure ... |
 |
Authoring HTML, JavaScript, CSS... |
 |
Design Layout, Navigation,... |
 |
Graphics Tools, Colors, Images...
|
 |
Software Browsers, Editors, XML...
|
 |
Internet Domains, E-Commerce, ... |
 |
WDVL Resources Intermdiate, Tutorials,... |
 |
WDVL Discussion Lists, Top 100,... |
 |
| Technology Jobs |
 |
|
Embedding Sound in Web Pages
Your web page can automatically play background sound when it's loaded.
However, as with all multimedia you should carefully consider whether
the benefits are justified when weighed against the penalties, e.g.
additional download time, and users who don't appreciate having it
forced on them. Offer a choice if possible.
The following code sample will play a background sound:-
<EMBED src = "fugue.mid"
autostart=true
hidden = true>
You can now use the
EMBED tag for both
Internet Explorer and Netscape Navigator.
If you're going to use the sound on a large page,
place the tag towards the bottom of your code
(but still within </BODY>).
Wave files can take some time to load and may hold up the
display of your page.
This may cause users to hit the stop button in frustration..
If you have
problems with MIDI files,
be sure your server has the proper MIME types for MIDI files:
audio/x-midi or better, audio/midi.
Sounds can either be samples (.wav or .au format) or
MIDI format
(the above example shows MIDI).
<EMBED>
with the "autostart=true" and "hidden=true" commands tells
Navigator to start playing the file immediately.
If you'd like to display the sound console, e.g. so that the user may
stop the music or adjust the volume, use:-
<EMBED src = "MIDI/Classical/fugue.mid"
width = 200
height = 60
loop = FALSE
align = right
>
|
|