Accessing camera in phone for iOS and Android using HTML5

10,067

As you can see on "Can I use" the getUserMedia isn't yet available on most mobile browsers. The latest Chrome for Android should support it though.

Using <input type="file" accept="image/*;capture=camera"> seems to work on most modern mobile browsers.

Share:
10,067
LariJL
Author by

LariJL

Updated on June 24, 2022

Comments

  • LariJL
    LariJL almost 2 years

    I need to create a photobooth mobile application and decided to use HTML5 to work on my mobile application. Currently, I am using the getUserMedia method which works perfectly well on my laptop webcam. However when I tried to test it out on my phone as an mobile application, it could not work and all it shows is a video icon. Which leads me to find out that getUserMedia does not support in Android Browser.

    I would still like to continue using HTML5 to get my photobooth mobile application working but how can I access the camera in my phone and is it possible to do it?

  • LariJL
    LariJL over 9 years
    Yes, it was through "Can I Use" that I realize getUserMedia is not available on most mobile browser. Is there a way to access the native camera on iPhone or Android phone or any method to to build a camera mobile application through HTML5?
  • Zomby
    Zomby over 9 years
    Using <input type="file" accept="image/*;capture=camera"> seems to work on most modern mobile browsers. I didn't do extensive testing though so your mileage may vary.