How to Embed a WAV Loop
A WAV is a sound file typically used for short sound effects or small pieces of music. It is generally a larger file compared to a more compressed format like MP3, and is thus more suited to shorter segments of digital sound. You can embed a WAV file into your website and command it to play in a loop. This makes the WAV play over and over again, until the visitor decides to mute the sound or leave the website.
Instructions
-
-
1
Upload your WAV file to your website server or a hosting service. Note the WAV’s URL address, as you will need this to complete the code.
-
2
Highlight the following code with your mouse, right-click and choose “Copy” from the menu:
<embed src="wavfileurl.wav" loop="true" autoplay="true" width="145" height="60"></embed>
-
-
3
Open your webpage code in a text or browser editor.
-
4
Right-click and select “Paste” from the menu to paste the code from Step 3 into your webpage code. This will embed small media player controls on your page.
-
5
Change the “wavfileurl.wav” to the exact URL address of the WAV file you uploaded. Leave the quotes around your URL.
-
6
Change the “Autoplay” attribute to “False” if you do not want the WAV to play as soon as a visitor loads your website. This requires the visitor to click on your WAV’s media player controls to launch the sound.
-
7
Save the changes to your webpage code and post it to your website.
-
8
Visit your website in an Internet browser to hear your embedded WAV play as a loop.
-
1
Tips & Warnings
Use looping WAV sounds sparingly on your website.
Always place the audio control for your WAV in an easily visible location if you choose to make the WAV play automatically. This allows the user to access the controls and shut off the sound.
Do not use large, auto-playing WAV files for background music, as this can make your website take a very long time to load for someone with a slower Internet connection.