问题标签 [camera-overlay]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
189 浏览

camera - 如何在 JavaScript 中拍照之前将叠加图像添加到相机

我想在 JavaScript 中添加一个半透明图像作为相机的叠加层,以便引导用户拍摄他们需要拍摄的内容,但我很挣扎。

我目前访问智能手机的原生相机如下:

但是我不能通过 JS 操作这个原生相机来添加一个半透明的图像作为覆盖。可能吗?

有没有办法通过javascript(Jquery或一些lib)将图像作为覆盖(类似于二维码阅读器或信用卡扫描仪)添加到相机?