简体   繁体   English

HTML5 audio.volume的规格是什么

[英]What are the specifications for HTML5 audio.volume

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? 我似乎有些代码表明,使用javascript,你可以使用像document.getElementById('player').volume-=0.1这样的东西来设置HTML5 <audio>元素的音量级别,但我找不到任何东西来指示什么音量范围是? 0-5? 0-5? 0-10? 0-10? 0-100? 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? 有谁知道audio标签的最大音量是多少,以及它可以提出的最小增量是多少?

From the w3c HTML5 specification 来自w3c HTML5规范

... 4. Let volume be the playback volume of the audio portions of the media element, in range 0.0 (silent) to 1.0 (loudest). ... 4.将音量设为媒体元素音频部分的播放音量,范围为0.0(静音)至1.0(最大)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM