Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1643c76

Browse files
author
Ciro S. Costa
committed
bumps version and updates dist files
1 parent ad875ce commit 1643c76

File tree

5 files changed

+32
-20
lines changed

5 files changed

+32
-20
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "qcode-decoder",
33
"main": "build/main.min.js",
44
"description": "Decodes QRCode in the browser and node",
5-
"version": "0.0.5",
5+
"version": "0.0.6",
66
"homepage": "https://github.com/cirocosta/qcode-decoder",
77
"authors": [
88
"Ciro S. Costa <[email protected]>"

build/qcode-decoder.js

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3873,20 +3873,29 @@ QRCodeDecoder.prototype._captureToCanvas = function () {
38733873
clearTimeout(this.tmrCapture);
38743874
}
38753875

3876-
if (!this.videoDimensions && this.videoElem.videoWidth && this.videoElem.videoHeight) {
3876+
if (!this.videoDimensions &&
3877+
this.videoElem.videoWidth &&
3878+
this.videoElem.videoHeight) {
3879+
38773880
this.videoDimensions = {
38783881
w: this.videoElem.videoWidth,
38793882
h: this.videoElem.videoHeight
38803883
};
3881-
this.prepareCanvas(this.canvasElem, this.videoDimensions.w, this.videoDimensions.h);
3884+
3885+
this.prepareCanvas(this.canvasElem,
3886+
this.videoDimensions.w,
3887+
this.videoDimensions.h);
38823888
}
38833889

38843890
if (this.videoDimensions) {
38853891
var gCtx = this.canvasElem.getContext("2d");
3886-
gCtx.clearRect(0, 0, this.videoElem.videoWidth, this.videoElem.videoHeight);
3892+
gCtx.clearRect(0, 0, this.videoElem.videoWidth,
3893+
this.videoElem.videoHeight);
38873894

38883895
try{
3889-
gCtx.drawImage(this.videoElem, 0, 0,this.videoDimensions.w, this.videoDimensions.h);
3896+
gCtx.drawImage(this.videoElem, 0, 0,
3897+
this.videoDimensions.w,
3898+
this.videoDimensions.h);
38903899
qrcode.decode();
38913900
return;
38923901
}
@@ -3927,7 +3936,7 @@ QRCodeDecoder.prototype.isCanvasSupported = function () {
39273936
*/
39283937
QRCodeDecoder.prototype.prepareVideo = function(videoElem, errcb) {
39293938
var scope = this;
3930-
3939+
39313940
this.stop();
39323941

39333942
navigator.getUserMedia = navigator.getUserMedia ||
@@ -3949,10 +3958,11 @@ QRCodeDecoder.prototype.prepareVideo = function(videoElem, errcb) {
39493958
console.log('Couldn\'t get video from camera');
39503959
}
39513960
};
3952-
3953-
/**
3954-
+ * Releases a video stream that was being captured by prepareToVideo
3955-
+ */
3961+
3962+
/**
3963+
* Releases a video stream that was being
3964+
* captured by prepareToVideo
3965+
*/
39563966
QRCodeDecoder.prototype.stop = function() {
39573967
if (this.stream) {
39583968
this.stream.stop();
@@ -3968,12 +3978,13 @@ QRCodeDecoder.prototype.stop = function() {
39683978
/**
39693979
* Sets the sourceId for the camera to use.
39703980
*
3971-
* The sourceId can be found using the getVideoSources
3972-
* function on a browser that supports it (currently
3973-
* only Chrome).
3974-
*
3975-
* @param {String} sourceId The id of the video
3976-
* source you want to use (or false to use the current default)
3981+
* The sourceId can be found using the
3982+
* getVideoSources function on a browser that
3983+
* supports it (currently only Chrome).
3984+
*
3985+
* @param {String} sourceId The id of the
3986+
* video source you want to use (or false to use
3987+
* the current default)
39773988
*/
39783989
QRCodeDecoder.prototype.setSourceId = function (sourceId) {
39793990
if (sourceId) {
@@ -3996,7 +4007,8 @@ QRCodeDecoder.prototype.setDecoderCallback = function (cb) {
39964007
};
39974008

39984009
/**
3999-
* Gets a list of all available video sources on the device
4010+
* Gets a list of all available video sources on
4011+
* the device
40004012
*/
40014013
QRCodeDecoder.prototype.getVideoSources = function(cb) {
40024014
var sources = [];

build/qcode-decoder.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/vendor/jsqrcode.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "qcode-decoder",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "Decodes QRCode in the Browser and Node",
55
"main": "index.js",
66
"directories": {

0 commit comments

Comments
 (0)