Extension first load


At startup my extension loads a bunch of data which is an heavy load on my servers knowing the high number of viewers.

As a “Video Component” it seems that the extension is loaded even if the viewer did not click on the logo inside the video.
As a “Panel”, the extension seem to load even if not visible by the viewer (under what he is actually looking at).

I tried looking in the documentation for a first load event but there does not seem to be any. (onContext is called even if extension not visible, onVisibilityChanged not called on first load.)
Is there any way I can know when a user is actually using my extension and not only watching the stream?


For anyone wondering, I ended up loading my extension only when visible on the viewport (using IntersectionObserver api) and it helped a lot.