Media | SpinningCover
SpinningCover#
Description#
- Album cover shaped like a vinyl record that spins during playback. Includes a center hole, an optional progress ring around the disc, and an interactive mode that turns it into a button. When no cover is available, the system theme app icon is shown.
Props#
src(string | null) — Cover image path. Ifnullor empty, the icon is shown. Default:null.alt(string) — Alt text for the cover. Default:''.state(PlaybackState) — Playback state. Default:'stopped'.fallbackIcon(string) — Theme icon shown when there is no cover. Default:'applications-multimedia'.period(number) — Seconds per full rotation. Default:8.progress(number | null) — Track progress, from 0 to 100. Without this, no ring is drawn. Default:null.progressLabel(string) — Ring name for screen readers.interactive(boolean) — Turns the disc into a button. Default:false.label(string) — Button name when `interactive``. Required in that case.
Emits#
error— When the cover could not be loaded.click— When the disc is tapped, withinteractive.
Usage#
| |
Notes#
- On pause, the disc freezes at its current angle; without playback (
stopped), it stops. - With
prefers-reduced-motion, the disc does not spin.