Features

Scrolling & viewport

What happens as a player scrolls in and out of view - playInView auto-play, and corner pinning.

A player that leaves the viewport auto-pauses by default. Two props change that:

PropEntering viewLeaving view
(neither)NothingAuto-pauses
playInViewAuto-plays, mutedAuto-pauses
pinNothingPins to a corner and keeps playing

playInView suits a feed you scroll through; pin suits a single video you want to keep watching while reading on.

playInView - feeds

Auto-plays once at least half the player is visible (see playInViewRatio below), auto-pauses once it isn't, and plays again each time it scrolls back in. A video the viewer paused, or one that has ended, stays paused until they play it again - see playInView for the muting and lazy-placeholder details.

<VideoCard src="..." play-in-view />

To wait for more of the player first, set playInViewRatio (0.5 by default). 1 waits until all of it is on screen; a player too big to fit, such as a tall portrait video on a short screen, plays once it fills as much of the screen as it can.

<VideoCard src="..." play-in-view :play-in-view-ratio="1" />

Loading player…

Scroll this in and out of view - it starts and pauses itself, muted.

The pattern it exists for is a TikTok-style vertical feed - each slide a bare VideoPlayer with a HUD built from the headless controls:

<VideoPlayer v-bind="video" :controls="false" :muted="globalMuted" play-in-view @state-change="onStateChange" />

<Buffering :player="playerRef" />
<MuteButton :player="playerRef" />
<PlayButton :player="playerRef" />
<Scrubber :player="playerRef" />

pin - mini-player

Swaps auto-pause for YouTube-style pinning: once it scrolls out of view while playing, it pins to that corner and keeps going, with a dismiss button. Like a mini-player, pausing it while pinned doesn't dismiss it - it stays until scrolled back into view or dismissed.

<VideoCard src="..." muted pin="bottom-left" />

Loading player…

Press play, then scroll past it - the player pins to the bottom-left instead of pausing.

bottom-right, bottom-left, top-right and top-left are supported. A pinned box can cover content lower on the page - HideMarker tucks it away while a given section is in view, and --ml-video-radius sets its corner radius.

VideoStage does the same thing for a whole playlist, minifying to a corner pip rather than pinning the card itself.

munsonlabs · MIT licensed · © 2026