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

Add support for "Skip intro"/"Skip credits" #516

Merged
merged 8 commits into from
Apr 30, 2024

Conversation

MGaetan89
Copy link
Member

@MGaetan89 MGaetan89 commented Apr 29, 2024

Pull request

Description

This PR adds new API to be notified when reaching the opening and closing credits.

Changes made

  • Added the PillarboxPlayer.Listener.onTimeIntervalChanged(SkipableTimeInterval?) callback.
  • Added the Player.getCurrentTimeIntervalAsFlow() extension.
  • Added the Player.getTimeIntervals() extension.
  • Added the Player.getTimeIntervalAtPosition(Long) extension`.
  • Added the Player.getCurrentTimeIntervalAsState() extension.
  • Refactor ChaptersTracker to be more generic.

Checklist

  • Your branch has been rebased onto the main branch.
  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).
  • All pull request status checks pass.

@MGaetan89 MGaetan89 linked an issue Apr 29, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Apr 29, 2024

Code Coverage

Overall Project 46.59% -0.66% 🟢
Files changed 37.44% 🟢

Module Coverage
:pillarbox-core-business 85.02% 🟢
:pillarbox-player 47.18% -1.15% 🟢
:pillarbox-ui 0% -0.62% 🟢
Files
Module File Coverage
:pillarbox-core-business SRGAssetLoader.kt 87.04% 🟢
Chapter.kt 54.42% 🟢
:pillarbox-player Asset.kt 100% 🟢
PillarboxSessionCommands.kt 100% 🟢
PillarboxMediaSource.kt 90.94% -0.34% 🟢
Player.kt 90.74% 🟢
PlayerCallbackFlow.kt 78.03% 🟢
PillarboxExoPlayer.kt 77.16% 🟢
PillarboxMediaController.kt 0% -2.33% 🟢
PillarboxMediaSession.kt 0% -10.97% 🟢
PillarboxPlayer.kt 0% 🟢
:pillarbox-ui ComposablePlayer.kt 0% -3.47% 🟢

@StaehliJ StaehliJ enabled auto-merge April 30, 2024 12:48
@StaehliJ StaehliJ added this pull request to the merge queue Apr 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 30, 2024
@StaehliJ StaehliJ added this pull request to the merge queue Apr 30, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 30, 2024
@StaehliJ StaehliJ added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit 893c340 Apr 30, 2024
10 checks passed
@StaehliJ StaehliJ deleted the 497-handle-skip-introcredit branch April 30, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Handle skip intro/credit
2 participants