Skip to main content

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
Mutability
ControlUsage
Retool UI Inspector
Allowed Values
ValueDescription
small

Small button.

large

Large button.


file

Details about the selected file.

Type object
Mutability Read-only
Object Properties

lastModified

The last modified date as a timestamp.

Type number
Format Timestamp
Mutability Read-only
Examples
1617024000000

name

The file name with extension.

Type string
Mutability Read-only

retoolStorageId

The file ID if uploaded to Retool Storage.

Type string
Mutability Read-only

size

The file size, in bytes.

Type string
Mutability Read-only

type

The MIME type.

Type string
Mutability Read-only

uploading

Whether the file is uploading.

Type boolean
Mutability Read-only


hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Mutability
ControlUsage
Retool UI Inspector > Appearance > Hidden
MethodsetHidden()
Default
false
Examples
true

isPublic

Whether to make the file public when uploading with Retool Storage.

Type boolean
Mutability
ControlUsage
Retool UI Inspector

isRecording

Whether the audio is being recorded.

Type boolean
Format True/False
Mutability Read-only
Examples
true

startLabel

The label for the start button.

Type string
Mutability Read-only

stopLabel

The label for the Stop button.

Type string
Mutability Read-only

uploadToRetoolStorage

Whether to upload a file to Retool Storage.

Type boolean
Mutability
ControlUsage
Retool UI Inspector

width

The width.

Type number
Format Integer
Mutability
ControlUsage
Retool UI Inspector
Examples
1280

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.

Definition
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.

Definition
microphone.reset()
Examples

Reset microphone.

microphone.reset();

microphone.resetValue()

Reset the current value to the default value.

Definition
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.

Definition
microphone.setDisabled(disabled)
Parameters

disabled

Whether input, interaction, selection, or triggering is disabled.

Type boolean
Format True/False
Default
false
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.

Definition
microphone.setHidden(hidden)
Parameters

hidden

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide microphone.

microphone.setHidden(true);

Unhide microphone.

microphone.setHidden(false);

microphone.setValue()

Set the current value.

Definition
microphone.setValue(value)
Parameters

value

The value.

Type string | number | boolean | object | array

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.

EventDescription
ChangeThe value is changed.