Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72388

How do you style HTML5 audio tag to only show play/pause button image?

$
0
0

I'm trying to get the HTML5 audio tag to show only the play/pause button. This question has been asked before on here, but the answers only gave the option for text 'play!''pause!', and not an actual play/pause image .png button.

I have the .png images ready, but having searched the web for days I can't find the answer to this question anywhere. I've tried replacing the text in the above example with an image, but it doesn't work. My coding isn't strong enough, so I keep deleting the code & starting again.

This is what I have:

<audio controls preload="metadata" style=" width:215px; height:18px"><source src="http://www.website.com/audio.mp3" type="audio/mpeg">(Audio player not supported. Click track title to play the audio file)</audio>

Which works just fine, but all I want is for it to work with my own play/pause button image links (2 images), whereby the play image is replaced with the pause image while playing. I don't need the volume, time display, time marker, or the rest of the controls.

Thanks in advance.


Viewing all articles
Browse latest Browse all 72388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>