Combinerjs can combine video and image
<div id="combiner"></div>
Setup
combiner = new Combiner('./assets/img/mask.png');
// connect your device cameras
const callBack = combiner.connect(isFrontCamera);
callBack
.then(function () {
_update();
})
.catch(function (err) {
alert(err.message);
});
/**
* update canvas
*/
function _update() {
combiner.update();
requestAnimationFrame(_update);
}
Create a composite image
combiner.combine();