# Audio Player

> Play a recording or a spoken reply in a compact row, with a scrub bar drawn from its loudness.

Source: https://www.honestui.com/docs/ai/audio-player

```tsx
"use client"

import * as React from "react"

import { AudioPlayer } from "@/components/ai/audio-player"

const SAMPLE_RATE = 22_050
const SECONDS = 14
const PEAK_COUNT = 96
// A short pentatonic phrase, in hertz, played by soft sine notes that ring into each other.
const NOTES = [523.25, 587.33, 659.25, 783.99, 880, 783.99, 659.25, 587.33, 523.25, 659.25, 783.99, 1046.5]

/** Renders a little melody in the browser, so the preview ships no audio file. */
async function renderSample() {
  const context = new OfflineAudioContext(1, SAMPLE_RATE * SECONDS, SAMPLE_RATE)
  NOTES.forEach((frequency, index) => {
    const start = 0.4 + index * 1.1
    const oscillator = context.createOscillator()
    const gain = context.createGain()
    oscillator.type = "sine"
    oscillator.frequency.value = frequency
    gain.gain.setValueAtTime(0, start)
    gain.gain.linearRampToValueAtTime(0.32 * (0.6 + (index % 3) * 0.2), start + 0.03)
    gain.gain.exponentialRampToValueAtTime(0.0001, start + 2.2)
    oscillator.connect(gain).connect(context.destination)
    oscillator.start(start)
    oscillator.stop(start + 2.3)
  })
  const buffer = await context.startRendering()
  const data = buffer.getChannelData(0)

  const peaks: number[] = []
  const bucket = Math.floor(data.length / PEAK_COUNT)
  for (let i = 0; i < PEAK_COUNT; i += 1) {
    let max = 0
    for (let j = i * bucket; j < (i + 1) * bucket; j += 1) max = Math.max(max, Math.abs(data[j]))
    peaks.push(max)
  }
  const loudest = Math.max(...peaks, 0.0001)

  return { url: URL.createObjectURL(toWav(data)), peaks: peaks.map((peak) => peak / loudest) }
}

/** Wraps mono samples in a 16-bit WAV file. */
function toWav(samples: Float32Array) {
  const view = new DataView(new ArrayBuffer(44 + samples.length * 2))
  const text = (offset: number, value: string) =>
    [...value].forEach((char, i) => view.setUint8(offset + i, char.charCodeAt(0)))
  text(0, "RIFF")
  view.setUint32(4, 36 + samples.length * 2, true)
  text(8, "WAVE")
  text(12, "fmt ")
  view.setUint32(16, 16, true)
  view.setUint16(20, 1, true)
  view.setUint16(22, 1, true)
  view.setUint32(24, SAMPLE_RATE, true)
  view.setUint32(28, SAMPLE_RATE * 2, true)
  view.setUint16(32, 2, true)
  view.setUint16(34, 16, true)
  text(36, "data")
  view.setUint32(40, samples.length * 2, true)
  samples.forEach((sample, i) => view.setInt16(44 + i * 2, Math.max(-1, Math.min(1, sample)) * 0x7fff, true))
  return new Blob([view], { type: "audio/wav" })
}

/** A real `<audio>` element plays a melody rendered in the browser. Its peaks are measured from the same samples. */
export function AudioPlayerDemo() {
  const [sample, setSample] = React.useState<{ url: string; peaks: number[] } | null>(null)

  React.useEffect(() => {
    let url: string | null = null
    let cancelled = false
    renderSample().then((result) => {
      if (cancelled) return URL.revokeObjectURL(result.url)
      url = result.url
      setSample(result)
    })
    return () => {
      cancelled = true
      if (url) URL.revokeObjectURL(url)
    }
  }, [])

  return (
    <div className="w-full max-w-[30rem]">
      <AudioPlayer
        src={sample?.url}
        peaks={sample?.peaks}
        title="Voice memo · Pricing review"
      />
    </div>
  )
}

```

## Overview [#overview]

Voice replies, call recordings, and memos all need the same small player: play, see where you are, jump, and speed it up. Audio Player is that row. With `peaks`, the scrub bar is the file's waveform, so loud and quiet parts can be found by eye.

