I want to develop an application based on augmented reality using a-frame and I need to transmit the streaming of the scene through webrtc. I want to remotely see what the user sees locally (webcam + AR). I have been testing and I have only been able to extract augmented reality from the canvas of the scene.
//html
<a-scene id="escena" embedded arjs="sourceType: webcam; debugUIEnabled: false;" vr-mode-ui="enabled: false"> ...</scene>
//javascript
var scene = document.getElementById('scene')
var stream = scene.canvas.captureStream();
Imagen extraction only canvas from scene
But I need to merge webcam images and the augmented reality together from the scene. Or have simultaneously access to webcam images to be able to merge them separately.