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

Fix player controls not hiding if resumed from media button #7341

Merged
merged 3 commits into from
Mar 15, 2022

Conversation

ktprograms
Copy link
Contributor

@ktprograms ktprograms commented Nov 1, 2021

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Added hideControls(0, 0) to the Space key pressed and the PlayerMediaSession play method (only if the player is currently playing)

Before/After Screenshots/Screen Record

Before After
Before.mp4
After.mp4

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@AudricV AudricV added bug Issue is related to a bug player Issues related to any player (main, popup and background) labels Nov 1, 2021
TobiGr
TobiGr previously approved these changes Nov 2, 2021
@ktprograms
Copy link
Contributor Author

@litetex Can you please review?

@litetex
Copy link
Member

litetex commented Nov 5, 2021

@ktprograms

I'm currently trying to understand if this is the correct place for hideControls.

But the code who is calling this is a bit complicated:

grafik
(It also pretty annoying that there are zero comments and the code got rewritten in like 10 commits)

Because when e.g. Player#onPaused is called then there is always a call for showControls(400) executed.
However this is not the case in Player#onPlaying but I don't know why.

Copy link

@ImDeadGuy ImDeadGuy left a comment

Choose a reason for hiding this comment

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

Honestly, this bug has been bugging me for months (almost always use BT headphones with the tablet slightly out of reach).
Just want this fix in sooner than later, and I've tested the custom APK in Checks and it works as expected. 👍

@ImDeadGuy ImDeadGuy mentioned this pull request Feb 12, 2022
1 task
@Stypox
Copy link
Member

Stypox commented Feb 24, 2022

@litetex what do you think about my suggestions? If they look good, commit them and then merge and squash (after 0.22.1)

@litetex
Copy link
Member

litetex commented Mar 2, 2022

@Stypox
I think you can try to add them 😄

@ktprograms
Copy link
Contributor Author

@litetex What do you mean?

Should I commit/squash the suggestions?

When not in fullscreen SPACE should be not handled by the player, and hence result in a scroll down
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Stypox Stypox merged commit af89f05 into TeamNewPipe:dev Mar 15, 2022
@Stypox Stypox mentioned this pull request Apr 16, 2022
12 tasks
@ImDeadGuy
Copy link

Hey guys, is this meant to be fixed now in release 23?

Because it's definitely not. Resuming from the BT headset play/pause button still keeps the UI on screen forever.

@AudricV
Copy link
Member

AudricV commented May 15, 2022

It was meant to be fixed, yes, but the latest ExoPlayer update broke the original fix, and a new fix has been provided in the PR linked above: #8315.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background)
Projects
None yet
7 participants