Jump to content

Recommended Posts

  • 2 months later...
Posted

Hello!

I'm using the UnimBarcodescanner component. It works great.

I use "UnimBarcodeScanner1.CameraList;" to obtain the available cameras.

Unfortunately the list of available cameras isn't correct:

1. Microsoft Surface Pro 7: all is ok. There is a front and a rear camera available.

2. iPhone 11: Here's only the front camera available.

3. Android mobile: here are 5 (!) rear cameras available but no front camera.

Thanks in advance

Posted
On 11/4/2021 at 12:49 PM, likemike said:

Hello!

I'm using the UnimBarcodescanner component. It works great.

I use "UnimBarcodeScanner1.CameraList;" to obtain the available cameras.

Unfortunately the list of available cameras isn't correct:

1. Microsoft Surface Pro 7: all is ok. There is a front and a rear camera available.

2. iPhone 11: Here's only the front camera available.

3. Android mobile: here are 5 (!) rear cameras available but no front camera.

Thanks in advance

I would like to know, if I'm the only one with this problem? Maybe it's a problem with some specific mobiles or Android-version...

  • 1 month later...
Posted

Sorry for pushing, but the problem with UnimBarcodeScanner1.CameraList is still actual.

The UnimBarcodeScanner1.CameraList; doesn't load all video devices on Android devices (only the front cameras are listed).

Another problem: on iOS-devices the 1st try gives only "Video device 1 =", while the 2nd try loads front and rear camera correctly.

Maybe there is a new version of ZXING.min.js?

Posted
6 hours ago, likemike said:

Sorry for pushing, but the problem with UnimBarcodeScanner1.CameraList is still actual.

The UnimBarcodeScanner1.CameraList; doesn't load all video devices on Android devices (only the front cameras are listed).

Another problem: on iOS-devices the 1st try gives only "Video device 1 =", while the 2nd try loads front and rear camera correctly.

Maybe there is a new version of ZXING.min.js?

Hi

Did you try with new version of ZXING?

  • 2 weeks later...
  • 1 month later...
Posted
4 hours ago, NNPaulo said:

Hi Hayri Aslan; Is possible for you, create a TUnimWebCam; a WebCam component, but for mobile?

Thanks in advance;

Hello

Unigui natively support mobile webcam.

Add a UnimFileUploadButton to form and set capture to camera.

Also you can use below trick.

 

Posted
On 2/9/2022 at 1:13 PM, Hayri ASLAN said:

Hello

Unigui natively support mobile webcam.

Add a UnimFileUploadButton to form and set capture to camera.

Also you can use below trick.

 

Thanks Hayri; Work perfect!

  • 3 months later...
Posted

Can you replace below code in uniwebcam.pas, line 140

 

  UniSession.AddJS('navigator.mediaDevices.getUserMedia({ audio: true, video: true }).then(function(stream) {'+
                   'if (typeof navigator.mediaDevices.enumerateDevices != "undefined") { '+
                   '     navigator.mediaDevices.enumerateDevices() '+
                   '         .then(function(devices) { '+
                   '             var cameras = devices.filter(function(device) { '+
                   '                 return device.kind === "videoinput"; '+
                   '             }); '+
                   '             var uniguiCameras = {}; '+
                   '             uniguiCameras.count = cameras.length; '+
                   '             cameras.forEach(function(camera, i) { '+
                   '                 uniguiCameras["label" + i] = camera.label; '+
                   '                 uniguiCameras["deviceId" + i] = camera.deviceId; '+
                   '             }); '+
                   '             ajaxRequest('+JSName+', "cameras", uniguiCameras); '+
                   '         }); '+
                   ' } }))');

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...