0.0.2

Video Loader

Configure or disable the loading indicator shown during video buffering.

Video loader displays a spinner while the video is buffering or loading. It appears automatically when the video enters a waiting state and disappears once playback resumes — no manual control needed. Pass false to remove it if you prefer no loading indicator.

Config

PropertyTypeDescription
customClassesPartial<ScenaVideoLoaderComponentClasses>Custom CSS classes
customStylesPartial<ScenaVideoLoaderComponentStyles>Custom inline styles

Example

await scena.mount({
  video: { src: '/video.mp4' },
  videoLoader: {
    customClasses: {
      root: 'my-loader-wrapper',
    },
  },
});

Disabling

Pass false to remove the loader. The video will still buffer, but no visual indicator is shown:

await scena.mount({
  video: { src: '/video.mp4' },
  videoLoader: false,
});

Customization

The loader accepts root and loader as target keys:

await scena.mount({
  video: { src: '/video.mp4' },
  videoLoader: {
    customStyles: {
      loader: { borderColor: 'rgba(255, 255, 255, 0.3)' },
    },
  },
});

Interface

interface ScenaVideoLoaderProps {
  size: ComponentSize;
  customClasses: Partial<ScenaVideoLoaderComponentClasses>;
  customStyles: Partial<ScenaVideoLoaderComponentStyles>;
}