user3080392
user3080392

Reputation: 1224

add and remove controls on HTML5 audio player

How do I add and remove specific controls on an HTML5 audio player? I'd like to remove the volume control, time display, and the progress bar. I'm using the following code to show the player.

<audio controls>
<source src="http://example.mp3" type="audio/mpeg"> 
Your browser does not support this audio format.
</audio> 

<style>
audio { width: 10%; display: block;}
</style>

Thanks.

Upvotes: 0

Views: 3589

Answers (1)

Quentin
Quentin

Reputation: 943108

You can't mix and match native controls. You either have all the native controls or you have no native controls.

If you want some controls, then you'll need to reproduce them using the JavaScript APIs and DOM.

Upvotes: 3

Related Questions