I'm using WordPress to output a mediaelementjs audio player. The audio player's mejs-container
is given an inline style of height 30px
. The code that does this is located in file wp-includes/js/mediaelement/mediaelement-and-player.min.js
. For example:
ioHeight:30
I tried overriding the height in my style sheet but that doesn't work because the inline style takes precedence.
How can I change this height?
When creating the mediaelement you can use the option
audioHeight
Afterwards, you can access the player using the following JS:
That will allow you to change the size of the player using the function
This function will change the size of the player but leave the controls as they were so you'll need to adjust their size as well using the function: