Microphone

A button that lets you record audio from your computer microphone.

Properties

Available properties for Microphone with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.

NameTypeDescriptionaudioFileobject | null

A base64-encoded string of the recorded audio.

audioURLstring

A base64-encoded URL with the recorded audio.

hiddenboolean

Whether the component is visible.

iconAfterIconKey

The icon to display after the primary content.

iconBeforeIconKey

The icon to display before the primary content.

labelstring

The label of button to start recording.

maintainSpaceWhenHiddenboolean

Whether the component takes up space on the canvas if hidden is true.

marginstring

The amount of margin to render outside of the component.

recordingboolean

Whether the microphone is currently recording.

showInEditorboolean

Whether the component remains visible in the editor if hidden is true.

stopLabelstring

The label of button to stop recording.

styleVariant'solid' | 'outline'

The current variant used to style the component.

Events

Events are triggered by user interactions with Microphone. Use event handling to trigger queries or other actions in response to events.

NameDescriptionChange

A user changes the current value.

Methods

Methods for interacting with Microphone. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.

NameDescriptionscrollIntoView(options: any)

Scrolls the canvas or parent container so that the selected component appears in the visible area.

setHidden(hidden: boolean)

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

startRecording()

Start recording audio.

stopRecording()

Stop recording audio.

reset()

Reset the recording.