Custom Video Tag¶
By default, the component tag shows video from the camera
It is possible to hide the component and use a custom video tag
-
Hide the component tag and add a custom video tag
<idlive-document-capture hidden></idlive-document-capture> <video autoplay></video>
-
Subscribe to the
open
event and passsrcObject
from the html video element to the custom video tagconst idliveDocCapture = document.querySelector('idlive-document-capture'); const customVideo = document.querySelector('video'); idliveDocCapture.addEventListener('open', (event) => { const { video } = event.detail[0]; customVideo.srcObject = video.srcObject; });