iOS 14 shipped with system-wide picture in picture support, which works great. The pip-overlay automatically adapts it’s position to visual elements of native apps. For example it moves up so it doesn’t overlap the keyboard, bottom toolbars and image strips.
I did some research but can’t find how this auto adapt is implemented. Also I can’t get it to work in a web page while playing with viewport-fit and safe-area variables, so possibly Apple doesn’t expose this functionality to webviews.
Bottom line: feature request to support picture in picture auto adapt in Framework7, although not sure if this is possible at the moment.