Features

Stage & playlists

VideoStage - a sticky, full-width player fed by cards on the page, with playlist navigation and auto-advance.

VideoStage is a sticky, full-width player fed by any VideoCard on the page. There's only ever one per page.

Cards reach it over window events rather than props, which is what lets a card anywhere on the page - inside an article, a sidebar, a grid - take over the stage without being wired to it.

Loading stage…

One stage, three cards. Click any card and it plays up in the stage rather than in place. Start something, then scroll the stage out of view - it minifies to a corner and keeps playing. The third entry is a YouTube embed, on the same stage as the two HLS streams.

Playlists

Pass playlist - an array of the same props each card takes - and the stage tracks the current video's position within it:

<script setup>
import { VideoStage, VideoCard } from '@munsonlabs/video-player'

const videos = [
  { src: 'https://www.youtube.com/watch?v=UnktCDi-BVs', label: 'Oh my gah!' },
  { src: 'https://vimeo.com/347119375', label: 'Tears of Steel' },
]
</script>

<template>
  <VideoStage :playlist="videos" />
  <VideoCard v-for="video in videos" :key="video.src" v-bind="video" />
</template>

Playlist entries take everything a VideoCard does - ad tags, tracks, poster, payload.

A template ref (or the element itself) exposes playNext(), playPrevious(), hasNext and hasPrevious:

<VideoStage ref="stage" :playlist="videos" />
<button :disabled="!stage?.hasNext" @click="stage.playNext()">Next</button>

Skipping carries the outgoing video's mute and volume forward rather than following the shared preference.

Auto-advance to the next entry on ended is built in, persisted per browser and toggled from the controls popup's "Auto" button - there's no prop for it.

Stage-specific events

stageopen and stageclose arrive on the usual state-change stream when the stage mounts its inner player (the first video arrives) and when it tears it down again.

With a stage on the page, a VideoCard hands playback off entirely: togglePlay() selects or toggles that video on the stage, and its other control methods become no-ops, since the stage owns the player.
munsonlabs · MIT licensed · © 2026