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.

ts
import {useMediaPlaybackTime} from '@astryxdesign/lab'

Returns

FieldTypeDescription
timenumber

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.
bash
npx shadcn@4.19.0 add https://astryx-o5vkh4r2r-fbopensource.vercel.app/shadcn/hooks/lab/use-media-playback-time.json