forked from Techsystech/web
[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 code16.0
parent
689c5df032
commit
bcd74f10bb
|
@ -4,7 +4,7 @@
|
|||
{
|
||||
"name": "Web Widget - Image WebCam",
|
||||
"summary": "Allows to take image with WebCam",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "web",
|
||||
"website": "https://github.com/OCA/web",
|
||||
"author": "Tech Receptives, "
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
By default, the module works with all `major browsers
|
||||
<https://github.com/jhuckaby/webcamjs#browser-support>`_.
|
||||
<https://github.com/jhuckaby/webcamjs/blob/master/DOCS.md#browser-support>`_.
|
||||
|
||||
An important note for **Chrome 47+** users - this module only works with websites delivered over SSL / HTTPS.
|
||||
Visit this for `more info
|
||||
<https://github.com/jhuckaby/webcamjs#important-note-for-chrome-47>`_.
|
||||
<https://github.com/jhuckaby/webcamjs/blob/master/DOCS.md#important-note-for-chrome-47>`_.
|
||||
|
||||
But, If you still want this module to work with websites without SSL / HTTPS.
|
||||
Here is the steps to do it easily (Always run in Adobe Flash fallback mode, but it is not desirable).
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue