The Microphone component for Retool Mobile
A button to record audio.
Recordings are Base64-encoded in WebM format, and audio playback displays a progress bar and elapsed time.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
buttonSize
The size of the button.
Type | string | ||||||
Configurability | Inspector | ||||||
Allowed Values |
| ||||||
Default | null |
events
A list of configured event handlers that trigger actions or queries.
Type | array |
Array values | object |
Configurability | Inspector > Interaction > Event handlers |
Default | null |
Array Object Properties
event
The event that triggers the action. Refer to the events section for details of available events for this object.
Type | string |
Configurability | Inspector > Interaction > Event handlers > Event |
Default | null |
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
Type | string |
Configurability | Inspector > Interaction > Event handlers > Edit event handler > Run script actions |
Default | null |
type
The type of action to perform.
Type | string | ||||||||||||||
Configurability | Inspector > Interaction > Event handlers > Edit event handler > Action | ||||||||||||||
Allowed Values |
| ||||||||||||||
Default | null |
Object Properties
lastModified
The last modified date as a timestamp.
Type | number |
Format | Timestamp |
Configurability | Read-only |
Default | null |
Examples
1617024000000
retoolStorageId
The file ID if uploaded to Retool Storage.
Type | string |
Configurability | Read-only |
Default | null |
hidden
Whether this object is hidden from view.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Hidden |
Default | false |
Examples
true
isPublic
Whether to make the file public when uploading with Retool Storage.
Type | boolean |
Configurability | Inspector |
Default | null |
isRecording
Whether the audio is being recorded.
Type | boolean |
Format | True/False |
Configurability | Read-only |
Default | null |
Examples
true
uploadToRetoolStorage
Whether to upload a file to Retool Storage.
Type | boolean |
Configurability | Inspector |
Default | null |
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
microphone.clearValue()
Clear the current values.
microphone.clearValue()
Examples
Clear the current value of microphone
.
microphone.clearValue();
microphone.reset()
Reset all child inputs to default values or clears them if no default values are set.
microphone.reset()
Examples
Reset microphone
.
microphone.reset();
microphone.resetValue()
Reset the current value to the default value.
microphone.resetValue()
Examples
Reset the current value of microphone
.
microphone.resetValue();
microphone.setDisabled()
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
microphone.setDisabled(disabled)
Parameters
disabled
Whether input, interaction, selection, or triggering is disabled.
Type | boolean |
Format | True/False |
Default |
|
Examples
true
Examples
Disable microphone
.
microphone.setDisabled(true);
Enable microphone
.
microphone.setDisabled(false);
microphone.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
microphone.setHidden(hidden)
Parameters
Examples
true
Examples
Hide microphone
.
microphone.setHidden(true);
Unhide microphone
.
microphone.setHidden(false);
microphone.setValue()
Set the current value.
microphone.setValue(key, value)
Examples
Set the current value of microphone
to userValue
.
microphone.setValue(userValue);
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Change | The value is changed. |