revanced-patches icon indicating copy to clipboard operation
revanced-patches copied to clipboard

feat(YouTube): Remove "continue playing?" dialog after the screen has turned off

Open SodaWithoutSparkles opened this issue 2 years ago • 20 comments

Application

Youtube

Issue

When you use YT to play a playlist, it will stop itself.

  1. Create a playlist with about 15 songs each with length not less than 3:40
  2. Play the playlist from start
  3. Press the power button to turn off screen
  4. Wait until no sound is playing. It should have played about 7 or so songs
  5. Unlock and you can see the dialog at the bottom, asking you to interact before playing

As I did not use English version of YT, the exact wording might be different, I translated it back to English

BTW the dialog has a white background even when you used dark theme

Patch

Remove the aforementioned dialog such that you dont need to click it to continue playing

Motivation

This allows user to shut the screen off when listening to music. Which:

  1. Saves battery
  2. prevents screen burn-in on OLED device
  3. lets you focus more when listening background music

Acknowledgements

  • [X] I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I filled out all of the requested information in this issue properly.

SodaWithoutSparkles avatar Oct 21 '22 03:10 SodaWithoutSparkles

Would be nice to add this feature to Youtube Music as well!

vasile-coste avatar Oct 21 '22 07:10 vasile-coste

that dialog box comes only for the first time. why too lazy to hide it once? why need a patch for such a small thing?

shekhawat2 avatar Oct 21 '22 17:10 shekhawat2

It had occur to me at least twice.

SodaWithoutSparkles avatar Oct 21 '22 17:10 SodaWithoutSparkles

It had occur to me at least twice.

Screenshot_20221021-233022_YouTube

Talking about this dialog box? If yes, Then this doesnt pause background playback, it is just a notification that the background playback is on.

shekhawat2 avatar Oct 21 '22 18:10 shekhawat2

no. Not this dialog.

SodaWithoutSparkles avatar Oct 21 '22 18:10 SodaWithoutSparkles

It had occur to me at least twice.

Screenshot_20221021-233022_YouTube

Talking about this dialog box? If yes, Then this doesnt pause background playback, it is just a notification that the background playback is on.

No, it is completely different. The dialog box that appears has a message similar to netflix "are you still watching", in youtube cases the message says "are you still listening?". When this appears the video/song pauses and you have to hit yes if you want to continue playing!

vasile-coste avatar Oct 21 '22 18:10 vasile-coste

It had occur to me at least twice.

Screenshot_20221021-233022_YouTube Talking about this dialog box? If yes, Then this doesnt pause background playback, it is just a notification that the background playback is on.

No, it is completely different. The dialog box that appears has a message similar to netflix "are you still watching", in youtube cases the message says "are you still listening?". When this appears the video/song pauses and you have to hit yes if you want to continue playing!

ohkay, thats something i have never seen. it needs a patch maybe.

shekhawat2 avatar Oct 21 '22 18:10 shekhawat2

thread-48656667-6646926537845565056 It looks like this when it appears. I have dealt with this issue multiple times on og vanced until it died, so it was only a matter of time until it'd happen on revanced. Lo and behold today is when this happened to me! (Not my screenshot btw tho. I instantly pressed yes because I listen to playlists a LOT) I'm unsure about whether or not it's a fixable issue as I've heard it's something youtube implemented to reduce playlist time(?)

Bayonetta6996 avatar Oct 22 '22 08:10 Bayonetta6996

thread-48656667-6646926537845565056

Yep its precisely this dialog. I am not using English version of YT but it will look like that when translated.

I think its client side responsible for the pause. Which means it can be patched.

@oSumAtrIX Any thoughts?

Edit: typos

SodaWithoutSparkles avatar Oct 22 '22 09:10 SodaWithoutSparkles

thread-48656667-6646926537845565056

Yep its precisely this dialog. I am not using English version of YT but it will look like that when translated.

I think its client side responsible for the pause. Which means it can be patched.

@oSumAtrIX Any thoughts?

Edit: typos

Honestly, all I can say is that this is one of the most annoying things to ever occur with youtube clients for me. It's an issue that I've never seen fixed before and as someone who uses playlists with very niche songs not found on yt music/spotify it's vexing when it pops up and pauses. Hopefully maybe the devs might see this and do something? I'm not the most intelligent with github lol

Bayonetta6996 avatar Oct 23 '22 00:10 Bayonetta6996

IMG_20221025_143622.jpg

I am using the Chinese version of YT. It says "Video paused. Continue watching?" when translated to English.

Notice that the background is white. I am using dark theme. Is this a bug? @OxrxL

SodaWithoutSparkles avatar Oct 25 '22 06:10 SodaWithoutSparkles

I wonder if this isn't related to MY issue where playback of normal videos STOP soon after screen is turned off. I didn't Background Playback working on my Samsung Tab s7... soon after I turned off screen, It stopped playing. Even this latest version 17.42.33 (with 2,83 patches), doesn't play for a while after I have turned off the screen (press POWER button).

I even checked the release notes and it SHOULD be working for me, but it doesn't.

animule avatar Oct 27 '22 04:10 animule

@animule I dont think this is the same problem. This problem is about the videos stopping well over 20 minutes after screen locked.

Expand

Your issue sounds like your phone's OS killed the application after screen off. Make sure you have NOT set any "clear ram after screen off" thing, and DO set the application to unrestricted in battery optimization settings.

Check these links for how to turn off battery optimization for spectific apps:

  • https://nine-faq.9folders.com/articles/8698-how-to-turn-off-battery-optimization-on-the-samsung-galaxy-android-6-7-and-8-devices
  • https://www.verizon.com/support/knowledge-base-204545/

If you continue to have that issue open a new support ticket at the revanced discord, or open a new issue

SodaWithoutSparkles avatar Oct 27 '22 07:10 SodaWithoutSparkles

Is there any new updates about this? It's started to get even worse on my end to the point where I can't listen to my playlist anymore.

Bayonetta6996 avatar Nov 20 '22 16:11 Bayonetta6996

Is there any new updates about this? It's started to get even worse on my end to the point where I can't listen to my playlist anymore.

I would like to know. I would have developed it myself if I had the knowledge on how to develop a patch. There isnt even a contribution guide.

SodaWithoutSparkles avatar Nov 20 '22 16:11 SodaWithoutSparkles

@SodaWithoutSparkles https://github.com/revanced/revanced-patches/tree/docs/docs.

oSumAtrIX avatar Nov 20 '22 16:11 oSumAtrIX

Wow, how more obvious could that be!

Anyway, since developing patches requires Java knowledge, which I have none, the chances that I could develop a patch is slim. I also have a major Exam coming up so learning Java is not an option for now.

SodaWithoutSparkles avatar Nov 20 '22 16:11 SodaWithoutSparkles

Then the issue isnt "There isnt even a contribution guide." but "learning Java is not an option for now".

oSumAtrIX avatar Nov 20 '22 16:11 oSumAtrIX

yeah, I didnt realize I need java until I read the docs. I thought it was procedural instead of OOP. Anyway, any progress on this patch request?

SodaWithoutSparkles avatar Nov 20 '22 17:11 SodaWithoutSparkles

I have found a sorta usable workaround.

  1. enable background play
  2. enable pip
  3. play video
  4. enter pip mode
  5. click the headphone button in the pip window
  6. turn off screen

Pros: Dont get stopped

Cons: no video, just audio

SodaWithoutSparkles avatar Nov 04 '23 01:11 SodaWithoutSparkles