Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
488 changes: 244 additions & 244 deletions dist/ionic-audio-cordova-track.ts
100644 → 100755

Large diffs are not rendered by default.

121 changes: 61 additions & 60 deletions dist/ionic-audio-interfaces.ts
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,60 +1,61 @@

/**
* Defines the audio provider contract
*
* @export
* @interface IAudioProvider
*/
export interface IAudioProvider {
current: number;
tracks: IAudioTrack[];

create(track: ITrackConstraint): IAudioTrack;
add(track: IAudioTrack);
play(index: number);
pause(index?: number);
stop(index?: number);
}

/**
* Defines the properties for JSON objects representing tracks to be played
*
* @export
* @interface ITrackConstraint
*/
export interface ITrackConstraint {
id?:number;
src: string;
title?: string;
artist?: string;
art?: string;
preload?: string;
}

/**
* Defines the audio track contract
*
* @export
* @interface IAudioTrack
* @extends {ITrackConstraint}
*/
export interface IAudioTrack extends ITrackConstraint {
src: string;
id: number;
isPlaying: boolean;
isLoading: boolean;
isFinished: boolean;
duration: number;
progress: number;
completed: number;
canPlay: boolean;
error: MediaError;

play();
pause();
stop();
seekTo(time: number);
destroy();
}



/**
* Defines the audio provider contract
*
* @export
* @interface IAudioProvider
*/
export interface IAudioProvider {
current: number;
tracks: IAudioTrack[];

create(track: ITrackConstraint): IAudioTrack;
add(track: IAudioTrack);
play(index: number);
pause(index?: number);
stop(index?: number);
seekTo(time: number);
}

/**
* Defines the properties for JSON objects representing tracks to be played
*
* @export
* @interface ITrackConstraint
*/
export interface ITrackConstraint {
id?:number;
src: string;
title?: string;
artist?: string;
art?: string;
preload?: string;
}

/**
* Defines the audio track contract
*
* @export
* @interface IAudioTrack
* @extends {ITrackConstraint}
*/
export interface IAudioTrack extends ITrackConstraint {
src: string;
id: number;
isPlaying: boolean;
isLoading: boolean;
isFinished: boolean;
duration: number;
progress: number;
completed: number;
canPlay: boolean;
error: MediaError;

play();
pause();
stop();
seekTo(time: number);
destroy();
}


Loading