The PictureInPictureWindow interface represents an object able to programmatically obtain the width and height and resize event of the floating video window.
PictureInPictureWindow
width
height
resize event
MDN Reference
The read-only height property of the PictureInPictureWindow interface returns the height of the floating video window in pixels.
The read-only width property of the PictureInPictureWindow interface returns the width of the floating video window in pixels.