AudioPlayOptions interface

Specifies the initial playback parameters for an audio clip.

Signature:

export interface AudioPlayOptions 

Properties

PropertyModifiersTypeDescription
AutoPlay?readonlyboolean(Optional) True if the audio should start playing immediately once finished loading, otherwise false. (Default: false)
Mute?readonlyboolean(Optional) True if the audio should be initialized to a muted state. (Default: false)
PlaybackRate?readonlynumber(Optional) The initial playback rate of the audio clip. (Default: 1)
StartTime?readonlynumber(Optional) The time to be set as the initial time position of the audio clip. If autoplay is enabled, the audio will start playing from this time. (Default: 0)
Volume?readonlynumber(Optional) The initial volume of the audio clip. (Default: 1)

AudioPlayOptions.AutoPlay property

True if the audio should start playing immediately once finished loading, otherwise false. (Default: false)

Signature:

readonly AutoPlay?: boolean;

AudioPlayOptions.Mute property

True if the audio should be initialized to a muted state. (Default: false)

Signature:

readonly Mute?: boolean;

AudioPlayOptions.StartTime property

The time to be set as the initial time position of the audio clip. If autoplay is enabled, the audio will start playing from this time. (Default: 0)

Signature:

readonly StartTime?: number;

AudioPlayOptions.Volume property

The initial volume of the audio clip. (Default: 1)

Signature:

readonly Volume?: number;

AudioPlayOptions.PlaybackRate property

The initial playback rate of the audio clip. (Default: 1)

Signature:

readonly PlaybackRate?: number;