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:
<audio class="thumbnail" id="paparazzi" controls="none">
<source src="song.ogg" type="audio/ogg" />
<source src="../audio/fernando_garibay_paparazzisnlmix.mp3" type="audio/mpeg" />
Your browser does not support HTML5 audio.
</audio>
Long-press of the folders/files to show hidden options. Tap on the menu icon and select Hide. This will hide the folder and all the files saved within. Now, when you open the music player app, you won't see these audio file formats with your songs.
HTML Audio - How It WorksThe controls attribute adds audio controls, like play, pause, and volume. The <source> element allows you to specify alternative audio files which the browser may choose from. The browser will use the first recognized format.
If you don't specify the controls attribute, the audio player won't include the browser's default controls.
You can also disable an audio tag if you add style="pointer-events:none" to it…
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="">
Don't specify the controls
attribute at all, this should stop it from showing (I got this after a 5 second google, don't quote me on it).
HTML5 video - show/hide controls programmatically
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With