AudioPlayOptions interface
Specifies the initial playback parameters for an audio clip.
Signature:
export interface AudioPlayOptions
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
AutoPlay? | readonly | boolean | (Optional) True if the audio should start playing immediately once finished loading, otherwise false. (Default: false) |
Mute? | readonly | boolean | (Optional) True if the audio should be initialized to a muted state. (Default: false) |
PlaybackRate? | readonly | number | (Optional) The initial playback rate of the audio clip. (Default: 1) |
StartTime? | readonly | number | (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? | readonly | number | (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;
Updated 7 months ago