【问题标题】:use webcam on a http website in google chrome在 google chrome 中的 http 网站上使用网络摄像头
【发布时间】:2017-03-13 19:58:58
【问题描述】:

我正在使用 webcam.js 获取客户点击的照片,以便在我的基于云的零售店软件上创建个人资料。

它曾经在早期版本的 chrome 中运行良好,在 firefox 上仍然运行良好。但现在最新版本的 chrome 甚至 Opera 等其他浏览器都开始在调用网络摄像头时抛出错误 - 只允许 https 版本使用网络摄像头。

它是个人使用的软件,我不想在 SSL 证书上花费额外。是否有一些选项可以让我们为 http 站点添加例外以使用网络摄像头

当前代码:

function loadCamera(){
        Webcam.attach( '#my_camera' );
        Webcam.set({
            width: 200,
            height: 200,
            dest_width: 200,
            dest_height: 200,
            force_flash : true
        });
    }

【问题讨论】:

    标签: google-chrome webcam.js


    【解决方案1】:

    您可以查看letsencrypt 或certbot(基本相同)。他们免费颁发 SSL 证书,设置非常简单。

    链接:

    https://letsencrypt.org/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-26
      • 2019-06-20
      相关资源
      最近更新 更多