Strata - v1.4.10
    Preparing search index...

    Interface AmbientAudioRef

    Ref interface for AmbientAudio imperative control.

    interface AmbientAudioRef {
        fadeIn: (duration: number) => void;
        fadeOut: (duration: number) => void;
        isPlaying: () => boolean;
        play: () => void;
        setVolume: (volume: number, fadeTime?: number) => void;
        stop: () => void;
    }
    Index

    Properties

    fadeIn: (duration: number) => void

    Smoothly fade volume up from zero over duration.

    fadeOut: (duration: number) => void

    Smoothly fade volume down to zero over duration.

    isPlaying: () => boolean

    Whether the ambient track is active.

    play: () => void

    Trigger playback.

    setVolume: (volume: number, fadeTime?: number) => void

    Update volume with optional fade transition.

    stop: () => void

    Instantly stop playback.