@minecraft/server
    Preparing search index...

    Class SoundDurationInfoBeta

    Provides duration and playback information for a sound whose definition declares a duration.

    Index

    Properties

    duration: number

    Gets the total duration of the sound in seconds.

    isActive: boolean

    Gets whether the sound is still being tracked.

    Methods

    • Beta

      Returns number

      Current playback position in seconds, measured from the beginning of the sound.

      Returns the current playback position within the sound, in seconds, measured from the beginning of the sound.

      This function can't be called in restricted-execution mode.