Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide progressbar from <audio> HTML

I am working on a game in which I want background music playing. I was wondering if there was a way to hide the progress bar of the music and only display the play and stop button with the volume slider?

Right now I have resized the width so that the play button will only show, but when I change it to a bigger width to have the slider show, the progressbar comes back out. I want to get rid of the progress bar completely.

like image 404
Makan Avatar asked Mar 20 '26 12:03

Makan


1 Answers

Unfortunately, there is no way to pick and choose which controls you want in HTML5. If you don't want to use the full set of default audio player controls, you'll have to make your own set of controls instead of using the browser default ones. See this answer for more details on creating your own and accessing the DOM API for audio elements.

like image 67
Kiz Avatar answered Mar 22 '26 01:03

Kiz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!