Skip to content

Commit

Permalink
v1.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
afkcodes committed Sep 6, 2024
1 parent 9e3af64 commit 3fd226f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3268,6 +3268,7 @@ interface AudioEvents {
LOAD_START: 'loadstart';
ERROR: 'error';
TRACK_CHANGE: 'trackchange';
QUEUE_ENDED: 'queueended';
}
interface CustomAudioState {
AUDIO_X_STATE: 'AUDIO_X_STATE';
Expand All @@ -3280,7 +3281,7 @@ type EventListenerCallbackMap = {
type InitMode = 'REACT' | 'VANILLA';
type PlaybackRate = 1.0 | 1.25 | 1.5 | 1.75 | 2.0 | 2.5 | 3.0;
type Preload = 'none' | 'metadata' | 'auto' | '';
type PlayBackState = 'idle' | 'playing' | 'ended' | 'ready' | 'paused' | 'stalled' | 'error' | 'buffering' | 'trackchanged' | 'durationchanged';
type PlayBackState = 'idle' | 'playing' | 'ended' | 'ready' | 'paused' | 'stalled' | 'error' | 'buffering' | 'trackchanged' | 'durationchanged' | 'queueended';
type MediaArtwork = {
src: string;
name?: string;
Expand Down Expand Up @@ -3309,7 +3310,7 @@ interface AudioInit {
enablePlayLog?: boolean;
enableHls?: boolean;
enableEQ?: boolean;
crossOrigin?: string;
crossOrigin?: 'anonymous' | 'use-credentials' | null;
hlsConfig?: HlsConfig | {};
}
interface AudioError {
Expand All @@ -3335,6 +3336,7 @@ interface Band {
frequency: number;
type: BiquadFilterType;
gain: number;
q: number;
}
interface Preset {
id: string | number;
Expand All @@ -3356,7 +3358,7 @@ declare class AudioX {
private showNotificationsActions;
constructor();
init(initProps: AudioInit): Promise<void>;
addMedia(mediaTrack: MediaTrack): Promise<void>;
addMedia(mediaTrack: MediaTrack, mediaFetchFn?: (mediaTrack: MediaTrack) => Promise<void>): Promise<void>;
attachEq(): void;
play(): Promise<void>;
addMediaAndPlay(mediaTrack?: MediaTrack | null, fetchFn?: (mediaTrack: MediaTrack) => Promise<void>): Promise<void>;
Expand All @@ -3379,6 +3381,7 @@ declare class AudioX {
}[];
setPreset(id: keyof Preset): void;
setCustomEQ(gains: number[]): void;
setBassBoost(enabled: boolean, boost: number): void;
addQueue(queue: MediaTrack[], playbackType: QueuePlaybackType): void;
playNext(): void;
playPrevious(): void;
Expand Down
Loading

0 comments on commit 3fd226f

Please sign in to comment.