This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

maxDistance

Summary

The maximum distance between source and listener, after which the volume will not be reduced any further. The default value is 10000.

Property of apis/webaudio/PannerNodeapis/webaudio/PannerNode

Syntax

var result = PannerNode.maxDistance;
PannerNode.maxDistance = value;

Return Value

Returns an object of type NumberNumber

Examples

var audioCtx = new AudioContext();
var panner = audioCtx.createPanner();
panner.maxDistance = 10000;

Related specifications

W3C Web Audio API
W3C Editor’s Draft