w3c / picture-in-picture

Picture-in-Picture (PiP)
https://w3c.github.io/picture-in-picture
Other
311 stars 42 forks source link

Multiple picture-in-picture. #183

Closed kened-ferreira closed 4 years ago

kened-ferreira commented 4 years ago

It would be useful if was possible to have several simultaneous picture-in-picture windows. Maybe one pip per tab.

tidoust commented 4 years ago

Doesn't the specification already cater for this?

It does assume that a given Document (which should match what you call tab) can only have one Picture-in-Picture window, but allows multiple pip windows for different documents, up to implementations (and underlying platforms):

Whether only one window is allowed in Picture-in-Picture mode will be left to the implementation and the platform https://w3c.github.io/picture-in-picture/#one-pip-window

kened-ferreira commented 4 years ago

So, is there anything that prevents browsers from allowing multiple pips?

tidoust commented 4 years ago

The API prevents multiple pips for one tab, but nothing prevents browsers from allowing multiple pips for multiple tabs.

Note that nothing requires browsers to support multiple pips for multiple tabs either, and known implementations seem to support only one picture-in-picture in total.

kened-ferreira commented 4 years ago

I understand. So, if a browser, like Opera or Vivaldi, chooses to allow multiple pips today, could they?

beaufortfrancois commented 4 years ago

@kened-ferreira The spec allows it. Browsers should be able to support multiple Picture-in-Picture windows.

Operating systems with a Picture-in-Picture API usually restrict Picture-in-Picture mode to only one window. Whether only one window is allowed in Picture-in-Picture mode will be left to the implementation and the platform. Source: https://w3c.github.io/picture-in-picture/#one-pip-window

kened-ferreira commented 4 years ago

@kened-ferreira The spec allows it. Browsers should be able to support multiple Picture-in-Picture windows.

Operating systems with a Picture-in-Picture API usually restrict Picture-in-Picture mode to only one window. Whether only one window is allowed in Picture-in-Picture mode will be left to the implementation and the platform. Source: https://w3c.github.io/picture-in-picture/#one-pip-window

Thank you!

jimmywarting commented 3 years ago

now with experimental arbitrary content i guess it could be useful to pop up multiple graphs of your websites analytics. eg: one graph showing live interaction and another showing server memory or something like it.