AppMediaPlayer
A native <video> or <audio> with VueTail controls: play and pause, a scrubber (AppSlider) that reads "1 minute 5 seconds of 3 minutes", volume and mute, a speed menu (AppDropdownMenu), captions, and picture-in-picture and full screen for video where the browser has them. Every control is a named button. While focus is inside the player, Space or K plays and pauses, J and L skip back and ahead, M mutes, F goes full screen and C toggles captions; the keys do nothing anywhere else on the page. A buffering spinner appears only after a short wait, and a long stall is said once. Under reduced motion autoplay is ignored.
Install: pnpm add-component AppMediaPlayer
Video with captions
Tab to a control, or click the picture, then try the keys: Space or K, J and L, M, F, C. The scrubber is a native range, so its arrows move a second and Home and End jump to either end. The clip, poster and captions are files in these docs, so the demo works offline.
Audio
The same bar without the picture. Narrow players drop the volume slider and keep Mute.
Speeds, seek step and events
Three speeds, five-second skips, and the play, pause and ended events.
API
src(string | MediaFile[]): One URL, or the same media in several formats ({ src, type }); the browser plays the first it can.kind('video' | 'audio'): Audio is the control bar alone: no picture, captions, full screen or picture-in-picture.label(string): The accessible name of the player group. Name it for the media ("Product tour").poster(string): Image shown before the video plays.tracks(MediaTrack[]): Captions or subtitles: { src, srclang, label, kind?, default? }. One track gets a toggle button; several get a menu with Off.rates(number[]): Speeds in the speed menu. One value, or none, hides the menu.preload('none' | 'metadata' | 'auto'): Passed to the media element.autoplay(boolean): Starts muted once mounted. Ignored under reduced motion.loop(boolean): Starts again at the end.seekStep(number): Seconds that J and L move.crossorigin('anonymous' | 'use-credentials'): For media and caption files on another origin.