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

314
Views
MediaDevices.getUserMedia() prompts the user for permission then launches camera app on full screen instead of in-browser

I am using getUserMedia() to take images on a vue web app. Working everywhere except on iOS safari. The user is asked permission for accessing the camera, after user accepts the camera is launched on a full screen instead of in-browser. I have to manually close it and then I can see the camera feed in my web app.

Can this be avoided? I want to show the camera feed in the browser where I have some functionality instead of launching the camera on full screen after user confirms permission. I'm guessing this is a iOS-safari issue and not js or chrome..

Basic syntax:

navigator.mediaDevices.getUserMedia(constraints)
.then(function(stream) {
  /* use the stream */
})
.catch(function(err) {
  /* handle the error */
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In my case, adding playsinline attribute into element solved the problem.

Working code:

<video
    ref="video"
    autoplay
    playsinline
/>

<script>
    const stream = await navigator.mediaDevices.getUserMedia({
      video: true,
      audio: false,
    })

    this.$refs.video.srcObject = stream
</script>
about 4 years ago · Juan Pablo Isaza Report
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!