Skip to content

[RFC] SeekBar widget #5542

Open
@nununoisy

Description

@nununoisy

This proposal seeks to add a seek bar widget for controlling media playback.

A seek bar is very similar to a slider, but with a few key differences:

  • A seek bar works with duration and not float values.
  • A seek bar's minimum value is always zero.
  • A seek bar's orientation is always horizontal.
  • A seek bar optionally has a separate track region for displaying the buffer health.

Here is the proposed interface for a SeekBar:

  • Properties
    • enabled: (in bool) Seek bar is enabled. Default: true.
    • has-focus: (out bool) Seek bar has focus.
    • value: (in-out duration) Current seek position. Default: 0s.
    • buffer-duration (in duration) Current buffer duration. Default: 0s.
    • total-duration: (in duration) Total content duration, analogous to Slider.maximum. Default: 0s.
  • Callbacks
    • scrubbed(duration): User is scrubbing content, analogous to Slider::changed(float).
    • released(duration): User released seek bar after scrubbing.

The SeekBar implementations can likely wrap SliderBase since the two share so much functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:widgetsImplementation of widgets (from std-widgets.slint) and their styles (mF,bS)rfcRequest for comments: proposals for changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions