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

Auto PIP - only works when the video is paused and not when playing, should be the opposite #1352

Open
speaker-60 opened this issue Jun 16, 2022 · 3 comments
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Bug Bug or required update after YouTube changes Completion / Revision Rethink, complete, improve, tweak our feature or structure. good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@speaker-60
Copy link

I messaged this idea as a review but saw the github link in a comment below mine so i thought id re input it here

Id love to request is a auto mini player feature when switching tabs. So i can go to youtube play a video and then go to another tab and it auto pops out to the corner of the screen

I know chrome has pip all be it abit hidden but you have to manually do this
I found this https://developer.chrome.com/blog/media-updates-in-chrome-73/#auto-pip
about it but i understand none of it

anyway would be a cool feature

@speaker-60 speaker-60 added Feature request Wish or idea help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) labels Jun 16, 2022
@ImprovedTube ImprovedTube added the ✰Unique unique ~ Worth extra work (not done anywhere in any way? out of the box?) label Dec 2, 2022
@ewonais
Copy link

ewonais commented Jul 2, 2023

Auto pip exist now. Added iin v4.7 2023-03-27
Go to Player>autoPip to enable it.
For me auto PiP only works when the video is paused and not when playing, shuld be the oposit.
Also alreddy su8gestewd in #1262

@ImprovedTube ImprovedTube added up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* labels Oct 19, 2023
@ImprovedTube ImprovedTube added the bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) label Nov 5, 2023
@ImprovedTube ImprovedTube added Bug Bug or required update after YouTube changes Completion / Revision Rethink, complete, improve, tweak our feature or structure. and removed Feature request Wish or idea ✰Unique unique ~ Worth extra work (not done anywhere in any way? out of the box?) labels May 3, 2024
@ImprovedTube ImprovedTube changed the title Auto PIP Auto PIP - only works when the video is paused and not when playing, should be the opposite May 3, 2024
@ImprovedTube
Copy link
Member

hi & thanks! @speaker-60 @ewonais

any more details about the bug?

@raszpl
Copy link
Contributor

raszpl commented Jun 17, 2024

1 its being called from pageOnFocus without checking this.focus. For example its being enabled after someone was on another tab, closed Pip popup there and switched back to Video tab.

2 Its being enabled regardless if the video is playing or not

3 It cant be 100% reliably enabled automatically in the first place, requires user input
requestPictureInPicture' on 'HTMLVideoElement': Must be handling a user gesture if there isn't already an element
and specific one at that https://developer.mozilla.org/en-US/docs/Web/Security/User_activation https://html.spec.whatwg.org/multipage/interaction.html#activation-triggering-input-event the only saving grace is it requires https://developer.mozilla.org/en-US/docs/Glossary/Transient_activation meaning is someone clicked few seconds before on something and then opened video page it might, !but not guaranteed!, work. Its a dicey feature that will lead to people thinking extension is broken because it doesnt work reliably 100% of the time :(

4 switching between two YT tabs leads to PIP from previous tab.

5 FF doesnt support this API https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement/requestPictureInPicture#browser_compatibility mozilla/standards-positions#72 (comment) https://bugzilla.mozilla.org/show_bug.cgi?id=1463402 despite supporting native PIP! Need to disable menu switches for FF. #2051

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Bug Bug or required update after YouTube changes Completion / Revision Rethink, complete, improve, tweak our feature or structure. good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
Status: No status
Development

No branches or pull requests

4 participants