youtube
youtube copied to clipboard
Auto PIP - only works when the video is paused and not when playing, should be the opposite
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
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
hi & thanks! @speaker-60 @ewonais
any more details about the bug?
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 https://github.com/mozilla/standards-positions/issues/72#issuecomment-393596352 https://bugzilla.mozilla.org/show_bug.cgi?id=1463402 despite supporting native PIP! Need to disable menu switches for FF. https://github.com/code-charity/youtube/issues/2051