Skip to content

How to play only the audio of a Youtube video using HTML 5?

Is it possible to play only the audio from a YouTube video using HTML 5 and Javascript?

Answer

Embed the video player and use CSS to hide the video. If you do it properly you may even be able to hide only the video and not the controls below it.

However, I’d recommend against it, because it will be a violation of YouTube TOS. Use your own server instead if you really want to play only audio.