I've seem some code indicating that with javascript you can set the volume level of an HTML5 <audio>
element using something like document.getElementById('player').volume-=0.1
, but I can't find anything to indicate what the volume range is? 0-5? 0-10? 0-100? Does anyone know what the max volume of an audio
tag is, and what the smallest increments it can be raised in are?
I've seem some code indicating that with javascript you can set the volume level of an HTML5 <audio>
element using something like document.getElementById('player').volume-=0.1
, but I can't find anything to indicate what the volume range is? 0-5? 0-10? 0-100? Does anyone know what the max volume of an audio
tag is, and what the smallest increments it can be raised in are?
- 4 I think the specifications may state that it goes from 0 to 10, but I'm pretty certain most implementations allow you to crank it up to 11 :-) – paxdiablo Commented Mar 16, 2012 at 3:41
1 Answer
Reset to default 7From the w3c HTML5 specification
... 4. Let volume be the playback volume of the audio portions of the media element, in range 0.0 (silent) to 1.0 (loudest).