Engine API Reference - v2.6.1
    Preparing search index...

    Class Sound

    Represents the resource of an audio asset.

    Index

    Constructors

    Properties

    Accessors

    Constructors

    Properties

    audio: undefined | HTMLAudioElement

    If the Web Audio API is not supported this contains the audio data.

    buffer: undefined | AudioBuffer

    If the Web Audio API is supported this contains the audio data.

    Accessors

    • get duration(): number

      Gets the duration of the sound. If the sound is not loaded it returns 0.

      Returns number