Play a sound track
The audio element allows a browser to play and pause a media file containing a sound track.
Support for multiple CODECs is provided by specifying alternate versions of the soundtrack in descendant "source" elements.
- Use sourceref notation to identify the media file containing the soundtrack.
- Display a user interface to allow the sound volume to be adjusted and to allow the track to be paused, resumed or skipped.
- Begin playing the soundtrack immediately, even before the entire file is downloaded.
- Play the soundtrack in a continuous loop.
- Mute the sound until the user explicitly turns it on.
- Should the entire soundtrack be downloaded before starting?
autoDownload the entire media file, even if the user may not play it.
metadataOnly download the soundtrack's length.
noneDo not preload.
- Use this to fetch the media file using CORS.
anonymousSimply send a request for the image with an "Origin" header.
use-credentialsSend a rquest with "Origin" header and credentials.
- Each source element provides one version of a media file, allowing the browser to negotiate which one to use.
- The track element references an external document containing information about the separate tracks of a video or audio file.