mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-13 13:51:37 +08:00
Remove console-messages for production build
This commit is contained in:
@@ -27,7 +27,9 @@ function loadedData(video, callback) {
|
||||
function checkVideo() {
|
||||
if (attempts > 0) {
|
||||
if (video.videoWidth > 0 && video.videoHeight > 0) {
|
||||
console.log(video.videoWidth + "px x " + video.videoHeight + "px");
|
||||
if (ENV.development) {
|
||||
console.log(video.videoWidth + "px x " + video.videoHeight + "px");
|
||||
}
|
||||
callback();
|
||||
} else {
|
||||
window.setTimeout(checkVideo, 500);
|
||||
|
||||
@@ -20,12 +20,14 @@ FrameGrabber.create = function(inputStream, canvas) {
|
||||
_canvas.height = _canvasSize.y;
|
||||
_ctx = _canvas.getContext("2d");
|
||||
_data = new Uint8Array(_size.x * _size.y);
|
||||
console.log("FrameGrabber", JSON.stringify({
|
||||
size: _size,
|
||||
topRight: topRight,
|
||||
videoSize: _video_size,
|
||||
canvasSize: _canvasSize
|
||||
}));
|
||||
if (ENV.development) {
|
||||
console.log("FrameGrabber", JSON.stringify({
|
||||
size: _size,
|
||||
topRight: topRight,
|
||||
videoSize: _video_size,
|
||||
canvasSize: _canvasSize
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses the given array as frame-buffer
|
||||
|
||||
@@ -34,7 +34,9 @@ ImageLoader.load = function(directory, callback, offset, size, sequence) {
|
||||
}
|
||||
}
|
||||
if (notloadedImgs.length === 0) {
|
||||
console.log("Images loaded");
|
||||
if (ENV.development) {
|
||||
console.log("Images loaded");
|
||||
}
|
||||
callback.apply(null, [htmlImagesArray]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user