Web Audio FAQ

Short answers to the questions people ask most often when adding audio to a website. Each answer links to a longer guide where one exists.

Which audio format should I use?

MP3 is the safest default because support is very broad. AAC in an M4A file is also widely supported. Opus gives smaller files for the same quality and works well as a first source with MP3 as a fallback. Compare audio formats.

Why does autoplay not work?

Browsers commonly block audio with sound until the visitor interacts with the page. Start playback from a clear play button, or start muted and let visitors turn the sound on.

Why can visitors not seek through a file?

Check that your server or CDN supports HTTP range requests. Seeking depends on being able to request part of the file, and the server should answer with a 206 Partial Content response.

Why does audio from another domain fail in my script?

Basic playback can work across domains, but reading audio data with the Web Audio API requires the file host to send suitable CORS headers.

Why does my audio play on desktop but not on iPhone?

Check the file format and the server’s content type. Safari is strict about the Content-Type header and range requests. Serving MP3 or AAC with the correct type usually fixes it.

How large should my audio files be?

For music, 128–192 kbps MP3 is plenty for most sites. For speech, 64–96 kbps mono MP3 is usually clear. Learn how to optimize audio files.

Do I need a plugin to play audio in WordPress?

Not for a simple player. The built-in Audio block handles single tracks. A plugin helps with playlists, podcast feeds or a player that keeps going between pages. See how to add audio in WordPress.

Can music keep playing when visitors change pages?

Yes, but a normal page load stops the player. You need AJAX navigation, a single-page app, a pop-out player or a resume feature. Compare the options.

Need to place a player on a page? Read how to embed audio.