I am trying to set up my app to be able to switch to 'selfie mode' so that users can take a picture with 2-D layovers or with 3-D models.
I tried setting the 'startupConfiguration' to 'front' when instantiating the viewer (in this case I was using 3D models feature. The system began with the front camera, but after several seconds, automatically switched to 'back'.
I also tried setting AR.hardware.camera.position = AR.CONST.CAMERA_POSITION.FRONT in live code, but this seemed to have no effect.
Is it possible to switch the live AR viewer to front camera? Or if not live, to configure it before instatiating to be 'front'?
Could you please provide the following details:
- Which version of the SDK are you using?
- Are you working with the JS API or the Native API?
- Are you using any of our Extensions (Cordova, Xamarin, Unity)? If yes, which version are you using
- What device/OS does this happen with - is it device specific or happening with different devices?
- Is the "Hardware Control > Front Camera" sample working on the device? If yes, did you make sure to have look the code and documentation for the front camera implementation?
Thx and greetings
Wikitude SDK Version: 8.5.0
I am using JS API with Cordova Extension.
I have been trying this on an iPhone (6S). I have not tried it with Android.
I have the code sample for how I tried to accomplish this above. I tried in the config while opening Wikitude world, and I tried it later in the code (see sample above). These were taken from documentation on site.
So in your tests with the unchanged sample app, the Front cam switched to the Back cam automatically after some seconds? I just tried on an iPhone 6S+ (iOS 12) and it was working without any issues.
Could you please reconfirm that the automatic switch is happening with the unchanged sample app as well? If this is working, please have a detailed look at your implementation and compare with the sample app.
If this is happening also with the unchanged sample app, could you please share the exact steps to reproduce the issue.
Thx for your help and greetings