Answer the question
In order to leave comments, you need to log in
How to fix camera in portrait mode when capturing image in cocoonjs?
I looked for a solution both in the code and in the documentation, but the problem does not seem to exist.
Essence:
We launch the project through the command line npm module cocoonjs: cocoonjs serve
We open the project through the application (primarily interested in android) CocoonJs Launcher
The capture code corresponds to the example (the discrepancies are not significant) from the documentation:
var cimage= document.getElementById("camera");
...
var cctx= cimage.getContext("2d");
...
var camera = CocoonJS.Camera;
var im = camera.startCapturing(0, 640, 640, 30);
if (im != null){
setInterval( function() {
cctx.drawImage( im, 0, 0, cimage.width, cimage.height );
}, 60 );
}
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question