Skip to content
react-wrapped

Player

The player package is everything around the frame: the video with its transport, a timeline that is also the editor, a dialog for one scene's words and transition, the settings panel, the frame shown while a year loads, and the function that turns the video into an MP4. Use WrappedPlayer alone to play a video, and add the rest when the viewer should change it.

Nothing measured yet.

The player, with five buttons of our own driving it.

Installation

bash
pnpm add @react-wrapped/player @react-wrapped/core gsap

Load the two stylesheets once, core first:

tsx
import "@react-wrapped/core/styles.css";
import "@react-wrapped/player/styles.css";

What is in it

How the pieces talk

  • One config. Everything a viewer can change is a WrappedConfig. The settings panel, the timeline and the scene editor each hand you the next one, and you pass it back down.
  • Scenes in, scenes filtered. You give the player only the scenes that play. The timeline gets all of them, so a switched-off scene can be switched back on.
  • One handle. ref on the player gives play, pause, seek and the rest. The MP4 is made through the same handle.

WrappedView in the kit wires all of this for you. Build the page from parts does the same wiring by hand.

Last updated . Read this page as Markdown.