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

Create media session UI and fix player notification #8678

Merged
merged 11 commits into from
Aug 25, 2022

Commits on Aug 25, 2022

  1. Create MediaSessionPlayerUi

    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    c054ea0 View commit details
    Browse the repository at this point in the history
  2. Remove useless MediaSessionCallback

    The player is now passed directly, it made no sense to wrap around it in a callback that was not really a callback but rather, actually, a wrapper.
    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    bc33322 View commit details
    Browse the repository at this point in the history
  3. Fix thumbnail sometimes not set to media session metadata

    The thumbnail was not being updated in the media session metadata after it was loaded, since there was no metadata update in that case, only a notification update.
    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    3cc43e9 View commit details
    Browse the repository at this point in the history
  4. Fix sometimes seeing outdated thumbnail in notification

    Before the thumbnail finishes loading for the new video the player is now playing, the old thumbnail was being used, leading to wrong thumbnails set in the media session and the notification.
    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    f3a9b81 View commit details
    Browse the repository at this point in the history
  5. Even when thumbnails should not be shown, set it to null in notification

    This makes sure the thumbnail is removed from the notification if the user disables thumbnails
    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    d73ca41 View commit details
    Browse the repository at this point in the history
  6. Remove useless checks before updating metadata

    A while ago NewPipe called the metadata update function very often, so checks were needed to ensure not wasting time updating metadata if it were already up to date. Now, instead, the metadata update function is called exactly when needed, i.e. when metadata changes, so such checks are not needed anymore (and were probably also a little resource-heavy).
    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    8bff445 View commit details
    Browse the repository at this point in the history
  7. Let exoplayer decide when to update metadata

    Though still make sure metadata is updated after the thumbnail is loaded.
    This fixes the wrong seekbar properties (duration and current position) being shown in the notification sometimes.
    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    f80d1dc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    11bd236 View commit details
    Browse the repository at this point in the history
  9. Keep strong reference to Picasso thumbnail loading target

    Before the Target would sometimes be garbage collected before being called with the loaded thumbnail, since Picasso holds weak references to targets
    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    510efaa View commit details
    Browse the repository at this point in the history
  10. Review suggestions

    Stypox authored and litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    973a966 View commit details
    Browse the repository at this point in the history
  11. Fixed sonar detected problems

    + Automatically fixed code style (imports)
    litetex committed Aug 25, 2022
    Configuration menu
    Copy the full SHA
    59d1ded View commit details
    Browse the repository at this point in the history