How can I hide HTML5 audio's browser specific controls? I'm making thumbnail images to represent each track and JavaScript to play/pause. Thanks! HTML:
Solution 1:
The controls attribute is a boolean attribute. This means that if it's specified, controls is true and if it's not specified, controls is false.
As far as validity goes, if you want controls to be true, you can specify it these ways:
<audio controls > <audio controls ="controls" > <audio controls ="" >
Copy Solution 2:
Solution 3:
var audio = document .getElementById ('audioFile' );
audio.controls = false ;
<audio id ="audioFile" width ="100%" height ="auto" controls > <source src ="xyz.mp3" type ="audio/mpeg" > </audio >
Copy
Post a Comment for "How Do You Hide Html5 Audio Controls?"