dongpanshi2839 2019-04-22 17:29
浏览 1888

如何修复Uncaught TypeError:无法在'URL'上执行'createObjectURL':找不到与签名匹配的函数

I have a laravel app where I need to enter a qr code's value into a text field in an html form. For this, I used webcodecam from github. I included the necessary scripts and canvasses like the demo. But I keep getting this error in my console:

Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
    at cameraSuccess (webcodecamjs.js:17)

Here's my HTML code.

<div class="row">
      <div style="position: relative;display: inline-block;">
           <canvas id="qr-canvas" width="320" height="240"></canvas>       
           <div class="scanner-laser laser-rightBottom" style="opacity: 0.5;"></div>
           <div class="scanner-laser laser-rightTop" style="opacity: 0.5;"></div>
           <div class="scanner-laser laser-leftBottom" style="opacity: 0.5;"></div>
           <div class="scanner-laser laser-leftTop" style="opacity: 0.5;"></div>
      </div>
</div>

And here's where I included the scripts:

<script type="text/javascript" src="{{ asset('js/qrcodelib.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/webcodecamjs.js') }}"></script>
<script type="text/javascript">
    $('#qr-canvas').WebCodeCam();
</script>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 乘性高斯噪声在深度学习网络中的应用
    • ¥15 运筹学排序问题中的在线排序
    • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
    • ¥30 求一段fortran代码用IVF编译运行的结果
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥30 python代码,帮调试,帮帮忙吧