[MIG] web_widget_image_webcam from v13 to v14

Update webcam.js from 1.0.25 to 1.0.26
Fix URLs in readme/CONFIGURE.rst
Minor pre-commit reformatting in JS code
This commit is contained in:
Alexis de Lattre
2022-04-22 09:42:24 +02:00
committed by OCA-git-bot
parent 689c5df032
commit bcd74f10bb
4 changed files with 16 additions and 19 deletions

View File

@@ -1,9 +1,9 @@
// WebcamJS v1.0.25
// WebcamJS v1.0.26
// Webcam library for capturing JPEG/PNG images in JavaScript
// Attempts getUserMedia, falls back to Flash
// Author: Joseph Huckaby: http://github.com/jhuckaby
// Based on JPEGCam: http://code.google.com/p/jpegcam/
// Copyright (c) 2012 - 2017 Joseph Huckaby
// Copyright (c) 2012 - 2019 Joseph Huckaby
// Licensed under the MIT License
(function(window) {
@@ -34,7 +34,7 @@ FlashError.prototype = new IntermediateInheritor();
WebcamError.prototype = new IntermediateInheritor();
var Webcam = {
version: '1.0.25',
version: '1.0.26',
// globals
protocol: location.protocol.match(/https/i) ? 'https' : 'http',
@@ -92,10 +92,6 @@ var Webcam = {
window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;
this.userMedia = this.userMedia && !!this.mediaDevices && !!window.URL;
if (this.iOS) {
this.userMedia = null;
}
// Older versions of firefox (< 21) apparently claim support but user media does not actually work
if (navigator.userAgent.match(/Firefox\D+(\d+)/)) {
if (parseInt(RegExp.$1, 10) < 21) this.userMedia = null;
@@ -274,6 +270,7 @@ var Webcam = {
// setup webcam video container
var video = document.createElement('video');
video.setAttribute('autoplay', 'autoplay');
video.setAttribute('playsinline', 'playsinline');
video.style.width = '' + this.params.dest_width + 'px';
video.style.height = '' + this.params.dest_height + 'px';