-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (19 loc) · 737 Bytes
/
Copy pathindex.js
File metadata and controls
24 lines (19 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { NativeModules } from "react-native";
export const startRecord = (fileName, successCallback, errorCallback) =>
NativeModules.HugoAudioRecorder.startRecord(
fileName,
successCallback,
errorCallback
);
export const stopRecord = (successCallback, errorCallback) =>
NativeModules.HugoAudioRecorder.stopRecord(successCallback, errorCallback);
export const playRecord = fileName =>
NativeModules.HugoAudioRecorder.playRecord(fileName);
export const stopPlayingRecord = () =>
NativeModules.HugoAudioRecorder.stopPlayingRecord();
export const deleteRecord = (fileName, successCallback, errorCallback) =>
NativeModules.HugoAudioRecorder.deleteRecord(
fileName,
successCallback,
errorCallback
);