Interface AudioListener

    The position and orientation of the unique person listening to the audio scene, and is used in audio spatialization. All PannerNodes spatialize in relation to the AudioListener stored in the BaseAudioContext.listener attribute.

    MDN Reference

    interface AudioListener {
        forwardX: AudioParam;
        forwardY: AudioParam;
        forwardZ: AudioParam;
        positionX: AudioParam;
        positionY: AudioParam;
        positionZ: AudioParam;
        upX: AudioParam;
        upY: AudioParam;
        upZ: AudioParam;
        setOrientation(x: number, y: number, z: number, xUp: number, yUp: number, zUp: number): void;
        setPosition(x: number, y: number, z: number): void;
    }

    Properties

    forwardX: AudioParam
    forwardY: AudioParam
    forwardZ: AudioParam
    positionX: AudioParam
    positionY: AudioParam
    positionZ: AudioParam

    Methods

    • Parameters

      • x: number
      • y: number
      • z: number
      • xUp: number
      • yUp: number
      • zUp: number

      Returns void

      MDN Reference

    • Parameters

      • x: number
      • y: number
      • z: number

      Returns void

      MDN Reference