VirtuoWorks / CanvasCameraPlugin

Cordova/PhoneGap CanvasCamera Plugin
MIT License
38 stars 30 forks source link

fps not work #31

Open marsiliflavio opened 4 years ago

marsiliflavio commented 4 years ago

hi, i have this code document.addEventListener('deviceready', function () { var objCanvas = document.getElementById('canvas'); window.plugin.CanvasCamera.initialize(objCanvas); var cameraOptions = { width: window.screen.width, height: window.screen.height, canvas: { width: window.screen.width, height: window.screen.height }, capture: { width: window.screen.width, height: window.screen.height }, fps: 1, use: 'data', flashMode: false, thumbnailRatio: 1/6, cameraFacing: 'front', onBeforeDraw: function(frame){

      },
      onAfterDraw: function(frame){
        //save in list
      }
    };
    window.plugin.CanvasCamera.start($scope.cameraOptions, function(error) {

    }, function(data) {

    });
}, true);

the camera is ready in canvas, but capture 30 frames/sec. My array contains after 2 seconds about 60 frames. But i have set 1 fps and i suppose max 2 frames after 2 seconds.