Skip to content
Calm motion: animations on this site only fade, with no movement

Lesson video ​

A lesson video with notes at points in time that take you back to that point

Lets a learner watch a lesson and keep notes that link to the right moment. For a video alone, use the video.

Basic
  1. Soft light from the left: no hard shadows.
  2. Slow push in. Try this for the product shot.
  • src, title, and poster set the video. It uses the controls of the browser.
  • captions is a WebVTT file with the captions, and captions-lang is its language. Give captions, so people who cannot hear the lesson can follow it.
  • v-model is the list of notes. Each note has an id, the point at in seconds, and a text.
  • The button under the note box shows the time now, as in "Add a note at 1:23". The notes sort by time.
  • The time of a note is a button. It moves the video to that point and puts the focus on the video.
  • On a narrow screen, the notes go below the video.
  • Change the words with labels or a label pack. The API table lists the keys.

Usage ​

ts
import { BlessLessonVideo } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
src*string—
title*string—
posterstring—
captionsstring—a WebVTT file with the captions
captionsLangstring—
labelsPartial<{ notes: string; write: string; add: (time: string) => string; go: (time: string) => string; remove: (time: string) => string; empty: string; }>—
modelValueBlessVideoNote[][]

Events

NamePayloadDescription
update:modelValue[value: BlessVideoNote[]]

Released under the MIT License. Character names and artwork belong to their owners.