Can an iPhone Web App use the Camera?

后端 未结 3 1258
我寻月下人不归
我寻月下人不归 2021-01-18 07:04

I have a web app and I want to take photos and then upload them to a server. Can this be done with a webapp?

3条回答
  •  囚心锁ツ
    2021-01-18 08:05

    This is now possible with iOS 6 and HTML5.

    Using the tag, you can get file input from either the camera or gallery (the familiar "take photo or video, choose existing"). Try:

    
    

    this will pull up the aforementioned dialog box of options. You can also add the accept attribute to specify whether you want image or video, like so:

    
    

    Max Firtman has a great article about what you can do with iOS 6 and HTML5 here: http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers

提交回复
热议问题