Customizing the html5 audio player

3

I have been doubting for some time, there is some possibility of customization of the audio player of html5. So far I know that there is possibility using plugins developed in javascript, more in this way I still have not found out about it.

    
asked by anonymous 17.05.2014 / 01:00

1 answer

1

Customizing the player is impossible.

However, you can do it differently: leave it invisible, and create your own custom controls by sending the commands directly to the player via JavaScript.

For example:

<audio id="demo" src="audio.mp3"></audio>
<div>
    <button onclick="document.getElementById('demo').play()">Reproduzir o áudio</button>
    <button onclick="document.getElementById('demo').pause()">Pausar o áudio</button>
    <button onclick="document.getElementById('demo').volume+=0.1">Aumentar o volume</button>
    <button onclick="document.getElementById('demo').volume-=0.1">Diminuir o volume</button>
</div>

* This example has been taken from the MDN website, where you can find more details on the subject: Using audio and video with HTML5 .

    
17.05.2014 / 15:53