Remove console-messages for production build

This commit is contained in:
Christoph Oberhofer
2016-02-28 20:03:35 +01:00
parent 835f524b33
commit 47f0169709
8 changed files with 57 additions and 20 deletions
+3 -1
View File
@@ -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);
+8 -6
View File
@@ -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
+3 -1
View File
@@ -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]);
}
};