Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
how can i save a photo captured using c# or javascript in asp.net. i wanted to save it automatically in a project folder

////Here's my code in calling the web cam and capturing photo using javascript.

var constraints = { video: { facingMode: "environment" }, audio: false };

var track = null;

const cameraView = document.querySelector("#camera--view"),

cameraOutput = document.querySelector("#camera--output"),

cameraSensor = document.querySelector("#camera--sensor"),

cameraTrigger = document.querySelector("#camera--trigger");

function cameraStart() {

navigator.mediaDevices

    .getUserMedia(constraints)

    .then(function(stream) {

        track = stream.getTracks()[0];

        cameraView.srcObject = stream;


    })

    .catch(function(error) {

        console.error("Oops. Something is broken.", error);

    });

}

cameraTrigger.onclick = function() {

cameraSensor.width = cameraView.videoWidth;

cameraSensor.height = cameraView.videoHeight;

cameraSensor.getContext("2d").drawImage(cameraView, 0, 0);

cameraOutput.src = cameraSensor.toDataURL("image/webp");

cameraOutput.classList.add("taken");

// track.stop();

};

window.addEventListener("load", cameraStart, false);

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!