Use Media Playback TimeCanary · @astryxdesign/lab v0.1.9 · useMediaPlaybackTime Lab · npm install @astryxdesign/lab@canary
Usage
Returns the playback position, advanced on every animation frame while the media plays, so custom progress moves smoothly between the browser’s time updates. Seeks, pauses, and stalls snap it back to the reported time; under reduced motion it follows the time updates only.
tsimport {useMediaPlaybackTime} from '@astryxdesign/lab'
Returns
| Field | Type | Description |
|---|---|---|
| time | number | Playback position in seconds. |
Use with shadcn
Already using the shadcn registry workflow? Install the real Astryx package and a local public re-export. Component implementation source stays in Astryx.
This install URL expires with the draft preview.bashnpx shadcn@4.19.0 add https://astryx-64vrqe5a4-fbopensource.vercel.app/shadcn/hooks/lab/use-media-playback-time.json