Give it a `src` and it plays the file in its own `<audio>` element. Leave `src` out and it is fully controlled: you pass the time, the length, and whether it plays, and it calls you back.

## Anatomy [#anatomy]

<Anatomy title="AudioPlayer">
  <AnatomyItem name="Toggle" description="Play or pause" />

  <AnatomyItem name="Title" description="An optional line above the scrub bar" />

  <AnatomyItem name="Scrub bar" description="A slider: the waveform from peaks, or a plain bar" />

  <AnatomyItem name="Time" description="Elapsed and total, in tabular numbers" />

  <AnatomyItem name="Speed" description="Steps through the playback rates" />
</Anatomy>

`AudioPlayer` is one component. Installing `audio-player` brings [Button](/docs/components/button) along as a registry dependency.

## Behavior [#behavior]

### Owned or controlled [#owned-or-controlled]

| Mode       | Set                                  | The player                                                                                                                       |
| ---------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| Owned      | `src`                                | Loads the file, reads its length, plays, pauses, and seeks. `onTimeUpdate`, `onPlayingChange`, and `onSeek` report what happened |
| Controlled | `currentTime`, `duration`, `playing` | Shows what you pass, and asks for changes through `onPlayingChange` and `onSeek`                                                 |

A new `src` starts from the beginning. If the file cannot load, the scrub bar is replaced by an error and play is disabled.

### Peaks [#peaks]

`peaks` is loudness from 0 to 1 across the file, such as the maximum of each slice of samples, normalized. More than 96 values are reduced to 96 bars, each keeping its slice's loudest value. Bars that have played are drawn in the text color; the rest are muted. Without `peaks`, the scrub bar is a plain track with a handle.

The player does not decode audio to find peaks. Compute them once, on your server or with `AudioContext.decodeAudioData`, and store them with the file.

### Scrubbing [#scrubbing]

Press or drag on the scrub bar to move. The time follows the pointer and is committed on release, so a drag seeks once.

### Speed [#speed]

The speed button steps through `rates`, which defaults to 1×, 1.25×, 1.5×, 2×, and 0.75×. Control it with `playbackRate` and `onPlaybackRateChange`.

## Accessibility [#accessibility]

The toggle is a button named "Play" or "Pause". The scrub bar has the `slider` role, a name, and a value read as the time, such as "0:12 of 1:04". The time beside it is read once in the same words.

The error is an alert. Every string comes from `labels`, and `formatAudioTime` is exported for your own timestamps.

| Key                                        | Where               | Action                                  |
| ------------------------------------------ | ------------------- | --------------------------------------- |
| <kbd>Space</kbd>                           | Toggle or scrub bar | Play or pause                           |
| <kbd>Right</kbd> or <kbd>Up</kbd>          | Scrub bar           | Forward by `step`, 5 seconds by default |
| <kbd>Left</kbd> or <kbd>Down</kbd>         | Scrub bar           | Back by `step`                          |
| <kbd>Page Up</kbd> or <kbd>Page Down</kbd> | Scrub bar           | A tenth of the length forward or back   |
| <kbd>Home</kbd> or <kbd>End</kbd>          | Scrub bar           | The start or the end                    |

## Installation [#installation]


  

  
    <CliBlock commands="[&#x22;@honestai/audio-player&#x22;]" />
  

  
    
      
        Add what it is built from.
      

      <CliBlock commands="[&#x22;button&#x22;]" />

      
        Copy and paste this file into your project.
      

      ### components/ai/audio-player.tsx

```tsx
"use client"

import * as React from "react"
import { Pause as PauseIcon, Play as PlayIcon } from "honestui/icons"

import { cn } from "@/lib/utils"
import { Button } from "@/components/honest-ui/ui/button"

export type AudioPlayerLabels = {
  play: string
  pause: string
  /** The scrub bar's name. */
  seek: string
  /** The scrub bar's value, such as "0:12 of 1:04". */
  position: (current: string, total: string) => string
  /** The speed button's name, such as "Playback speed, 1.5×". */
  speed: (rate: string) => string
  /** Shown when the audio cannot be loaded. */
  error: string
  /** Formats a playback rate, such as 1.5 as "1.5×". */
  rate: (rate: number) => string
}

export const defaultAudioPlayerLabels: AudioPlayerLabels = {
  play: "Play",
  pause: "Pause",
  seek: "Seek",
  position: (current, total) => `${current} of ${total}`,
  speed: (rate) => `Playback speed, ${rate}`,
  error: "This audio could not be loaded.",
  rate: (rate) => `${rate}×`,
}

/** Formats seconds as m:ss, or h:mm:ss from an hour. */
export function formatAudioTime(seconds: number) {
  const total = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0
  const h = Math.floor(total / 3600)
  const m = Math.floor((total % 3600) / 60)
  const s = String(total % 60).padStart(2, "0")
  return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${s}` : `${m}:${s}`
}

