Front: use Webcam.on() for error handling

This commit is contained in:
tleb 2020-03-04 07:13:16 +01:00
parent 7fb26f9e45
commit 5accdbccbb

View File

@ -52,7 +52,7 @@
{% if not form.instance.profile_pict %} {% if not form.instance.profile_pict %}
<script src="{{ static('core/js/webcam.js') }}"></script> <script src="{{ static('core/js/webcam.js') }}"></script>
<script language="JavaScript"> <script language="JavaScript">
Webcam.hooks.error = function(msg) { console.log("Webcam.js error: " + msg) } Webcam.on('error', function(msg) { console.log('Webcam.js error: ' + msg) })
Webcam.set({ Webcam.set({
width: 320, width: 320,
height: 240, height: 240,