参考 volume()

volume()

Sets the audio/video volume.

Calling media.volume() without an argument returns the current volume as a number in the range 0 (off) to 1 (maximum).

The parameter, val, is optional. It's a number that sets the volume from 0 (off) to 1 (maximum). For example, calling media.volume(0.5) sets the volume to half of its maximum.

示例

语法

volume()
volume(val)

参数

val
Number:

volume between 0.0 and 1.0.

Returns

Number: current volume.
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!

相关参考