Limeplay - Open Source Video Player UI ComponentsLimeplay

Timeline Control

Composable seek slider for media playback position.

Installation

npx shadcn add @limeplay/timeline-control

Requires timelineFeature registered in your createMediaKit.

Usage

components/player/timeline-slider.tsx
import * as TimelineSlider from "@/components/limeplay/timeline-control"
import { Duration, HoverTime } from "@/components/limeplay/timeline-labels"

export function TimelineSliderControl() {
  return (
    <div className="relative w-full grow">
      <TimelineSlider.Root className="h-1 rounded-full focus-area -focus-area-x-2 -focus-area-y-14">
        <TimelineSlider.Track className="overflow-hidden rounded-full">
          <TimelineSlider.Progress />
          <TimelineSlider.Buffered variant="combined" />
        </TimelineSlider.Track>
        <TimelineSlider.Thumb
          showWithHover
          className="absolute h-8 w-px rounded-full bg-primary/60"
        />
        <TimelineSlider.Thumb
          showWithHover
          className="top-auto! bottom-[calc(100%+16px)] flex h-auto w-fit bg-transparent text-xs font-medium"
        >
          <HoverTime />
          <Duration className="text-primary/60" />
        </TimelineSlider.Thumb>
      </TimelineSlider.Root>
    </div>
  )
}

Live Stream Support

Timeline automatically handles live streams — it uses Shaka Player's seekRange() for DVR seeking, displays live latency, and adjusts progress calculation for the sliding window.

Accessibility

  • ARIA slider with aria-label="Timeline Slider"
  • Keyboard navigation (arrow keys)
  • Screen reader announces time changes
  • Visual focus indicators

Components

Root

Main slider container with click/drag seek handling. Height is controlled via --lp-timeline-track-height CSS variable.

Prop

Type

Thumb

Positioned indicator via --lp-timeline-thumb-position CSS variable. All visual styles must be provided by the consumer.

Prop

Type

Buffered

Displays buffered ranges. Supports 3 variants: default, combined, from-zero.

Prop

Type

Track

Visual track representing full duration. Provides structural layout with bg-foreground/20 background.

Progress

Filled indicator showing current playback progress.

On this page