FrameworkStyle

time-slider

A slider component for seeking through media content

Features

  • Supports both horizontal and vertical orientations
  • Displays current playback position
  • Shows preview position on hover
  • Keyboard accessible (Arrow keys for seeking)
  • Touch-friendly drag interaction

Example

<media-time-slider orientation="horizontal">
  <media-time-slider-track>
    <media-time-slider-progress></media-time-slider-progress>
    <media-time-slider-pointer></media-time-slider-pointer>
  </media-time-slider-track>
  <media-time-slider-thumb></media-time-slider-thumb>
</media-time-slider>

Data Attributes

The TimeSlider automatically sets data attributes:

  • data-orientation - Current orientation (‘horizontal’ or ‘vertical’)
  • data-current-time - Current playback time in seconds
  • data-duration - Total media duration in seconds

Use these attributes for state-based styling in your CSS.

CSS Variables

The component exposes CSS variables for positioning:

  • --slider-fill - Percentage of progress (0-100%)
  • --slider-pointer - Percentage of pointer position (0-100%)

Accessibility

  • Includes proper ARIA role (slider)
  • Keyboard accessible (Arrow keys, Home, End)
  • Screen reader announcements for time values
  • Proper aria-valuemin, aria-valuemax, aria-valuenow attributes
VideoJS