-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 surface view not resizing video correctly + other player fixes #8731
Fix surface view not resizing video correctly + other player fixes #8731
Conversation
e1ccb2b
to
c4ca76f
Compare
c4ca76f
to
5e094ab
Compare
This pull request definitely fixes #8170 (comment), but has introduced a regression in the screen rotation animation. This regression is new to this pull and not previously seen in #8170. As you can see in the videos below, the animation now has some artifacts while rotating and briefly fades to black before showing the video. As a result the animation looks choppy and the fade to black before showing the video is perceptible as an unpleasant flash. Animation after #8731: After8731.mp4Animation before: Before8731.mp4 |
Crash. Same STR as #8678 (comment), but different error, interestingly: Exception
Crash log
|
Also seeing the choppy animation PJanksy mentions above. |
|
I pushed 8b7c785 to fix the choppy animation, can you confirm that it is fixed @PJansky @opusforlife2? For comparison, here is a video showing the behavior before fixing (5e094ab), the behavior in v0.23.2 and the behavior after the fix (8b7c785). I couldn't reproduce better than in the video on the left 😅. |
Originally posted by @opusforlife2 in #8678 (comment)
Here's possibly another. <3 Rough STR (might not work):
Tested on 2 devices, so fully reproducible. Doesn't occur on 0.23.1. Exception
Crash log
|
8b7c785
to
6833678
Compare
@opusforlife2 actually, the bug reported in #8731 (comment) (I moved the comment here) has an even simpler STR: just open a video and tap on the thumbnail before the video details can load. Anyway, I fixed it as you said, i.e. by ignoring any click on the thumbnail when nothing has loaded yet. I tried to go deeper and understand the causes of the problem, and actually understood them, but they depend on the value of |
6833678
to
dd995a2
Compare
Oh wow you found it! So my past self did report the crash in time, and is not as silly as I thought.
Okay, so then this PR is only blocked on the choppy animation problem. I'll test that just now. Edit: I just realised this build is pre 0.23.3-hotfix code. I'll wait for an updated build, then. |
Triggered a new build @opusforlife2 |
Eh? Don't you need to rebase to include the hotfixed code? Edit: The APK didn't work. I've rerun the APK build manually. Edit 2: The rebuilt APK doesn't work either. The version is still showing as 0.23.2 too. Since master has been merged back into dev, shouldn't it show 0.23.3? Edit 3: I give up. As a last resort, I tried rerunning all the jobs, wildly guessing that some sort of cache might be in need of clearing or something. Nope. No luck. |
Also fix yet another random null pointer exception that could happen when adding the video player view
dd995a2
to
f9994ab
Compare
I'm stupid, sorry, now I have rebased |
Kudos, SonarCloud Quality Gate passed! |
Okay, so, if compared with the current release, there is a noticeable lag between the rotations. The choppiness is gone. But the black screen remains for longer than on the current release. However, since users will only be rotating roughly once per video and won't be comparing builds like I am, you could consider this a non-issue. Edit: Oh wait, this might just be debug build vs release build jank. |
I am merging this PR even though it didn't receive reviews yet because it needs to be included in the release, and also because both me and opus tested and it seems to work. @litetex you can always review later ;-) |
There's still time while the RC bakes, after all. |
What is it?
Description of the changes in your PR
The surface view is the view that contains the playing video, on which exoplayer draws. Its height was never being initialized, leaving it to 0, so the view did not have enough information to respect the video aspect ratio (which instead was being set correctly), leading to #8170 (comment). The height was never being set because the code tried to set it when the surface view hadn't been initialized yet. Now the height-setup is
post
ed to aHandler
, this way the player initialization completes (creating the surface view) and then the height is initialized.This PR should also fix #8678 (comment), since now all
null
checks are done inside the lambdapost
ed to the main thread loop. See the comments.Before/After Screenshots/Screen Record
Fixes the following issue(s)
Fixes #8170 (comment)
Also fixes #8678 (comment)
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