user2106262
user2106262

Reputation: 21

On a click of an html button open the ios Camera

I have an html page, within it i have a button called open camera, it is a regular button. I was wondering how to i go to the native side of ios and make the camera open by a click from the html content?

Upvotes: 2

Views: 5407

Answers (1)

Paul N
Paul N

Reputation: 1931

Starting iOS 6 you can use this code:

<input type="file" accept="image/*" capture="camera">
<input type="file" accept="video/*" capture="camera">

It will act like a regular file upload, but instead, it will open the iPhone camera and upload a picture or a video as mentioned in this StackOverflow answer

Upvotes: 5

Related Questions