Video Player

A component to playback the video content. It lazy loads native video or iframe depending on video source, and shows image preview when it's not loaded.

MDC
::div
  :video-player{src="https://www.youtube.com/watch?v=o9e12WbKrd8"}
::

Props

PropsTypeDefaultDescription
posterString''Preview image, that showed instead of lazy loaded video or iframe
srcString''A source of the video
sourcesArray[]Multiple src used for video source tags
autoplayBooleanfalseWIP: Automatic playback for video. Adds attribute in case of video tag or query parameter into YouTube URL.

Design Tokens

tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
  elements: {
    videoPlayer: {
      marginY: '{space.8}',
      backgroundColor: '{color.gray.900}',
      borderRadius: '{radii.sm}',
    },
  }
})