Some time ago it was quite complex to include music or sounds on a web page. Now, the problem is being solved, in which the sound is quite easy.
<embed height="60" type="audio/midi" width="144" src="audio.mp3" volume="60" loop="false" autostart="false" />.
It is recommended that both height and width be directly proportional to avoid problems.
The value of the hidden attribute This thing is done If you are absolutely sure that the user does not want to stop
Example -
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Browser Support
Browser | MP3 | Wav | Ogg |
---|---|---|---|
Internet Explorer | YES | NO | NO |
Chrome | YES | YES | YES |
Firefox | YES | YES | YES |
Safari | YES | YES | NO |
Opera | YES | YES | YES |
Media Types
File Format | Media Type |
---|---|
MP3 | audio/mpeg |
Ogg | audio/ogg |
Wav | audio/wav |
0 comments:
Post a Comment