Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date support #888

Open
1 task
defagos opened this issue May 16, 2024 · 1 comment
Open
1 task

Date support #888

defagos opened this issue May 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@defagos
Copy link
Member

defagos commented May 16, 2024

As a developer integrating Pillarbox I want to be able to seek to a specific date, provided such information is returned in a stream.

Acceptance criteria

  • Seeking to a date is possible for streams delivering date information.
  • Progress information can be obtained as a date for streams delivering date information.
  • Chapters can be defined with dates if available.
  • The demo displays dates for livestreams when available (similar to the system UI).

Hints

  • Consider AVDateRangeMetadataGroup for navigation markers and possibly.
  • Dates can appear in-on demand streams and livestreams.

Tasks

  • ...
@defagos
Copy link
Member Author

defagos commented May 16, 2024

Some findings:

  • Our on-demand sports streams contains date information.
  • The system UX displays date information only for livestreams, even if available in an on-demand stream (different on tvOS where display can always be toggled between both).
  • Date information is available from AVPlayerItem, not from AVPlayer. Since discontinuities might arise we probably need to use stream date and time information to store a mapping between player time and date, updated when appropriate. This mapping can then be used as reference for calculations since we need to use our seek to time APIs, as seek to date APIs are more limited (tolerances e.g.) and do not support smooth seeking.
  • Seeking to a date before the available range seeks to its beginning. Seeking to a date after the available range does nothing.
  • Calling the seek to date APIs (which we will not directly do in the end, but can be inspiring for our API design) on a stream without date support does nothing.

Some ideas:

  • We can associate Date and TimeRange to a content. Currently CMTimeRange but maybe we should store .time or .date and build ranges accordingly. This is similar to what we did in SRG Media Player but with better API design with the help of labeled enums.
  • We need to update our ProgressTracker API for date handling support as well.

Unlike what we did with SRG Media Player, though, we should not hack date support if the stream does not support it.

@defagos defagos added the enhancement New feature or request label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant