Skip to content

Commit f21d37a

Browse files
committed
fix readme
1 parent 75c37f6 commit f21d37a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@ How to use:
2828
var recorder = new Object;
2929
recorder.stop = function() {
3030
window.plugins.audioRecorderAPI.stop(function(msg) {
31+
// success
3132
alert('ok: ' + msg);
3233
}, function(msg) {
34+
// failed
3335
alert('ko: ' + msg);
3436
});
3537
}
3638
recorder.record = function() {
37-
window.plugins.audioRecorderAPI.stop(function(msg) {
39+
window.plugins.audioRecorderAPI.record(function(msg) {
40+
// complete
3841
alert('ok: ' + msg);
3942
}, function(msg) {
43+
// failed
4044
alert('ko: ' + msg);
4145
}, 30); // record 30 seconds
4246
}
47+
recorder.playback = function() {
48+
window.plugins.audioRecorderAPI.playback(function(msg) {
49+
// complete
50+
alert('ok: ' + msg);
51+
}, function(msg) {
52+
// failed
53+
alert('ko: ' + msg);
54+
});
55+
}
4356
```

0 commit comments

Comments
 (0)