export type AudioPlayerProps = Omit<React.ComponentProps<"div">, "children" | "title"> & {
  /**
   * A file to play. The player owns an `<audio>` element for it. Leave it out
   * to drive the player yourself with `currentTime`, `duration`, and `playing`.
   */
  src?: string
  /** A line above the scrub bar, such as the recording's name. */
  title?: React.ReactNode
  /** Loudness from 0 to 1 across the file, drawn as the scrub bar. Without it, the bar is plain. */
  peaks?: number[]
  /** Seconds played. Controls the position when there is no `src`. */
  currentTime?: number
  /** Length in seconds. Required when there is no `src`; read from the file otherwise. */
  duration?: number
  /** Whether it is playing. Controls play and pause when there is no `src`. */
  playing?: boolean
  onPlayingChange?: (playing: boolean) => void
  /** Called with the new position in seconds when the person scrubs or seeks. */
  onSeek?: (seconds: number) => void
  /** Called as the owned `<audio>` element plays. */
  onTimeUpdate?: (seconds: number) => void
  playbackRate?: number
  onPlaybackRateChange?: (rate: number) => void
  /** The speeds the speed button steps through, in order. */
  rates?: number[]
  /** Seconds moved by the arrow keys. */
  step?: number
  labels?: Partial<AudioPlayerLabels>
}

const DEFAULT_RATES = [1, 1.25, 1.5, 2, 0.75]
const MAX_BARS = 96

/** Reduces peaks to at most `count` bars, keeping each bucket's loudest value. */
function resample(peaks: number[], count: number) {
  if (peaks.length <= count) return peaks.map(clamp01)
  const out: number[] = []
  const size = peaks.length / count
  for (let i = 0; i < count; i += 1) {
    let max = 0
    for (let j = Math.floor(i * size); j < Math.floor((i + 1) * size); j += 1) max = Math.max(max, peaks[j] ?? 0)
    out.push(clamp01(max))
  }
  return out
}

const clamp01 = (value: number) => (Number.isFinite(value) ? Math.min(Math.max(value, 0), 1) : 0)

/**
 * A compact player for a recording or a spoken reply: play and pause, a scrub
 * bar drawn from the file's loudness, the time, and the speed.
 */
