Skip to content

Start time API improvements #1361

@defagos

Description

@defagos

As a developer integrating Pillarbox I want to be able to handle start times in a way similar to other platforms, that means:

  • Define a temporary start index and start time to resume playback at.
  • Define a temporary start time for all items in a playlist.
  • Define an intrinsic start time always always applied to an item of a playlist.

We should also support a start date if possible.

Hints

  • The Apple implementation does not handle scenarios where each item in a playlist must have a different time to resume once from.
  • Maybe we could add a PlayerItem.resume(_:) API that makes it possible to define a temporary time, consumed once applied (and overridden otherwise).
  • This same API could then possibly used to also implement the Player.resume(_:in:) API as well (the remaining implementation being finding the index of the item to resume at).
  • Intrinsic start times associated with player items are already supported (PlaybackConfiguration).

Acceptance criteria

  • The three above scenarios are supported with an ergonomic API.
  • If a temporary start time and an intrinsic start time are defined, the temporary start time wins (only once).
  • Start date APIs are provided if possible.

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