NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: rjolda on October 20, 2023, 10:42:39 AM
-
Hi
Using NT 14.07 Clarion 11.0.136
When taking a photo with a mobile phone - I remember Bruce showing I think a button which allowed the end user to be able to switch between Front and Back camera depending on what they wanted to take a photo of.
I tried setting up a Button but that did not work.
Anyone can supply details on how to allow the end user to change the camera on their mobile phone that they are wanting to use?
Thanks,
Ron
-
In the template:
Add a button to your form.
Set the button type to be "Webcam".
On the "On click" tab, set the Action to "Switch Camera".
In server-side code:
p_web.script('$("#somefield-camera").ntcam("switch")')
In JavaScript code
$("#somefield-camera").ntcam("switch");
You can also force a specific camera by setting the parameter to "user" or "environment". As in
p_web.script('$("#somefield-camera").ntcam("switch","user")')
$("#somefield-camera").ntcam("switch","environment");
Cheers
Bruce
-
Thanks Bruce,
Ron