You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**`onRecordingComplete`**| A method that gets called when "Save recording" option is pressed | N/A | Yes |
43
+
|**`downloadOnSavePress`**| A `boolean` value that determines if the recording should be downloaded when "Save recording" option is pressed |`false`| Yes |
44
+
|**`downloadFileExtension`**| The file extension to be used for the downloaded file. Allowed values are `mp3`, `wav` and `webm`|`mp3`| Yes |
45
+
|**`classes`**| This allows class names to be passed to modify the styles for the entire component or specific portions of it | N/A | Yes |
38
46
---
39
47
### **useAudioRecorder** hook
40
48
41
49
If you prefer to build up your own UI but take advantage of the implementation provided by this package, you can use this hook instead of the component
42
50
43
51
The hook returns the following:
44
52
45
-
#### **`startRecording`**
46
-
Calling this method would result in the recording to start. Sets `isRecording` to `true`
47
-
48
-
49
-
#### **`stopRecording`**
50
-
This results in a recording in progress being stopped and the resulting audio being present in `recordingBlob`. Sets `isRecording` to `false`
51
-
52
-
53
-
#### **`togglePauseResume`**
54
-
Calling this method would pause the recording if it is currently running or resume if it is paused. Toggles the value `isPaused`
55
-
56
-
57
-
#### **`recordingBlob`**
58
-
This is the recording blob that is created after `stopRecording` has been called
59
-
60
-
61
-
#### **`isRecording`**
62
-
A boolean value that represents whether a recording is currently in progress
63
-
64
-
65
-
#### **`isPaused`**
66
-
A boolean value that represents whether a recording in progress is paused
67
-
68
-
69
-
#### **`recordingTime`**
70
-
Number of seconds that the recording has gone on. This is updated every second
53
+
| Identifiers | Description |
54
+
| :------------ |:---------------|
55
+
|**`startRecording`**| Invoking this method starts the recording. Sets `isRecording` to `true`|
56
+
|**`stopRecording`**| Invoking this method stops the recording in progress and the resulting audio is made available in `recordingBlob`. Sets `isRecording` to `false`|
57
+
|**`togglePauseResume`**| Invoking this method would pause the recording if it is currently running or resume if it is paused. Toggles the value `isPaused`|
58
+
|**`recordingBlob`**| This is the recording blob that is created after `stopRecording` has been called |
59
+
|**`isRecording`**| A boolean value that represents whether a recording is currently in progress |
60
+
|**`isPaused`**| A boolean value that represents whether a recording in progress is paused |
61
+
|**`recordingTime`**| Number of seconds that the recording has gone on. This is updated every second |
* @prop `onRecordingComplete` Method that gets called when save recording option is clicked
17
17
* @prop `recorderControls` Externally initilize hook and pass the returned object to this param, this gives your control over the component from outside the component.
0 commit comments