Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

AudioParam.value

The value property of the AudioParam interface represents the parameter's current floating point value, which is initially set to the value of AudioParam.defaultValue.

 Though value can be set, any modifications happening while there are automation events scheduled — that is, events scheduled using the methods of the AudioParam — are ignored, without raising any exception.

Syntax

var gainNode = audioCtx.createGain();
gainNode.gain.value = 0; //'gain' is the AudioParam

Value

A float.

Example

var AudioContext = window.AudioContext || window.webkitAudioContext;
var audioCtx = new AudioContext();

var gainNode = audioCtx.createGain();
gainNode.gain.value = 0;

Specifications

Specification Status Comment
Web Audio API
The definition of 'value' in that specification.
Working Draft  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 14 webkit 23 Not supported 15 webkit
22 (unprefixed)
6 webkit
Feature Android Chrome Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support Not supported 28 webkit 25 1.2 Not supported Not supported webkit

See also

Document Tags and Contributors

 Contributors to this page: fscholz, chrisdavidmills
 Last updated by: fscholz,