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

128
Views
getUserMedia html js web camera not working on android

I'm using getUserMedia to make a website that can display a camera stream. The problem is, my code works on computer, but not through a mobile browser. Does anyone know why? (requesting camera access doesn't even pop up)

<!DOCTYPE html>
<html>
<style>
left {
  margin: 0px;
}
right {
  margin: 1000px;
}
</style>
<body>
<div id="left">
  <video autoplay="true" id="videoElement"></video>
</div>
<div id="right">
  <video autoplay="true" id="videoElement1"></video>
</div>

<script>
var video = document.querySelector("#videoElement");
var video1 = document.querySelector("#videoElement1");
if (navigator.mediaDevices.getUserMedia) {
  navigator.mediaDevices.getUserMedia({video:true})
    .then(function (stream) {
      video.srcObject = stream;
      video1.srcObject = stream;
    })
    .catch(function (err0r) {
      console.log("Something went wrong!");
    });
}
</script>
</body>
</html>
about 4 years ago · Juan Pablo Isaza
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!