Skip to content
Drempd Logo
  • home
  • portfolio
  • web design journal
  • blog
    • adventure
    • san diego
    • projects
    • website design
    • code notes
  • contact
Blog Web Dev Javascript Capture Camera on Phone Doesn’t Work on iPhone

Javascript Capture Camera on Phone Doesn’t Work on iPhone

By Forrest Smith - Drempd.com

On an iphone you need to add a 'playsinline' parameter. I think it works by placing it either in the javascript, or as part of the HTML tag -- I just added it to both to be safe, and it resolved the issue so I called it good.

In javascript as part of the getUserMedia function:
let stream = await navigator.mediaDevices.getUserMedia({ 
  video: {
    facingMode: 'environment',
    playsinline: true
  }, 
  audio: false 
});


Just in the HTML
<video id="video" style="width: 100%; height: 100%;" autoplay playsinline></video>

Posted on June 9, 2022August 28, 2025 in Web Dev

I love to create and explore. Whether building a website or app, taking a long walk through the mountains, or playing with a random idea, I've found that there will never be enough time to experience it all. But that won't stop me from trying.

Web Design & Development

  • Portfolio
  • San Diego Website Design
  • Custom Web Design
  • Responsive Web Design
  • Website Maintenance
  • Freelance Web Designer
  • Web Design Posts
  • Website Checklist

Projects

  • Zindash
  • Opti
  • Saphire CSS
  • Ergo Blocks

Blog

  • Adventure
  • San Diego
  • Projects
  • Website Design
  • Technology
  • Code Notes
  • Stream

About

  • Bluesky
  • Resume
  • Contact
drempd | san diego, ca
© 2026 Drempd All rights reserved.