BloksOrganismVideo Ends With Section

Video Ends With Section

Description

The Video Ends With Section component is a sophisticated video integration that creates an engaging scroll-based video experience. It plays a video in sync with the user's scroll position and smoothly transitions to content as the user scrolls further. This component is ideal for creating visually captivating introductions or section breaks in a webpage.

Installation

bash
sabaccui add videoEndsWithSection

Usage

Here's an example of how to use the Video Ends With Section component in a Storyblok block:

Preview

Welcome to our product

Discover the features that make our product unique

Schema

FieldTypeDescriptionDefault
videoassetThe video file to be played. Only accepts video files. Required.None
durationnumberThe duration of the video in seconds. Used to calculate scroll-based playback.None
contentbloksAn array of Storyblok components to be displayed after the video section.None

This component does not have any directly related components.

Notes

  1. The component uses a canvas element to render video frames for smoother playback and better performance.
  2. Video playback is controlled by scroll position, creating a unique interactive experience.
  3. The component calculates frame rate and manages frame transitions for optimal performance.
  4. Content opacity is managed to create a smooth transition from video to content.

Best Practices:

  • Ensure the video file is optimized for web playback to minimize loading times.
  • Keep the video duration reasonable to maintain user engagement.
  • Use high-quality, visually appealing video content that complements the following content section.