Skip to content

Skip UI API improvements #1362

@defagos

Description

@defagos

As a developer integrating Pillarbox I don't understand why I must explicitly subscribe to time progress and stream type to decide which kind of skip/skip to default is actually allowed. The API does not make this obvious without looking at implementation details.

Hints

The stream type and time progress are not intrinsic player properties that are automatically observed. Unless we change this behavior (but we should then likely choose an arbitrary intrinsic time update interval, e.g. 1 second), there is nothing we can/should do at the Player level.

One possibility to improve our API would be to introduce a SkipManager (SkipTracker is already used and would possibly need a rebranding, or maybe we could merge all skip behaviors into the current SkipTracker) that automatically publishes updates depending on stream type and time observation (possibly customizable, with likely default of 1 second).

The challenge is then discoverability, since if we keep a skip API on the player users might bypass this object and try to use skip methods from the player directly, without proper observation. Hiding the skip API from Player public API would be a possibility, but would it be a good one? After all, we have a ProgressTracker and seek APIs available from the player.

Acceptance criteria

  • Unclear time observations have disappeared from our demo implementation. Implementing skips is simple and straightforward.
  • The documentation/tutorials have been updated.

Tasks

  • ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions