Skip to content

Commit 18d8ff3

Browse files
committed
Reverted constraints setting, going back to old "mandatory" syntax, as to not upset certain browsers.
Fixes #219
1 parent dc7f086 commit 18d8ff3

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webcamjs",
3-
"version": "1.0.21",
3+
"version": "1.0.22",
44
"homepage": "https://github.com/jhuckaby/webcamjs",
55
"authors": [
66
"Joseph Huckaby <[email protected]>"

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
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.21 - http://github.com/jhuckaby/webcamjs - MIT Licensed"
6+
uglifyjs webcam.js -o webcam.min.js --mangle --reserved "Webcam" --preamble "// WebcamJS v1.0.22 - http://github.com/jhuckaby/webcamjs - MIT Licensed"

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webcamjs",
3-
"version": "1.0.21",
3+
"version": "1.0.22",
44
"description": "HTML5 Webcam Image Capture Library with Flash Fallback",
55
"author": "Joseph Huckaby <[email protected]>",
66
"homepage": "https://github.com/jhuckaby/webcamjs",

webcam.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WebcamJS v1.0.21
1+
// WebcamJS v1.0.22
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
@@ -34,7 +34,7 @@ FlashError.prototype = new IntermediateInheritor();
3434
WebcamError.prototype = new IntermediateInheritor();
3535

3636
var Webcam = {
37-
version: '1.0.20',
37+
version: '1.0.22',
3838

3939
// globals
4040
protocol: location.protocol.match(/https/i) ? 'https' : 'http',
@@ -296,8 +296,10 @@ var Webcam = {
296296
this.mediaDevices.getUserMedia({
297297
"audio": false,
298298
"video": this.params.constraints || {
299-
width: this.params.dest_width,
300-
height: this.params.dest_height
299+
mandatory: {
300+
minWidth: this.params.dest_width,
301+
minHeight: this.params.dest_height
302+
}
301303
}
302304
})
303305
.then( function(stream) {

webcam.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)