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

Picture in Picture mode for autoplay #927

Closed
pablodekota opened this issue Jan 12, 2021 · 5 comments
Closed

Picture in Picture mode for autoplay #927

pablodekota opened this issue Jan 12, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@pablodekota
Copy link
Contributor

Is your feature request related to a usage problem (not a bug)? Please describe.
When autoplay is active, the Picture in Picture mode doesnt automatically get activated on the new video, it just stays on the old one.

Describe the solution you'd like to see implemented
I would like the PIP mode to carry over on next videos when autoplay is on, tho i would still like it to stay when i click home, so i can find new videos while still watching the original one

Describe alternatives you've considered
I personally dont know how to do this, if i did, i would have made a PR, but as an example when you use firefoxes PIP mode, the next video uses PIP aswell.

@pablodekota pablodekota added the enhancement New feature or request label Jan 12, 2021
@GilgusMaximus
Copy link
Contributor

The PiP has some problems, or more like intended behavior. E.g. it does not go back to the video once you leave the page. To make it more useful a lot of work has to be done.

#624

@pablodekota
Copy link
Contributor Author

The PiP has some problems, or more like intended behavior. E.g. it does not go back to the video once you leave the page. To make it more useful a lot of work has to be done.

#624

@GilgusMaximus
that is not my concern, that it not going back to a video can be overdone by just going back and minimizing it into the player and it will act as if you continued watching, my only real issue is that it wont go to the next video when autoplay is active

@SebTota
Copy link
Contributor

SebTota commented May 11, 2021

Do you have any preference on how this should be implemented?

My idea is:

  • Make sure the PiP window is destroyed when the current video finishes (this is probably something that should be added anyway when autoplay is on)
  • Append a query parameter ?PiP=true to the recommended video URL (code reference)
  • On player initialization, check for the query parameter and force a PiP window if true

We could also just keep it as a setting to keep track of if the last video had PiP mode on, but this just seemed like there would be less of a chance to keep PiP mode constantly on if something didn't go quite right.

If you are ok with my implementation just let me know and I can implement this.

@GilgusMaximus
Copy link
Contributor

So this sounds like a good plan. But I'd maybe change one thing. Instead of adding the parameter to the URL, it'd be better to add a boolean value lastPlayedAsPip to the state of the app, so the information is stored across the videos for normal autoplay, YouTube playlists and custom playlists in the future. Because there is no format yet for custom playlists, and whether we'll actually store the whole URl or just the videoId, it'd be more future proof to decouple that from the next video.

But otherwise it sounds good

@efb4f5ff-1298-471a-8973-3d47447115dc

closing in favor of #2295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants