nstudio / nativescript-camera-plus

MIT License
79 stars 50 forks source link

Preview is zoomed on Android #126

Closed linesharina closed 4 years ago

linesharina commented 4 years ago

The camera preview is very zoomed in, but when I take a photo it comes out normal. This only happens on Android. Is this a bug, or is there any way to control the zoom?

I have also noticed if I set the height of the preview to around 300, it's not zoomed in, but the higher the height, the more zoomed in it gets.

I'm using Camera Plus with Nativescript Vue. I've implemented it like so:

app.js

import Camera from './components/Camera';
const CameraPlus = require("@nstudio/nativescript-camera-plus");

Vue.registerElement('CameraPlus', () => CameraPlus.CameraPlus);

const app = new Vue({
  template: `
        <Frame>
            <Camera />
        </Frame>`,
  components: {
    Camera,
  },
});

app.$start();

camera.vue

<template lang="html">
  <Page>
      <CameraPlus></CameraPlus>
  </Page>
</template>

Tested on Android 9 and 10 with Camera Plus v3.0.7

innozent commented 4 years ago

I am also face this issue and my workaround is to using camera plus version 2.2.7 instead.

But another issue is if you run it on android below 5.1 or 5.0 it will crashed the app.

triniwiz commented 4 years ago

Fixed: https://github.com/nstudio/nativescript-camera-plus/commit/b24997c918df8ceafb73443708a58708be46d5ed feel free to reopen :- update to 3.1.x