Documentation
Types
ISoundUserConfig

ISoundUserConfig

type VoiceIdMap = Record<string | number, string | Sound>;
type VoiceSrcGenerator = (id: string | number) => string | Sound;
 
interface ISoundUserConfig {
    /**
     * Sound source should be a URL or a base64 string
     */
    src: string;
    /**
     * Whether to loop, if sync and loop are both true, sync will be treated as **false**
     * @default false
     */
    loop: boolean;
    /**
     * Initial volume, between 0 and 1
     * @default 1
     */
    volume: number;
    /**
     * Playback rate, 0.5 to 4
     * @default 1
     */
    rate: number;
    /**
     * Set to `true` to force HTML5 Audio.
     * This should be used for large audio files
     * so that you don't have to wait for the full file to be downloaded and decoded before playing.
     * @default false
     */
    streaming: boolean;
    /**
     * Initial position in seconds
     * @default 0
     */
    seek: number;
}