Closed Philzen closed 1 year ago
In Chromium-based browsers, it is possible to create a PiP window based on a video capturing a canvas stream. See https://developer.chrome.com/blog/watch-video-using-picture-in-picture/#show-canvas-element-in-picture-in-picture-window and https://googlechrome.github.io/samples/picture-in-picture/audio-playlist
Note that a dedicated WICG Document Picture-in-Picture API has been proposed to solve these kinds of issues as well.
Currently the standard says::
However, Firefox does that (which is good for our use case), while WebKit (Chromium) does not, and for some reason it seems impossible to style the PiP-window using the CSS pseudo class, despite the MDN stating that it should be supported.
Maybe it would be good to allow certain styles? Or clarify in that sentence, that if PiP is implemented, the
:picture-in-picture
-class also would need full support. Or otherwise, kindly advise where to best report these inconsistenciesBackground: I'm working on a video conferencing project, where you have the common setting to mirror your own, self-facing video stream. The component we're using does this using
transform: rotateY(180deg
. This setting on the<video>
element is currently applied to Firefox PiP as well (alsoscaleX(-1)
, which achieves the same – however rotating to other values than 180deg or scaling to other values than-1
is ignored), but in WebKit all styles on thevideo
-element are ignored when going into PiP and the stream flips back to normal. Also, i couldn't achieve anything using the:picture-in-picture
pseudo class.