How to Play a WAV in the Background

A sound file, such as a WAV, can be embedded in a Web page and directed to play automatically in the background when a user visits that page. The Web browser will automatically look for a plugin to play the file. Internet Explorer usually uses the Windows Media Player plugin, while Firefox usually utilizes the QuickTime plugin. This plugin will read and play the WAV file as instructed by the code on your Web page.

Instructions

    • 1

      Copy and insert the basic embed code into the web page.

      <embed src="example.wav" autostart=false loop=false></embed>

    • 2

      Insert the correct file name and file directory. If the WAV file is not located in the root directory on the website, insert the correct directory. For example, the WAV file "webpage-speech" may be located in the "Audio" folder, or sub-directory, inside the root folder, or directory:

      <embed src=".../Audio/webpage-speech.wav" autostart=false loop=false></embed>

    • 3

      Change the code to instruct the file to automatically start by inserting "true" instead of false after autostart:

      <embed src=".../Audio/webpage-speech.wav" autostart=true loop=false></embed>

    • 4

      Select whether or not the file should play, or loop, over and over again until the user exits the page. IF you want it to loop, change the permission to "true" after "loop:"

      <embed src=".../Audio/webpage-speech.wav" autostart=false loop=true></embed>

    • 5

      Customize the music player appearance. In addition, you can configure the height, width and whether or not the player should be in the center, left or right in the cell or on the page. Enter any number for the width and height:

      <embed src=".../Audio/webpage-speech.wav" autostart=false loop=true width=85 height=55 Align="Center"></embed>

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured