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

如何修复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 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
    • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
    • ¥15 linux驱动,linux应用,多线程