The PannerNode()
constructor creates a new PannerNode
object instance.
var myPanner = new PannerNode(context, options);
BaseAudioContext
representing the audio context you want the node to be associated with.PannerOptions
dictionary object defining the properties you want the PannerNode
to have (It also inherits the options defined in the AudioNodeOptions dictionary.): panningModel
: The PannerNode.panningModel
you want the PannerNode
to have (the default is equalpower
.)distanceModel
: The PannerNode.distanceModel
you want the PannerNode
to have (the default is inverse
.)positionX
: The PannerNode.positionX
you want the PannerNode
to have (the default is 0
.)positionY
: The PannerNode.positionY
you want the PannerNode
to have (the default is 0
.)positionZ
: The PannerNode.positionZ
you want the PannerNode
to have (the default is 0
.)orientationX
: The PannerNode.orientationX
you want the PannerNode
to have (the default is 1
.)orientationY
: The PannerNode.orientationY
you want the PannerNode
to have (the default is 0
.)orientationZ
: The PannerNode.orientationZ
you want the PannerNode
to have (the default is 0
.)refDistance
: The PannerNode.refDistance
you want the PannerNode
to have (the default is 1
.)maxDistance
: The PannerNode.maxDistance
you want the PannerNode
to have (the default is 10000
.)rollOffFactor
: The PannerNode.rollOffFactor
you want the PannerNode
to have (the default is 1
.)coneInnerAngle
: The PannerNode.coneInnerAngle
you want the PannerNode
to have (the default is 360
.)coneOuterAngle
: The PannerNode.coneOuterAngle
you want the PannerNode
to have (the default is 360
.)coneOuterGain
: The PannerNode.coneOuterGain
you want the PannerNode
to have (the default is 0
.)var ctx = new AudioContext(); var options = { positionX : 1, maxDistance: 5000 } var myPanner = new PannerNode(ctx, options);
Specification | Status | Comment |
---|---|---|
Web Audio API The definition of 'PannerNode' in that specification. | Working Draft |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 55.0 | No support | No support | 29 | No support |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | No support | 55.0 | No support | No support | (Yes) | No support | 55.0 |
© 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/PannerNode/PannerNode