AR portal with 360 video

I want to see 360 video only inside the doorway (portal) and hide video when I’m outside of the portal. Basically, you see the doorway and inside 360 video playing. When you go through the doorway, you see 360 video as a sphere. Here are examples on Aframe:

I need to the same do on Playcanvas.