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-face-capture hidden></idlive-face-capture> <video autoplay></video>
-
Subscribe to the
open
event and passsrcObject
from the html video element to the custom video tagconst idliveFaceCapture = document.querySelector('idlive-face-capture'); const customVideo = document.querySelector('video'); idliveFaceCapture.addEventListener('open', (event) => { const { video } = event.detail[0]; customVideo.srcObject = video.srcObject; });