Filter (Advanced Search)
Downloads
0
Views
249
Video

Video is not available... Embedded is previous playlist.

Details

Add muted after autoplay to let your audio file start playing automatically (but muted):


<!DOCTYPE html>
<html>
<body>
<h2>Audio Element - Autoplay and muted</h2>
<audio controls autoplay muted>
  <source src="/html/audio/audio_song.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

</body>
</html>



HTML Audio - Methods, Properties, and Events

The HTML DOM defines methods, properties, and events for the <audio> element.

This allows you to load, play, and pause audios, as well as set duration and volume.

There are also DOM events that can notify you when an audio begins to play, is paused, etc.

 

HTML Audio - Media Types

File Format Media Type
MP3 audio/mpeg
OGG audio/ogg
WAV audio/wav

 

HTML Audio Tags

 

 

Tag Description
<audio> Defines sound content
<source> Defines multiple media resources for media elements, such as <video> and <audio>
Ad