FrameworkStyle

media-buffering-indicator

A component that displays a loading indicator when media is buffering

Anatomy

<media-buffering-indicator></media-buffering-indicator>

Behavior

Shows a loading indicator when the media is waiting to buffer and not paused, but only after a configurable delay (default 500ms). This delay prevents the indicator from flickering during brief stalls. The indicator hides immediately when buffering ends.

Styling

Hide and show the indicator based on the data-visible attribute.

Examples

Basic Usage

<video-player class="html-buffering-indicator-basic">
    <video
        src="https://stream.mux.com/lhnU49l1VGi3zrTAZhDm9LUUxSjpaPW9BL4jY25Kwo4/highest.mp4"
        autoplay
        muted
        playsinline
        loop
    ></video>
    <media-buffering-indicator class="html-buffering-indicator-basic__overlay">
        <div class="html-buffering-indicator-basic__spinner"></div>
    </media-buffering-indicator>
</video-player>

API Reference

Props

Prop Type Default
delay number 500

State

State is reflected as data attributes for CSS styling.

Property Type
visible boolean

Data attributes

Attribute Description
data-visible Present when the buffering indicator is visible (after delay).
VideoJS