Saturday, 12 February 2022

Can an iframe check if itself is in viewport or not?

I'm creating an iframe with a small HTML5 video. the video shouldn't start playing unless the iframe is in the viewport.

I noticed that this isn't as easy as I would like since the iframe is like a sandboxed environment. Is it even possible for an iframe to know if it is in the viewport?



from Can an iframe check if itself is in viewport or not?

No comments:

Post a Comment