function AudioPlayer({
  src,
  title,
  peaks,
  currentTime: currentTimeProp,
  duration: durationProp,
  playing: playingProp,
  onPlayingChange,
  onSeek,
  onTimeUpdate,
  playbackRate: rateProp,
  onPlaybackRateChange,
  rates = DEFAULT_RATES,
  step = 5,
  labels: labelsProp,
  className,
  ...props
}: AudioPlayerProps) {
  const labels = { ...defaultAudioPlayerLabels, ...labelsProp }
  const owned = src != null
  const audioRef = React.useRef<HTMLAudioElement>(null)

  const [ownTime, setOwnTime] = React.useState(0)
  const [ownDuration, setOwnDuration] = React.useState(0)
  const [ownPlaying, setOwnPlaying] = React.useState(false)
  const [ownRate, setOwnRate] = React.useState(1)
  const [failed, setFailed] = React.useState(false)
  const [scrubTime, setScrubTime] = React.useState<number | null>(null)

  const duration = owned ? ownDuration || (durationProp ?? 0) : (durationProp ?? 0)
  const time = scrubTime ?? (owned ? ownTime : (currentTimeProp ?? 0))
  const playing = owned ? ownPlaying : (playingProp ?? false)
  const rate = rateProp ?? ownRate
  const ratio = duration > 0 ? Math.min(Math.max(time / duration, 0), 1) : 0

  // A new file starts from the beginning, with any old error cleared.
  const [loadedSrc, setLoadedSrc] = React.useState(src)
  if (src !== loadedSrc) {
    setLoadedSrc(src)
    setFailed(false)
    setOwnTime(0)
    setOwnPlaying(false)
  }

  React.useEffect(() => {
    if (audioRef.current) audioRef.current.playbackRate = rate
  }, [rate, src])

  const setPlaying = (next: boolean) => {
    const audio = audioRef.current
    if (owned && audio) {
      if (next) audio.play().catch(() => setOwnPlaying(false))
      else audio.pause()
    }
    onPlayingChange?.(next)
  }

  const seek = (seconds: number) => {
    const next = Math.min(Math.max(seconds, 0), duration || 0)
    if (owned && audioRef.current) {
      audioRef.current.currentTime = next
      setOwnTime(next)
    }
    onSeek?.(next)
  }

  const cycleRate = () => {
    const index = rates.indexOf(rate)
    const next = rates[(index + 1) % rates.length] ?? 1
    setOwnRate(next)
    onPlaybackRateChange?.(next)
  }

  // Scrubbing: the position follows the pointer and is committed on release.
  const trackRef = React.useRef<HTMLDivElement>(null)
  const timeAt = (clientX: number) => {
    const rect = trackRef.current?.getBoundingClientRect()
    if (!rect || rect.width === 0) return 0
    return Math.min(Math.max((clientX - rect.left) / rect.width, 0), 1) * duration
  }
  const onPointerDown = (event: React.PointerEvent<HTMLDivElement>) => {
    if (event.button !== 0 || duration <= 0) return
    event.currentTarget.setPointerCapture(event.pointerId)
    event.currentTarget.focus()
    setScrubTime(timeAt(event.clientX))
  }
  const onPointerMove = (event: React.PointerEvent<HTMLDivElement>) => {
    if (scrubTime === null) return
    setScrubTime(timeAt(event.clientX))
  }
  const onPointerUp = (event: React.PointerEvent<HTMLDivElement>) => {
    if (scrubTime === null) return
    seek(timeAt(event.clientX))
    setScrubTime(null)
  }

  const onSliderKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
    const keys: Record<string, () => void> = {
      ArrowRight: () => seek(time + step),
      ArrowUp: () => seek(time + step),
      ArrowLeft: () => seek(time - step),
      ArrowDown: () => seek(time - step),
      PageUp: () => seek(time + duration / 10),
      PageDown: () => seek(time - duration / 10),
      Home: () => seek(0),
      End: () => seek(duration),
      " ": () => setPlaying(!playing),
    }
    const action = keys[event.key]
    if (!action) return
    event.preventDefault()
    action()
  }

  const bars = React.useMemo(() => (peaks && peaks.length > 0 ? resample(peaks, MAX_BARS) : null), [peaks])
  const current = formatAudioTime(time)
  const total = formatAudioTime(duration)

  return (
    <div
      data-slot="audio-player"
      data-playing={playing ? "" : undefined}
      className={cn(
        "flex w-full min-w-0 items-center gap-[var(--hui-space-4)] rounded-[var(--hui-radius-4)] border-[0.5px] border-[var(--hui-color-border-base-primary)] bg-[var(--hui-color-background-base-primary)] py-[var(--hui-space-3)] ps-[var(--hui-space-3)] pe-[var(--hui-space-4)] shadow-[var(--hui-shadow-feather)]",
        className
      )}
      {...props}
    >
      {owned ? (
        <audio
          ref={audioRef}
          src={src}
          preload="metadata"
          onLoadedMetadata={(event) => setOwnDuration(event.currentTarget.duration)}
          onDurationChange={(event) => setOwnDuration(event.currentTarget.duration)}
          onTimeUpdate={(event) => {
            setOwnTime(event.currentTarget.currentTime)
            onTimeUpdate?.(event.currentTarget.currentTime)
          }}
          onPlay={() => setOwnPlaying(true)}
          onPause={() => setOwnPlaying(false)}
          onEnded={() => {
            setOwnPlaying(false)
            onPlayingChange?.(false)
          }}
          onError={() => setFailed(true)}
        />
      ) : null}

      <Button
        data-slot="audio-player-toggle"
        variant="secondary"
        size="icon"
        className="shrink-0 rounded-full"
        aria-label={playing ? labels.pause : labels.play}
        disabled={failed || (!owned && duration <= 0)}
        onClick={() => setPlaying(!playing)}
      >
        {playing ? <PauseIcon aria-hidden="true" /> : <PlayIcon aria-hidden="true" />}
      </Button>

      <div className="flex min-w-0 flex-1 flex-col gap-[var(--hui-space-1)]">
        {title ? (
          <p
            data-slot="audio-player-title"
            className="m-0 truncate text-[var(--hui-color-foreground-base-primary)] [font-size:var(--hui-font-size-regular)] [font-weight:var(--hui-font-weight-medium)] [line-height:20px]"
          >
            {title}
          </p>
        ) : null}
        {failed ? (
          <p
            role="alert"
            className="m-0 text-[var(--hui-color-foreground-danger-primary)] [font-size:var(--hui-font-size-small)]"
          >
            {labels.error}
          </p>
        ) : (
          <div
            ref={trackRef}
            data-slot="audio-player-scrub"
            role="slider"
            tabIndex={duration > 0 ? 0 : -1}
            aria-label={labels.seek}
            aria-valuemin={0}
            aria-valuemax={Math.round(duration)}
            aria-valuenow={Math.round(time)}
            aria-valuetext={labels.position(current, total)}
            aria-disabled={duration <= 0 || undefined}
            onKeyDown={onSliderKeyDown}
            onPointerDown={onPointerDown}
            onPointerMove={onPointerMove}
            onPointerUp={onPointerUp}
            onPointerCancel={() => setScrubTime(null)}
            className={cn(
              "group/scrub relative flex w-full cursor-pointer touch-none items-center rounded-[var(--hui-radius-1)] outline-none select-none focus-visible:ring-2 focus-visible:ring-[var(--hui-color-border-accent-primary)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--hui-color-background-base-primary)] aria-disabled:cursor-default",
              bars ? "h-8" : "h-5"
            )}
          >
            {bars ? (
              <Peaks bars={bars} ratio={ratio} />
            ) : (
              <span className="relative h-1 w-full overflow-hidden rounded-full bg-[var(--hui-color-background-neutral-secondary)]">
                <span
                  className="absolute inset-y-0 start-0 rounded-full bg-[var(--hui-color-foreground-base-primary)]"
                  style={{ width: `${ratio * 100}%` }}
                />
              </span>
            )}
            <span
              aria-hidden="true"
              className={cn(
                "pointer-events-none absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-[var(--hui-color-foreground-base-primary)] transition-opacity",
                bars ? "h-full w-[2px] opacity-0 group-hover/scrub:opacity-100 group-focus-visible/scrub:opacity-100" : "size-3"
              )}
              style={{ left: `${ratio * 100}%` }}
            />
          </div>
        )}
      </div>

      <span
        data-slot="audio-player-time"
        className="shrink-0 text-[var(--hui-color-foreground-base-secondary)] [font-size:var(--hui-font-size-small)] tabular-nums"
      >
        <span aria-hidden="true">
          <span className="text-[var(--hui-color-foreground-base-primary)]">{current}</span>
          {" / "}
          {total}
        </span>
        <span className="sr-only">{labels.position(current, total)}</span>
      </span>

      <Button
        data-slot="audio-player-speed"
        variant="ghost"
        size="sm"
        className="min-w-11 shrink-0 tabular-nums"
        aria-label={labels.speed(labels.rate(rate))}
        onClick={cycleRate}
      >
        {labels.rate(rate)}
      </Button>
    </div>
  )
}

