-
-
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
Add option to directly open fullscreen when the main player starts #5459
Conversation
Well, first try: the rotation is quite laggy and jerky. The player first opens in portrait, the video starts loading, and then after some time, the player rotates. This can cause the loading circle to go to a corner until the video appears. Can the player first rotate, and only after that's completed the video starts loading? |
@opusforlife2 I can try, though the player code is so complex that I don't know if I will make it |
Any updates? |
679bc75
to
2aeccc0
Compare
@avently sorry to bother you. Do you have any solution for this? That is, opening the fullscreen player directly?
|
no problem. Add
here before openVideoPlayer: and in other similar methods, for example, when clicking on play/pause in mini player. There is no need to do any huge code changes. Only those you made for additional autoplay option. does it work like you expect? |
0dd4d56
to
55fd94a
Compare
I rebased and implemented what @avently suggested (though some testing is still needed). The fluidity is still not perfect, but it wasn't so even in pre-unified, so I don't think it can be improved much. I also fixed the review by @opusforlife2 |
55fd94a
to
fd68a1e
Compare
Nope, it doesn't. Because there is a check that prevent landscape layouts from advantage to go to fullscreen. So probably you need to specify
To test the changes on large-land you could specify in developer settings of the phone/emulator Device width like 600 |
And maybe to call fullscreenButtonClicked in this case, not sure |
@avently could you please implement it? I wasn't able to reach a solution, I've been trying for two hours and I ran into multiple inconsistent and strange behaviours, but I didn't find a solution working for every situation. |
Ok, i'll look |
@Stypox MUCH better than before, thank you. It's not perfect, like you said, but at least the video only starts after the app goes to full screen, instead of showing a black screen and a distorted player layout, forcing you to rewind the video from the beginning. For reference, the current behaviour is: Tap thumbnail -> App goes into landscape (still on video details) -> The video stream is being fetched -> The moment it starts playing, the player goes into full screen. Intended perfect behaviour (IMO): Tap thumbnail -> App goes into landscape AND player goes into full screen -> The video stream is being fetched -> The video starts playing. (Similar to 0.19.x behaviour). |
@Stypox Incidentally, the ripple animation when tapping on the thumbnail is gone, leaving no visual feedback of the tapping action. Intentional? |
Thank you, and sorry again for bothering you ;-)
No, that's probably just another random bug caused by the messiness of the code |
Remove
Here NewPipe/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java Line 2030 in fd68a1e
Ane look at the result And the app will be in fullscreen right after orientation change. Instead of removing this immediate fullscreen can be turned on for those who have autofullscreen enabled instead of everyone
No, that's because you're forcing activity to change the orientation. It do it in main thread, ripple only works when main thread is free. So nothing strange here, immediate feedback of ui |
@Stypox I played with the code and looks like I found the best possible solution. However I didn't tested all million possible ways to interact with the app. But I like what I see. You probably will want to move your code from onClickListener to the new place when you see how awesome it works on tablets. Ok, add this lines
Here Better to have a separate method of course and just to call it here. Something like `openFullScreenIfNeeded()' and to put your code from on click listener too, maybe it will work even better |
fd68a1e
to
02eb1f2
Compare
Video demonstration of #5459 (comment) |
I could reproduce:
|
7f788cd
to
b8f16d0
Compare
|
|
b8f16d0
to
ed408b2
Compare
There seems to be a problem with this. Tapping on the button to go to main player from popup, it opens in fullscreen, even when the option is disabled. |
@tsiflimagas yes, that's expected. The symbol on the popup fullscreen button is a fullscreen one, hence it should behave as fullscreen always. |
@Stypox ohh, that's unfortunate for me :) Now there's no way on the popup player to open normally in the main player, so the only way is to open the app and tap on the main player (which has the problem of moving the seekbar to where it was when the video was switched to popup player, not where it was a moment ago (idk if there's already an issue for this)). It felt wrong when the app was rotated, while I just wanted to switch player (and landscape view is really pain in the neck on these long and narrow phones). I hope something new will come up for this. |
What is it?
Description of the changes in your PR
This PR adds a switch to video&audio settings that, when enabled, causes the main player to start automatically in fullscreen mode. This was rather painful to implement, but I think this finally works well.
Fixes the following issue(s)
Fixes #4152
Fixes #4387
Fixes #4682
Fixes #5845
Fixes #5594
Fixes #5299
Fixes #6785
Fixes #6784
Fixes #6131
See #4548
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