2

I'm using Camera Plus with Nativescript Vue. The camera preview is very zoomed in, but when I take a photo it comes out normal. This only happens on Android. Anyone out there who have experience with this plugin and knows what the issue might be? Is there a 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.

My implementation:

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

1 Answers1

0

Indeed, I registered this issue here.

This is actualy due to the Android's native implementation used by nativescript-camera-plus. It's named FancyCamera and developed in Kotlin language. Since new release 3.1.0 of CameraPlus uses new FancyCamera version as well, which has a new implementation using new Android camerax library (for android api 21+). With theat, the new plugin has the zoom issue is fixed.

However, at the moment I'm writing, the new implementation has bugs, which I'm tryingto fix, as explained here. Help is welcome.

Murilo Perrone
  • 452
  • 4
  • 7