Dynamsoft / capture-vision-react-native-samples

Dynamsoft Capture Vision React-Native SDK Samples
https://www.dynamsoft.com/capture-vision/docs/introduction/
Other
15 stars 7 forks source link

Adding beep sound to react-native Dynamsoft library #47

Closed siyang-bunnings closed 1 month ago

siyang-bunnings commented 2 months ago

Hi guys,

Do you have any plan to add the beep sound to the react native library?

I checked the document and it looks like this feature is available on the other platforms. https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/feedback.html#beepsoundsource

it's good to have the sound after successfully scanning the barcode. it would also be good to make this beep sound under controlled by volume settings or ring mode. For example, mute this sound if the silent mode is on.

Thanks

Dynamsoft-Henry commented 2 months ago

Hi @siyang-bunnings

We are developing a 2.x version of Capture Vision React Native and the beep sound is included in that version.

Currently, we don't have plans to update dynamsoft-capture-vision-react-native v1.x unless the library is reported to have bugs.

siyang-bunnings commented 2 months ago

Hi Henry,

Thanks for the message. Do you know the approximate release date of version 2.x?

Dynamsoft-Henry commented 2 months ago

@siyang-bunnings It is hard to estimate right now because it is still under development. Might be released after a few months.

siyang-bunnings commented 1 month ago

Hi @Dynamsoft-Henry

We received few feedbacks about adding the zoom in / zoom out function to the library. Will this feature be included in version 2.x? Or more generally, will v2.x support camera enhancer functions?

Thanks

Dynamsoft-Henry commented 1 month ago

What kind of zoom in/out are you looking for? 1) auto-zoom in/out. (This is already available https://www.dynamsoft.com/capture-vision/docs/mobile/programming/react-native/api-reference/camera-view.html#enhancedfeatures) 2) Controlling the zoom factor

siyang-bunnings commented 1 month ago

cool, thanks. i did not realise you added this enhancedFeature in the latest version.

siyang-bunnings commented 1 month ago

Hi @Dynamsoft-Henry,

Does this library support macro camera mode on iPhone 15? I tried with different settings / configurations but I could not see the camera is switched to macro one. I have to keep a certain distance otherwise the camera can not focus such close. I also cannot zoom.

Here is the code:

          <DCVCameraView
            cameraPosition={EnumCameraPosition.CP_BACK}
            overlayVisible={false}
            enhancedFeatures={EnumEnhancedFeatures.EF_AUTO_ZOOM}
            ref={ref}
            scanRegionVisible={false}
            scanRegion={{
              regionBottom: 65,
              regionLeft: 15,
              regionRight: 85,
              regionTop: 35,
              regionMeasuredByPercentage: true,
            }}
            style={StyleSheet.absoluteFill}
          />

I may misunderstand the auto_zoom function or make something wrong on the config. Please let me know, thanks :)

https://github.com/Dynamsoft/capture-vision-react-native-samples/assets/108040543/bb84cae4-b03e-4e2f-bdc5-a60e9f486769

Dynamsoft-Henry commented 1 month ago

Currently, we don't support this feature. Our group is evaluating whether and how to support it in the DCV 1 react native. I will back to you later.

Note: This issue is not related to the camera zoom. The iOS default camera (wide-angle camera) can't focus when you close up to the target. On the new iPhones, the system camera supports switching the camera automatically. It switches to the ultra wide-angle camera which can focus on short distances (you don't need to configure additional zoom or focus settings).

Dynamsoft-Henry commented 1 month ago

Hi @siyang-bunnings

We had a meeting internally on the new requirements. I'm sorry that the new requirements are not approved on DCV 1 react native. For now, I think you can look for some other way to trigger the beep when a barcode is decoded (I think there are open-source solutions that support beep sound).

If you are really concerned about the camera focus issue, please contact our support team via https://www.dynamsoft.com/company/customer-service/#contact. We can consider it again.

siyang-bunnings commented 1 month ago

Thanks for the reply.

So I would like to confirm:

  1. The beep sound would be added to DCV 2 react native
  2. We do not have any plan to support 'ultra wide-angle camera' in DCV 1 react native.
Dynamsoft-Henry commented 1 month ago

Hi @siyang-bunnings

  1. Beep will be added to DCV 2.
  2. DCV 1 will not support ultra-wide-angle camera.

If you want to enable the beep sound currently, you can use 3 party sound-controlling libraries. For example: https://www.npmjs.com/package/react-native-sound

siyang-bunnings commented 1 month ago

Thanks so much

Dynamsoft-Henry commented 11 hours ago

Hi @siyang-bunnings

The above features are added to v1.1.15 1) Beep: Call beep method of DCVFeedback class. 2) Ultra-Wide-Angle camera:

Dynamsoft-Henry commented 7 hours ago

Hi @siyang-bunnings

Sorry. 1.1.15 has some bugs. We released 1.1.16. Please use this instead.