/** The scrub bar's waveform: played bars in the text color, the rest muted. */
function Peaks({ bars, ratio }: { bars: number[]; ratio: number }) {
  const played = ratio * bars.length
  return (
    <span aria-hidden="true" data-slot="audio-player-peaks" className="flex size-full items-center gap-[2px]">
      {bars.map((peak, index) => (
        <span
          key={index}
          className={cn(
            "min-w-[1px] flex-1 rounded-full transition-colors duration-150",
            index < played
              ? "bg-[var(--hui-color-foreground-base-primary)]"
              : "bg-[var(--hui-color-background-neutral-tertiary)] opacity-45"
          )}
          style={{ height: `${Math.max(12, peak * 100)}%` }}
        />
      ))}
    </span>
  )
}

export { AudioPlayer }

```

      
        Update the import paths to match your project setup.
      
    
  


## Usage [#usage]

```tsx
import { AudioPlayer } from "@/components/ai/audio-player"

<AudioPlayer src={memo.url} peaks={memo.peaks} title={memo.name} />
```

Controlled, with your own audio clock:

```tsx
<AudioPlayer
  currentTime={time}
  duration={length}
  playing={playing}
  onPlayingChange={setPlaying}
  onSeek={seekTo}
/>
```

## Examples [#examples]

### Plain scrub bar [#plain-scrub-bar]

A controlled player without peaks. A timer stands in for the audio clock.

```tsx
"use client"

