PlayConfig: {
    channel?: AudioChannel;
    loop?: boolean;
    oneShot?: boolean;
    playOffset?: number;
    position?: Float32Array;
    priority?: boolean;
    volume?: number;
}

Combines all settings for configuring playback in the AudioManager.

Type declaration

  • Optionalchannel?: AudioChannel

    Sets the channel on which the audio will be played.

  • Optionalloop?: boolean

    Whether to loop the audio

  • OptionaloneShot?: boolean

    Marks the playback as being a one-shot,

    since >1.2.0

  • OptionalplayOffset?: number

    Defines the offset in seconds on where to start playing the audio

  • Optionalposition?: Float32Array

    Sets the position of the audio source and makes it spatial.

    Panned audio will always use HRTF for spatialization. For this to work correctly, the audio-listener needs to be set up!

  • Optionalpriority?: boolean

    Whether the audio has priority or not. If not, playback can be stopped to free up a player when no others are available.

  • Optionalvolume?: number

    Sets the volume of the player (0-1)