Skip to main content

Video

The <Video> component is a drop-in replacement for the <video> tag. This can be used to use static videos inside interactive ones. The syntax is:

import {Video} from "liqvid";

<Video>
<source src={`video.webm`} type="video/webm"/>
<source src={`video.mp4`} type="video/mp4"/>
</Video>

Props

This component accepts the following props. Any additional props or children will be forwarded to the underlying <video> element.

obstructCanPlay

If true, prevents Player.canPlay from resolving until the underlying <video> element can play.

obstructCanPlay?: boolean = false;

obstructCanPlayThrough

If true, prevents Player.canPlayThrough from resolving until the underlying <video> element can play through.

obstructCanPlayThrough?: boolean = false;

start

Time in milliseconds when the video should start playing.

start?: number = 0;

Example

Here we demonstrate adding popups over a static video.

  • Refresh