Avoid immersive ar mode in webxr ar paint example


I’m trying to adapt the webxr_ar_paint example (https://github.com/mrdoob/three.js/blob/c23b245814ac71999d8303c07434fcfd244288dd/examples/webxr_ar_paint.html) to my WebRTC project. I would like to avoid the immersive ar mode for screen sharing using the opentok videocall.

I’ve changed the immersive ar mode in navigator.xr.requestSession to inline mode in ARButton.js file but the example does not work. Has anyone found another way to implement this? Any suggestion?