The defaultValue
property of the AudioParam
interface represents the initial value of the attributes as defined by the specific AudioNode
creating the AudioParam
.
var gainNode = audioCtx.createGain(); var gainDefault = gainNode.gain.defaultValue; //'gain' is the AudioParam
A float.
var AudioContext = window.AudioContext || window.webkitAudioContext; var audioCtx = new AudioContext(); var gainNode = audioCtx.createGain(); var gainDefault = gainNode.gain.defaultValue;
Specification | Status | Comment |
---|---|---|
Web Audio API The definition of 'defaultValue' in that specification. | Working Draft |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 14 webkit | (Yes) | 23 | No support | 15 webkit 22 (unprefixed) | 6 webkit |
Feature | Android | Chrome | Edge | Firefox Mobile (Gecko) | Firefox OS | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|---|
Basic support | No support | 28 webkit | (Yes) | 25 | 1.2 | No support | No support | 6 webkit |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AudioParam/defaultValue