GoogleChromeLabs / picture-in-picture-chrome-extension

https://chrome.google.com/webstore/detail/hkgfoiooedgoejojocmhlaklaeopbecg
Apache License 2.0
666 stars 152 forks source link

Is it possible to resize PiP? #43

Open ArielZabihi opened 4 years ago

ArielZabihi commented 4 years ago

It's a bit small for certain use cases. Is there any way to resize it?

beaufortfrancois commented 4 years ago

Can you share a screenshot of where it is a bit small? Only user can resize pip window, extension can't do that.

ArielZabihi commented 4 years ago
Screen Shot 2020-03-31 at 6 02 48 AM

How can I resize the PiP window?

beaufortfrancois commented 4 years ago

The same way you would resize a native OS window. Drag its corner.

isaquepereira commented 4 years ago

The resize has a limit, no? Can you remove or set a bigger limit? I want use it for my code studies, but looks so tiny... See: image

Xaseron commented 4 years ago

image

This is the maxium size of the PIP on my screen and i think it could be larger. Can you please remove the maxium PIP size restriction?

petternilsen commented 4 years ago

That size restriction is in Chromium and not something the extension can control.

djbclark commented 4 years ago

That size restriction is in Chromium and not something the extension can control.

If it's easy, could you tell us where this size restriction in Chromium comes from (e.g. what the variable name is)? I'd also love to have a size larger than ~1/4 of the screen, and would be willing to go open an issue request against Chromium itself.

Use case: A lot of board games have a clock / move list that you don't really need to pay attention to; so it'd be useful to have the window float on top of that.

UPDATE: If it's handled as a popup window (not sure how to check that), it looks like there is currently a hard-coded limit of 800x600 as a security feature

https://source.chromium.org/chromium/chromium/src/+/master:chrome/browser/ui/views/extensions/extension_popup.h;l=55?originalUrl=https:%2F%2Fcs.chromium.org%2Fchromium%2Fsrc%2Fchrome%2Fbrowser%2Fui%2Fviews%2Fextensions%2Fextension_popup.h

static constexpr int kMaxWidth = 800; static constexpr int kMaxHeight = 600;

petternilsen commented 4 years ago

The extensions popup is not controlling the size of the PIP window, that code is in overlay_window_views.cc. OverlayWindowViews::UpdateMaxSize() set the max size to half the size of the active monitor, on both axis:

maxsize = gfx::Size(work_area.width() / 2, work_area.height() / 2);

vchirikov commented 3 years ago

It's really too small, Firefox has a larger PiP window and this is really useful for some cases.

surajbahadur591 commented 3 years ago

anyone found the solution to make pip screen bigger?

kened-ferreira commented 3 years ago

Try using Opera. It doesn't have this limit.

kened-ferreira commented 3 years ago

And Opera pip is more complete. It has pip progress bar and volume control, using mouse scroll.

heitorgiacomini commented 3 years ago

Use firefox, it have an native picture-in-picture function and have no max-size limit.

surajbahadur591 commented 3 years ago

use firefox or opera for maximum window size in pip, in chrome pip size is limited and I found no way to increase

qwabra commented 3 years ago

It's really too small, Firefox has a larger PiP window and this is really useful for some cases.

just gone out to FF, thanks a lot.

kibblewhite commented 2 years ago

Experiencing the small issue, why is there a limitation on the size that picture-in-picture can go up to? Really odd... I would like to make it the width of the screen at least

vincentcsm0303 commented 2 years ago

Yeah.. the limitation very annoying to me, why there's a limit there. my second monitor is a verticle setup... that even worse for me

juliandreas commented 2 years ago

Both Opera and Brave, which are Chromium based, have managed to figure this out

Technetium1 commented 2 years ago

Unless someone contributes it, Google doesn't give a half of a damn to do it. I've been waiting for this for more than 2 years now.

kibblewhite commented 2 years ago

Maybe if enough of us start commenting on their youtube channels too, it might bring some attention or at least a response?

Technetium1 commented 2 years ago

@beaufortfrancois is the last one that interacted with this repo that has any power or might care.

Technetium1 commented 2 years ago

Only 4 more days until we've all been waiting a total of 800 days.

Garulf commented 1 year ago

This is very limiting and I see no benefit in having a max size like this. Please consider removing the limit.

