-
Notifications
You must be signed in to change notification settings - Fork 4
/
options.ts
48 lines (41 loc) · 1.13 KB
/
options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* Provides options for the audio player.
*/
export interface AudioPlayerOptions {
/**
* Gets or sets the audio file url.
*/
audioFile: string;
/**
* Gets or sets the callback when the currently playing audio file completes.
* @returns {Object} An object containing the native values for the callback.
*/
completeCallback?: Function;
/**
* Get or sets the player to loop playback.
*/
loop: boolean;
/**
* Prevent autoplay if desired as player autoplays be default
*/
autoPlay?: boolean;
/**
* Enable metering. Off by default.
*/
metering?: boolean;
/**
* Gets or sets the callback when an error occurs with the audio player.
* @returns {Object} An object containing the native values for the error callback.
*/
errorCallback?: Function;
/**
* Gets or sets the callback to be invoked to communicate some info and/or warning about the media or its playback.
* @returns {Object} An object containing the native values for the info callback.
*/
infoCallback?: Function;
}
export const AudioPlayerEvents = {
seek: 'seek',
paused: 'paused',
started: 'started'
};