29/09/2014

Inserting codes for music in HTML

Some time ago it was quite complicated to insert music or sounds on a web page. Now, that problem is solved, adding sounds being quite simple.
<EMBED SRC="sound.mid" hidden="false" autostart="false" loop="false" volume="60" HEIGHT=60 WIDTH=144/>
It is recommended that both height and width to be directly proportional to avoid problems. To hide the player the value of the hidden attribute will be replaced by true. This thing is done if you are absolutely that the user does not wish to stop the sound.
Controlling and manipulating the player
Let's have a look on the above example:
<EMBED SRC="sound.mid" hidden="false" autostart="false" loop="false" volume="60" HEIGHT=60 WIDTH=144/>
autostart - establishes whether the sound will start immediately after the web page is loaded. Can have the true or false value. volume can have any value from 1 to 100. You can play a little with these attributes to better memorize and understand them, and also be aware that a higher volume may be annoying for the user.
Warning: Listening music at high volume may damage your hearing quality.