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
| Property | Type | Description |
|---|---|---|
customClasses | Partial<ScenaVideoLoaderComponentClasses> | Custom CSS classes |
customStyles | Partial<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>;
}