Skip to content
Advertisement

How to increase the size of play and pause buttons and the height of an HTML audio player?

As you can see, the PLAY/PAUSE icons are too small than intended as well as the whole player is thiner than intended as some viewer will have difficulties to see it. How can I make the whole player bigger? I read that we will not have access to individual controls (eg. Play)

enter image description here

What I want is the WHOLE audio player to be bigger where the PLAY/PAUSE ICONS as well as the SLIDER is more easly visible for everyone.

EDITED with webkit media control styles

JavaScript

With the webkit audio control styles applied, the player now looks like as follows:

enter image description here

How can I fix that timeline(darker) to be of same size(height) as the gray, think timeline?

Advertisement

Answer

Here is custom styling for the audio tag. You can use audio::-webkit-media-controls-play-button to modify the play button itself, and you can use audio::-webkit-media-controls-timeline for the timeline like so:

JavaScript
JavaScript

If you would like to make the whole audio player bigger, you can do this simply by doing the following:

JavaScript
JavaScript

With the webkit controls, you can also make each item bigger if you want to make the whole player bigger. All of the webkit audio modifications allowed can be found below.

JavaScript

Hope this helped.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement