如何修复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>