-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.ts
More file actions
108 lines (90 loc) · 2.17 KB
/
options.ts
File metadata and controls
108 lines (90 loc) · 2.17 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
* 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 interface AudioRecorderOptions {
/**
* Gets or sets the recorded file name.
*/
filename: string;
/**
* Sets the source for recording ***ANDROID ONLY for now ***
*/
source?: any;
/**
* Gets or set the max duration of the recording session.
*/
maxDuration?: number;
/**
* Enable metering. Off by default.
*/
metering?: boolean;
/**
* Format
*/
format?: any;
/**
* Channels
*/
channels?: any;
/**
* Sampling rate
*/
sampleRate?: any;
/**
* Bit rate
*/
bitRate?: any;
/**
* Encoding
*/
encoder?: any;
/**
* Gets or sets the callback when an error occurs with the media recorder.
* @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',
ready: 'ready'
};