atagulalan commented 1 year ago

The extensions popup is not controlling the size of the PIP window, that code is in overlay_window_views.cc. OverlayWindowViews::UpdateMaxSize() set the max size to half the size of the active monitor, on both axis:

maxsize = gfx::Size(work_area.width() / 2, work_area.height() / 2);

This is really bad. I have two vertical monitors and max width is limited to 540px. I know this is not a priority but is it really time-consuming to change one line? Remove 8 characters from this line and you are good to go.

max_size_ = gfx::Size(work_area.width(), work_area.height());

Come on now.

petternilsen commented 1 year ago

This extension does not control this size. File a bug with chromium or use Vivaldi.

kibblewhite commented 1 year ago

I guess one would report it here? https://bugs.chromium.org/p/chromium/issues/entry?template=Audio%2FVideo+Issue

beaufortfrancois commented 1 year ago

I've just updated Chromium so that the Picture-in-Picture window has a max size of 80% of the display width/height, not 50% anymore. See https://chromiumdash.appspot.com/commit/67df4c338d22f5d9f3e16d7a9e78187eba17fcbb

You can try in Chrome Canary

debpalash commented 1 year ago

I've just updated Chromium so that the Picture-in-Picture window has a max size of 80% of the display width/height, not 50% anymore. See https://chromiumdash.appspot.com/commit/67df4c338d22f5d9f3e16d7a9e78187eba17fcbb

You can try in Chrome Canary

Any eta for stable release version?

beaufortfrancois commented 1 year ago

According to https://chromiumdash.appspot.com/schedule, Chrome 108 will be stable Tue, Nov 29, 2022.

gaveitatry2 commented 1 year ago

I've just updated Chromium so that the Picture-in-Picture window has a max size of 80% of the display width/height, not 50% anymore. See https://chromiumdash.appspot.com/commit/67df4c338d22f5d9f3e16d7a9e78187eba17fcbb

You can try in Chrome Canary

Can you make it so that max size is 100% or whatever we want to make it, instead of limiting us to 80%? I want my Picture in Picture to be 1100x870 at 225, 0 on a 1600x900 desktop resolution. But I probably can't do that with a 80% of display limit.

ZerOmNia commented 1 year ago

Really sad to see that this managed to get changed, but still isn't just 100%. Portrait style monitors should be able to size up to 100% width, which would still leave about 2/3 of the display available.

gaveitatry2 commented 1 year ago

According to https://chromiumdash.appspot.com/schedule, Chrome 108 will be stable Tue, Nov 29, 2022.

Please let us do 100% width/height, instead of 80%. I'd like to have a Picture in picture be 1100x870 at position 225,0, but with 80% width/height, I will only be able to have 1100x720 (which isn't at all good for me). I also wanted to toggle to 1600x900 sometimes (same as my desktop resolution) sometimes without leaving Picture in picture, something that can't be done with a limit of 80% width/height. And as someone mentioned, not all monitors have the same dimensions. Apparently there is a portrait style monitor that is super tall and narrow so a 100% width would still leave 2/3 of the display available. But I really don't get the limitations. If someone wants both 100% width AND 100% height of their display, they should be allowed to have that as that is their preference and helps the achieve the functionality they need to be happier and more productive.

gaveitatry2 commented 1 year ago

I've just updated Chromium so that the Picture-in-Picture window has a max size of 80% of the display width/height, not 50% anymore. See https://chromiumdash.appspot.com/commit/67df4c338d22f5d9f3e16d7a9e78187eba17fcbb

You can try in Chrome Canary

Also, this is slightly different. But I wanted a Picture in picture to be 250x146 at position 1350, 0. The minimum size for PnP's seems to be width 260px, and then Google keeps moving the Pnp to position 1320, 0 because it doesn't like Pnp's to be off screen. What can I do, or is there a change that can be made to the extension, so that Pnp's can be 250px wide (no max limit of 260px)? Basically how to lower the PnP minimum size limit slightly? Update: I later tried to have the PnP at 260x156 at 1340, 0 on a 1600x900 desktop resolution, so that the PnP would not be offscreen, and Google Chrome still moved it to 1320, 0. No idea why.

kibblewhite commented 1 year ago

Thanks for the change in the code, however, would it be possible so that the max size is 100%, instead of 80%, many thanks :)