Welcome! Log In Create A New Profile


Using a Webcam with WB24

Posted by mixgh 
Using a Webcam with WB24
October 28, 2019 12:32AM
I need to let my users take pictures and load into the database. Has anyone used the webcam control successfully?

If not, is there an alternative?

Thanks and regards

Re: Using a Webcam with WB24
November 10, 2019 10:38PM
Yes it can be done donot use that control , brows the web and add it yourself

There is a very cool way to add anything you need:

Creation ==>Webcomponent ==> Other

Then you can addsome javascript to get the cam and then it will display your cam . You then can save the picture.

This is awesome. I made a barcode scanner on a website this way. * without a native app


Renko Allard

Sorry Here code that will help you out:

html placeholder:
<video id="video" width="640" height="480" autoplay></video>
<button id="snap">Snap Photo</button>
<canvas id="canvas" width="640" height="480"></canvas>

var video = document.getelementbyID('video')
// Make sure you can connect to the camera
if (navigator.mediaDevices.getUserMedia)
{navigator.mediaDevices.getUserMedia({video:true }).then
video.srcObject = stream;

// Elements for taking the snapshot
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var video = document.getElementById('video');

// Trigger photo take
document.getElementById("snap").addEventListener("click", function() {
context.drawImage(video, 0, 0, 640, 480);

Edited 1 time(s). Last edit at 11/11/2019 08:32AM by Allard.
Re: Using a Webcam with WB24
November 12, 2019 08:46PM
Thanks so much Allard, I'll give it a try.


Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.