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

bug(YouTube - Background playback): Miniplayer does not play in background after playing a Short #3895

Open
3 tasks done
dib12 opened this issue Nov 11, 2024 · 10 comments
Open
3 tasks done
Labels
Bug report Something isn't working

Comments

@dib12
Copy link

dib12 commented Nov 11, 2024

Bug description

Way to trigger the bug:-(check video)
Disable short background playback.
Play any video. Keep it in Minimize mode.
Play a short.press back.
Resume the Minimize video.then video no longer play in background.

If short background playback enabled, video play in pip and there is no background button in pip screen for that video (not short video ) with same trigger.(See second photo)

Error logs

Solution

Removing pip for short may work.

Additional context

VID-20241111-WA0002.mp4

Image

Acknowledgements

  • I have checked all open and closed bug reports and this is not a duplicate.
  • I have chosen an appropriate title.
  • All requested information has been provided properly.
@dib12 dib12 added the Bug report Something isn't working label Nov 11, 2024
@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Nov 11, 2024

Fixing the first issue requires figuring out a better way to know if a Short is currently on screen and playing. The current approach fails for situations like this.

The second issue of the missing audio only background playback button (headphones icon), appears to be a YouTube bug.

@dib12
Copy link
Author

dib12 commented Nov 11, 2024

@LisoUseInAIKyrios can you add a commit here to revert background playback for short.I will cherrypick and will build patches.rvp for test.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Nov 11, 2024

Try reproducing the issue again, but before changing to background mode maximize the video to full screen (or maximize to the regular player, and not the miniplayer).

If the regular video is not in miniplayer mode then background playback should behave correctly. This specific issue has been present for a long time and is not new.

Reverting the Shorts background playback change won't fix this.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title bug: YouTube: Background playback: Minimized video not play in background after playing a short. bug(YouTube - Background playback): Miniplayer does not play in background after playing a Short Nov 11, 2024
@dib12
Copy link
Author

dib12 commented Nov 11, 2024

The only way background playback works again if I play another video

Edit:
I want to test with revert that commit as headphone button changes to previous button in short video pip.but after press back,play the minimised video its not restores headphone button in pip.Need to change the video for restore background playback and headphone button in pip

@LisoUseInAIKyrios
Copy link
Contributor

You can try reverting commit 7db1a77 but it will not fix this specific use case (going to background playback with miniplayer after opening a Short). This bug has been present for a long time.

@dib12
Copy link
Author

dib12 commented Nov 11, 2024

Due to update in patcher version after that commit i failed to revert it.(Not much knowledge about these)

@dib12
Copy link
Author

dib12 commented Nov 11, 2024

@LisoUseInAIKyrios Ohh right .Checked with old patch.
But one good thing in old patch is video atleast go to pip (although background botton is not there)

But in new patch video stops play (not playing in pip atleast)when disable background for short.
If background playback for short enabled, minimized video plays in pip

@dib12
Copy link
Author

dib12 commented Nov 11, 2024

Another thing I got is
If I disable pip in general settings , with old patches video plays in background without any issue.
But with new patch video stops playing.

I think its better to revert that.

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Nov 11, 2024

If you don't want background play then don't include the patch.

When using the old patches you did not follow the same reproduction steps. This issue only shows up when:

  1. Open a regular video
  2. Open a Short (without closing the regular video)
  3. Close the Short
  4. Resume playback of the original video
  5. Put the video into minimized (Miniplayer) mode
  6. Change apps
  7. Video does not play in background mode

If these exact steps are not followed, then the bug does not occur.

This bug has been present for a long time. This thread is starting to turn into a loop of repeating the same information over and over.

@inotia00
Copy link

I implemented a hook to detect if the Shorts player view (R.id.reel_watch_player) is attached or detached from the Windows

Since this is implemented as a listener, it can detect if the Shorts player is open or closed more quickly and accurately than the PlayerType hook

I applied this to my patch a little over a month ago, and it seems to work fine with background playback patch (general video) and the hide Shorts navigation bar patch

My patch was only tested on YouTube 19.16.39, so I haven't tested it on the latest YouTube
(including the Shorts background playback patch)

https://github.com/inotia00/revanced-patches/blob/807494f8a7d09a7b9d6c03364ed52df682007d57/src/main/kotlin/app/revanced/patches/youtube/utils/playertype/PlayerTypeHookPatch.kt#L70

https://github.com/inotia00/revanced-integrations/blob/4f8d7c95240b398a103ea60baa149a19a8c63c0f/app/src/main/java/app/revanced/integrations/youtube/patches/utils/PlayerTypeHookPatch.java#L39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants