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