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

Improve live edge detection and provide Player extension #505

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

StaehliJ
Copy link
Contributor

Pull request

Description

The goal of this PR is to reduce the live edge detection for livestream. For live with dvr, the current player position is changing every time and it may introduce some bad detection. This PR try to reduce this effect.

If the problem persist for your use case you could try to setup how player handle live with a given item with

    val liveItem = MediaItem.Builder()
        .setLiveConfiguration(MediaItem.LiveConfiguration.Builder()
            .setTargetOffsetMs()
            .setMinOffsetMs()
            .setMaxOffsetMs()
            .build())
        .build()

Changes made

  • Add Player.isAtLiveEdge.

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.

Copy link

github-actions bot commented Apr 18, 2024

Code Coverage

Overall Project 46.59% 🟢
Module Coverage
:pillarbox-player 47.18% 🟢
:pillarbox-ui 0% 🟢
Files
Module File Coverage
:pillarbox-player Player.kt 90.74% 🟢
:pillarbox-ui ComposablePlayer.kt 0% 🟢

@MGaetan89 MGaetan89 added this to the Demo milestone Apr 18, 2024
Copy link
Member

@MGaetan89 MGaetan89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@MGaetan89 MGaetan89 added this pull request to the merge queue Apr 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 18, 2024
@MGaetan89 MGaetan89 added this pull request to the merge queue Apr 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 18, 2024
@MGaetan89 MGaetan89 added this pull request to the merge queue Apr 18, 2024
Merged via the queue into main with commit 7bfecc3 Apr 18, 2024
10 checks passed
@MGaetan89 MGaetan89 deleted the improve-live-edge-detection branch April 18, 2024 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants