The PannerNode()
constructor of the Web Audio API creates a new PannerNode
object instance.
var myPanner = new PannerNode(context, options);
Inherits parameters from the AudioNodeOptions
dictionary.
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
.)A new PannerNode
object instance.
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 | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 551 | ? | 53 | No | 42 | ? |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | 551 | 551 | ? | 53 | No | 42 | ? |
1. Before Chrome 59, the default values were not supported.
© 2005–2018 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