dralletje / Windowed

Chrome extension to keep fullscreen windows contained
167 stars 16 forks source link

Revisit Multiple PIP, PIP custom size and placement, PIP permanence #69

Open Zahir-Khan opened 3 months ago

Zahir-Khan commented 3 months ago

Chrome API has been updated with latest PIP feature. Here is the link https://developer.chrome.com/docs/web-platform/document-picture-in-picture

I also understand the hesitancy to write site specific code but I think giving us the option to customize under the extension settings for things like most commonly used websites like YouTube would be great.

Also I do think it is possible to give further option of writing scripts for power users so we can turn the entire webpage or specific div element into a PIP or multiple PIP would be great. (Lots of work ik and maybe deserves a dedicated issue or I will just fork this when time permits)

Closed and Open Issues that are related and can be addressed with the updated API https://github.com/dralletje/Windowed/issues/23 https://github.com/dralletje/Windowed/issues/26 https://github.com/dralletje/Windowed/issues/28 https://github.com/dralletje/Windowed/issues/38 https://github.com/dralletje/Windowed/issues/51 https://github.com/dralletje/Windowed/issues/53

dralletje commented 3 months ago

Thank you so much for bringing this to my attention: this is amazing!!

I need to experiment with this first, I hope I can recreate it in a way that works smoothly for every website.

If it works smoothly I will just replace the current PIP button with this feature.

I don't see anything in the article about multiple PIP windows? Can you point me to where that is mentioned/a demo?

Zahir-Khan commented 3 months ago

Since the document PIP is linked to the tab that opened it you are able to open multiple PIP. One for each browser tab. Documentation doesn't explicitly state this but it appears that it is possible given how the API is structured.

https://developer.mozilla.org/en-US/docs/Web/API/Document_Picture-in-Picture_API#browser_compatibility

dralletje commented 3 months ago

Did you try it out? On Chrome for me it is not possible to open multiple.

dralletje commented 3 months ago

Also I've been trying to get this to work for generically for websites, but because it is (more than with normal fullscreen-faking) a lot of moving around of DOM nodes, it does break most sites consistently 😱