Auto toggeling the picture in picture mode

Hello!
I’m using the video player in my website, and I love the picture in picture mode. Infact, it can be a crucial feature for my website.
My question is this:
I would like the picture in picture mode to be toggled automatically when the video is no longer on the screen. For example, if I scroll down, I want to video to switch to picture in picture mode and play from there, that way always keeping the video on the screen.
Is there a way to do this?

1 Like