Recording
Record button, microphone toggle, level meter, status orb, elapsed timer, recording indicator and processing status for capture UIs.
Angular: available Vue: available React: available React Native: available
Usage
<div class="demo-stack" style="max-width: 360px; width: 100%">
<div class="demo-row">
<button soneRecordButton type="button" [state]="recording() ? 'recording' : 'idle'"
[attr.aria-label]="recording() ? 'Stop recording' : 'Start recording'"
(click)="recording.set(!recording())"></button>
<sone-mic-toggle [muted]="muted()" [disabled]="!recording()" (muteToggle)="muted.set(!muted())" />
<button soneRecordButton withLabel size="sm" type="button"
[state]="paused() ? 'paused' : 'recording'" [disabled]="!recording()"
(click)="paused.set(!paused())">{{ paused() ? 'Resume' : 'Pause' }}</button>
</div>
@if (recording()) {
<sone-recording-indicator [seconds]="seconds()" [state]="paused() ? 'paused' : 'live'"
[label]="paused() ? 'Paused' : muted() ? 'Recording · muted' : 'Recording'" />
} @else {
<div class="demo-row">
<sone-status-orb state="ready" />
<span>Ready</span>
</div>
}
<div soneField>
<label soneFieldLabel for="recording-demo-level">Simulated input level</label>
<input #range id="recording-demo-level" style="accent-color: var(--accent)" type="range" min="0" max="1" step="0.05"
[value]="level()" (input)="level.set(range.valueAsNumber)" />
</div>
<sone-level-meter [level]="meterLevel()" />
<sone-level-meter [bars]="24" [history]="history" />
<div class="demo-row" style="align-items: center">
<sone-status-orb state="paused" /><span>Paused</span>
<sone-status-orb state="queued" /><span>Queued</span>
<sone-status-orb state="error" /><span>Failed</span>
</div>
<sone-processing-status stage="summarizing" [progress]="0.42" />
<sone-processing-status stage="error" size="sm" />
</div>Import
import {
SoneElapsedTimerComponent,
SoneLevelMeterComponent,
SoneMicToggleComponent,
SoneProcessingStatusComponent,
SoneRecordButtonDirective,
SoneRecordingIndicatorComponent,
SoneStatusOrbComponent,
} from "@surface-one/angular/recording";API reference
SoneElapsedTimerComponentComponent
`<sone-elapsed-timer>` — a running time (`12:04`, `1:02:07`) in tabular mono figures, as a `<time>` with an ISO 8601 `datetime`.
| Name | Type | Default |
|---|---|---|
secondsElapsed whole seconds. | number | null | 0 |
liveA running clock: `role="timer"` (never announced on every tick). | boolean | false |
size | ElapsedTimerSize | "default" |
ariaLabelThe timer's name when `live` (“Recording time”). | string | null | null |
SoneLevelMeterComponentComponent
| Name | Type | Default |
|---|---|---|
levelThe current input level, 0..1 — drives the synthetic sway. | number | 0 |
bars | number | 30 |
historyRecent levels (0..1), oldest first. When set, each bar draws one real sample (the newest at the end, missing ones as silence) instead of the sway. | readonly number[] | null | null |
SoneMicToggleComponentComponent
| Name | Type | Default |
|---|---|---|
muted | boolean | false |
compact | boolean | false |
disabled | boolean | false |
muteLabel | — | $localize`Mute microphone` |
unmuteLabel | — | $localize`Unmute microphone` |
| Name | Type |
|---|---|
muteToggle | void |
SoneProcessingStatusComponentComponent
`<sone-processing-status>` — where a recording is in the pipeline: the processing orb, the stage label and a thin `<sone-progress>`. A polite live region (`role="status"`), so a stage change is announced once.
| Name | Type | Default |
|---|---|---|
stage`recording`, `transcribing`, `summarizing`, `exporting`, `saved`, `finalized`, `done`, `error` or your own. | string | "transcribing" |
labelsOverrides for the built-in stage labels; an unknown stage shows itself capitalised. | Partial<Record<string, string>> | {} |
messageA live detail that replaces the stage label while it is non-empty (“Transcribing 3 of 7…”). | string | null | null |
progress0..1; `null` = indeterminate. | number | null | null |
showProgressDraw the progress track (off for a compact row status). | boolean | true |
size | ProcessingStatusSize | "default" |
SoneRecordButtonDirectiveDirective
| Name | Type | Default |
|---|---|---|
state`idle` (start), `recording` (stop), `paused` (resume), `processing` (busy). | RecordButtonState | "idle" |
size | RecordButtonSize | "default" |
withLabelA pill with the glyph and the button's own text (`<button soneRecordButton withLabel>Record</button>`). Off = the round icon-only button. | boolean | false |
SoneRecordingIndicatorComponentComponent
`<sone-recording-indicator>` — “a recording is running”: the live (or paused) status orb, the elapsed timer and an optional label, in one row.
| Name | Type | Default |
|---|---|---|
secondsElapsed whole seconds. | number | null | 0 |
labelVisible text after the timer (“Recording”); `null` = none. | string | null | null |
state | RecordingIndicatorState | "live" |
size | RecordingIndicatorSize | "default" |
timerLabelThe timer's accessible name. | — | $localize`:Accessible name of the running recording clock:Recording time` |
SoneStatusOrbComponentComponent
| Name | Type | Default |
|---|---|---|
state | StatusOrbState | "ready" |
size | StatusOrbSize | "default" |