eduardolundgren / tracking.js

A modern approach for Computer Vision on the web
http://trackingjs.com
Other
9.44k stars 1.45k forks source link

Green screen on phonegap app #165

Open vitornogueira opened 8 years ago

vitornogueira commented 8 years ago

Hi.

I am using trackingjs in a packaged app with phonegap. I implemented the sample track of colors and apparently functions normally but the smartphone screen turns green.

screenshot_2016-07-16-01-39-22

selection_338

From what I analyzed is not a trackingjs problem but the process of displaying the video on the video tag. I tried to capture video manually and the same thing happens.

var element = document.getElementById('myVideo');

window.navigator.getUserMedia({
  video: true,
  audio: false
}, function(stream) {
    try {
      element.src = window.URL.createObjectURL(stream);
    } catch (err) {
      element.src = stream;
    }
  }, function() {
    throw Error('Cannot capture user camera.');
  }
);

Has anyone ever experienced this?