import * as React from "react"

import { AudioPlayer } from "@/components/ai/audio-player"

const DURATION = 95

/**
 * No audio plays. The player is controlled, and a timer stands in for the
 * audio clock, so the plain scrub bar has something to follow.
 */
export function AudioPlayerPlain() {
  const [time, setTime] = React.useState(12)
  const [playing, setPlaying] = React.useState(false)
  const [rate, setRate] = React.useState(1)

  const timeRef = React.useRef(time)
  React.useEffect(() => {
    timeRef.current = time
  }, [time])

  React.useEffect(() => {
    if (!playing) return
    let last = performance.now()
    const id = window.setInterval(() => {
      const now = performance.now()
      const next = Math.min(DURATION, timeRef.current + ((now - last) / 1000) * rate)
      last = now
      setTime(next)
      if (next >= DURATION) setPlaying(false)
    }, 100)
    return () => window.clearInterval(id)
  }, [playing, rate])

  return (
    <div className="w-full max-w-[26rem]">
      <AudioPlayer
        currentTime={time}
        duration={DURATION}
        playing={playing}
        onPlayingChange={(next) => {
          if (next && time >= DURATION) setTime(0)
          setPlaying(next)
        }}
        onSeek={setTime}
        playbackRate={rate}
        onPlaybackRateChange={setRate}
      />
    </div>
  )
}

```

## API reference [#api-reference]

### AudioPlayer [#audioplayer]

Accepts native div props beyond those listed.

| Prop                   | Type                         | Default                   | Description                                                                |
| ---------------------- | ---------------------------- | ------------------------- | -------------------------------------------------------------------------- |
| `src`                  | string                       | None                      | A file to play in an owned `<audio>` element.                              |
| `title`                | ReactNode                    | None                      | A line above the scrub bar.                                                |
| `peaks`                | `number[]`                   | None                      | Loudness from 0 to 1 across the file.                                      |
| `currentTime`          | number                       | `0`                       | Seconds played, when there is no `src`.                                    |
| `duration`             | number                       | `0`                       | Length in seconds, when there is no `src`.                                 |
| `playing`              | boolean                      | `false`                   | Whether it plays, when there is no `src`.                                  |
| `onPlayingChange`      | `(playing: boolean) => void` | None                      | Called on play, pause, and end.                                            |
| `onSeek`               | `(seconds: number) => void`  | None                      | Called with the new position.                                              |
| `onTimeUpdate`         | `(seconds: number) => void`  | None                      | Called as the owned element plays.                                         |
| `playbackRate`         | number                       | `1`                       | The speed.                                                                 |
| `onPlaybackRateChange` | `(rate: number) => void`     | None                      | Called when the speed button is pressed.                                   |
| `rates`                | `number[]`                   | `[1, 1.25, 1.5, 2, 0.75]` | The speeds, in order.                                                      |
| `step`                 | number                       | `5`                       | Seconds moved by the arrow keys.                                           |
| `labels`               | `Partial<AudioPlayerLabels>` | English                   | Button names, the slider's name and value, the error, and the rate format. |

### Other exports [#other-exports]

| Export              | Shape                                                          |
| ------------------- | -------------------------------------------------------------- |
| `formatAudioTime`   | `(seconds: number) => string`, such as `"1:04"` or `"1:02:09"` |
| `AudioPlayerLabels` | `play`, `pause`, `seek`, `position`, `speed`, `error`, `rate`  |
