RecordingPreview

The RecordingPreview component is a subcomponent that is part of all preset themes. It is used to render a preview when the user has recorded a voice message.

Props

Our preset themes pass the following props to the RecordingPreview component. You can change the props it receives by updating the places in the theme where the component is invoked.

NameTypeDescription
audioProgressnumberPlayback progress of the audio file
isPlayingAudiobooleanWhether the player is currently playing audio
layout"tall" | "rgular"Layout of the message field, determines how much vertical space to take up
errorMessagestring | nilError message to display if there was a playback issue
uploadState"pending" | "done" | nilThe upload state while uploading the recording

Available system components

In our preset themes, the RecordingPreview subcomponent is rendered inside the MessageField. System components available to the MessageField are also available in this component.