Jan,

In 1.3 and lower, you probably to start the preview stream for the camera to work properly: getCamera --> getPreviewStream --> takePicture.

In 1.4+ getCamera implicitly starts the preview for you, and you can set the mozSrcObject on a <video> element to the returned object.

--m.


On 14-10-20 05:55 PM, Jan Jongboom wrote:
This afternoon I saw weird behavior, and I can't explain it by looking at the code. This phone runs normal Tarako 1.3t build.

-> Taking photo from camera -> all is well, always works

-> Taking photo from another camera app (certified and stuff) via:

navigator.mozCameras.getCamera({ camera: 'back' }, function(c) { 
  window.c = c;
}, function(err) { console.error(err); })

This works fine ^

window.c.takePicture({ 
  dateTime: Date.now() / 1000, 
  fileFormat: 'jpeg', 
  position: null, 
  rotation: 0
}, 
  console.log.bind(console), 
  console.error.bind(console))

This runs indefinitely ^

No clue how that can happen. Anyone ever seen something? I can't repro on normal camera...
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to