ts-audio
Version:
`ts-audio` is an agnostic and easy-to-use library to work with the `AudioContext` API and create Playlists.
15 lines (14 loc) • 356 B
TypeScript
/**
* Type definition for the audio player's internal state.
*/
export type AudioState = {
isDecoded: boolean;
isPlaying: boolean;
hasStarted: boolean;
source: AudioBufferSourceNode | null;
gainNode: GainNode | null;
};
/**
* Default initial state for audio decoding and playback.
*/
export declare const defaultStates: AudioState;