레퍼런스 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!

관련 레퍼런스