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

feat(YouTube - Downloads): Pause video when external download button is clicked #467

Open
3 tasks done
HeroGalak opened this issue Aug 14, 2023 · 11 comments
Open
3 tasks done
Labels
Feature request Requesting a new feature that's not implemented yet

Comments

@HeroGalak
Copy link

HeroGalak commented Aug 14, 2023

Application

YouTube

Issue

When using a different app from NewPipe such as Seal or YTDLnis to download videos directly from YTRevanced, clicking the external download button while video is playing make the player go in PiP mode and the prompt of the custom downloader is showed under the minimized player of YT.

Prompt after clicking the external download button if video is playing (using YTDLnis)
image

Patch

The external downloads patch should be modified to allow stopping the player automatically when button is clicked. In this way the downloader prompt is correctly shown.

Prompt after clicking the external download button if playback is stopped (using YTDLnis)
image

Motivation

In this way the user experience is better and fluent

Acknowledgements

  • I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • I have written a short but informative title.
  • I filled out all of the requested information in this issue properly.
@HeroGalak HeroGalak added the Feature request Requesting a new feature that's not implemented yet label Aug 14, 2023
@YT-Advanced
Copy link

I also faced this problem too. Hope Revanced Team can do a fix

@RamPawar7
Copy link

I had a similar issue where the player would switch to PiP whenever I turned on Wi-Fi and the Wi-Fi networks card appeared. Thank you, now I know that pausing the video prevents this issue. I made an Automate flow to auto pause the video whenever Wi-Fi is turned on.

@oSumAtrIX
Copy link
Member

Does the same happen when you click it in the share menu?

@oSumAtrIX oSumAtrIX added Waiting on author Further information is requested and removed Waiting on author Further information is requested labels Aug 16, 2023
@YT-Advanced
Copy link

Does the same happen when you click it in the share menu?

The video continue playing but it is not change to PiP mode

@LisoUseInAIKyrios
Copy link
Contributor

I'm sure you know, but the pip box can be dragged around on screen, so it can be moved out of the way to use the downloader.

Maybe just before the external downloader is launched, the ReVanced pip override could be temporarily turned off for the next few seconds. Video playback would completely stop playing, and no pip would show up.

@YT-Advanced
Copy link

I'm sure you know, but the pip box can be dragged around on screen, so it can be moved out of the way to use the downloader.

Maybe just before the external downloader is launched, the ReVanced pip override could be temporarily turned off for the next few seconds. Video playback would completely stop playing, and no pip would show up.

It can easily solved by pause the video. I think you can do it by trigger OnClick() method

@LisoUseInAIKyrios
Copy link
Contributor

LisoUseInAIKyrios commented Aug 22, 2023

I tried adding a temporary false override to the pip feature, where if the external downloader was opened it would temporarily turn off the pip enable patch hook for 5 seconds.

And it seems to work...most of the time. Usually the video stops playing when launching the downloader, but sometimes it keeps playing anyways like it has a mind of its own (possibly because it's using a cached value of the hooked pip function, so temporary turning it off gives inconsistent behavior).

An alternative solution that works right now, is use NewPipe. It uses an overlay to start the download and thus it never opens a new full screen app and the video keeps playing under the overlay without UI issues.

@oSumAtrIX
Copy link
Member

It indeed depends on the app. Although, I am wondering why the download button action behaves differently to that of the share menu item, when they both should be the same.

@RamPawar7
Copy link

Share button does trigger PiP, but only the first time after opening the app when it's been closed for a few minutes. At least for me it happens like this.
https://github.com/ReVanced/revanced-patches/assets/96973076/bd6bcac4-1033-40a7-a7ea-8f16788600be

@oSumAtrIX
Copy link
Member

So how is it different from the download button

@oSumAtrIX oSumAtrIX transferred this issue from ReVanced/revanced-patches-template Dec 14, 2023
@revanced-bot revanced-bot transferred this issue from another repository Dec 14, 2023
Slenderman00 pushed a commit to Slenderman00/revanced-patches-grindr that referenced this issue Jan 31, 2024
@Covkie
Copy link

Covkie commented Mar 28, 2024

This seems to be a larger issue with PiP in general - Using the share menu caused the playing video to enter PiP(Not 100% of the time) as well as Nearby Share and the External Downloaded popup menu. With Nearby Share this breaks the back button and sends to the home screen.

Overall this breaks user expirence and I would love to see a patch for this.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title feat(YouTube/External Downloads): Pause video when external download button is clicked feat(YouTube - Downloads): Pause video when external download button is clicked Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Requesting a new feature that's not implemented yet
Projects
None yet
Development

No branches or pull requests

6 participants