File tree Expand file tree Collapse file tree 5 files changed +15
-20
lines changed
Expand file tree Collapse file tree 5 files changed +15
-20
lines changed Original file line number Diff line number Diff line change 33# Build Script for WebcamJS
44# Install uglifyjs first: sudo npm install uglify-js -g
55
6- uglifyjs webcam.js -o webcam.min.js --mangle --reserved " Webcam" --preamble " // WebcamJS v1.0.17 - http://github.com/jhuckaby/webcamjs - MIT Licensed"
6+ uglifyjs webcam.js -o webcam.min.js --mangle --reserved " Webcam" --preamble " // WebcamJS v1.0.18 - http://github.com/jhuckaby/webcamjs - MIT Licensed"
Original file line number Diff line number Diff line change 99 h2 , h3 { margin-top : 0 ; }
1010 form { margin-top : 15px ; }
1111 form > input { margin-right : 15px ; }
12+ # my_camera { background : # ccc ; }
1213 # results { float : right; margin : 20px ; padding : 20px ; border : 1px solid; background : # ccc ; }
1314 </ style >
1415</ head >
@@ -27,18 +28,14 @@ <h3>Demonstrates using the HTML5 user media constraints object</h3>
2728 < script language ="JavaScript ">
2829 Webcam . set ( {
2930 width : 320 ,
30- height : 240 ,
31+ height : 180 ,
3132 image_format : 'jpeg' ,
3233 jpeg_quality : 90 ,
3334 constraints : {
34- mandatory : {
35- minWidth : 320 ,
36- minHeight : 240
37- // minFrameRate: 30
38- } ,
39- optional : [
40- { minFrameRate : 60 }
41- ]
35+ width : 320 , // { exact: 320 },
36+ height : 180 , // { exact: 180 },
37+ facingMode : 'user' ,
38+ frameRate : 30
4239 }
4340 } ) ;
4441 Webcam . attach ( '#my_camera' ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " webcamjs" ,
3- "version" : " 1.0.17 " ,
3+ "version" : " 1.0.18 " ,
44 "description" : " HTML5 Webcam Image Capture Library with Flash Fallback" ,
55 "author" : " Joseph Huckaby <jhuckaby@gmail.com>" ,
66 "homepage" : " https://github.com/jhuckaby/webcamjs" ,
Original file line number Diff line number Diff line change 1- // WebcamJS v1.0.16
1+ // WebcamJS v1.0.18
22// Webcam library for capturing JPEG/PNG images in JavaScript
33// Attempts getUserMedia, falls back to Flash
44// Author: Joseph Huckaby: http://github.com/jhuckaby
55// Based on JPEGCam: http://code.google.com/p/jpegcam/
6- // Copyright (c) 2012 - 2016 Joseph Huckaby
6+ // Copyright (c) 2012 - 2017 Joseph Huckaby
77// Licensed under the MIT License
88
99( function ( window ) {
@@ -34,7 +34,7 @@ FlashError.prototype = new IntermediateInheritor();
3434WebcamError . prototype = new IntermediateInheritor ( ) ;
3535
3636var Webcam = {
37- version : '1.0.17 ' ,
37+ version : '1.0.18 ' ,
3838
3939 // globals
4040 protocol : location . protocol . match ( / h t t p s / i) ? 'https' : 'http' ,
@@ -174,10 +174,8 @@ var Webcam = {
174174 this . mediaDevices . getUserMedia ( {
175175 "audio" : false ,
176176 "video" : this . params . constraints || {
177- mandatory : {
178- minWidth : this . params . dest_width ,
179- minHeight : this . params . dest_height
180- }
177+ width : this . params . dest_width ,
178+ height : this . params . dest_height
181179 }
182180 } )
183181 . then ( function ( stream ) {
You can’t perform that action at this time.
0 commit comments