Example for adding image from USB camera

This chapter takes Cam2web as an example to show how Webcam component works.

Prerequisite

Get the image address

  1. Open cam2web.exe.

  2. Set the port under File -> Setting.

    Note

    The port you entered must not be occupied by other application.

  3. Select the USB camera from the Camera drop-down list and click the Start streaming button.

    In this example, "HP HD Camera" is the camera USB camera connected to the laptop.

  4. Click Streaming on port ... to view the live page.

  5. Right-click the image and select Copy image address.

Set the Webcam Animation and view the video in the web project

  1. Create a Webcam component in your web project.

  2. Click "..." at the right end of the row Http live stream address.

  3. In the Webcam-Http Live Stream Address window, paste the image address.

  4. Click the down arrow at the right end of the row Live Stream Video Type and select MJPEG.