aspirante
aspirante

Reputation: 13

Can I capture camera input on mobile devices using only HTML5 and JavaScript?

Below are some requirements of an app I want to build. Could you please let me know if this can be accomplished with html/jscript instead of native apps (ios, Android, windows)? Any other recommendations of libraries to make it easier to build are welcome as I am not an experienced web developer.

• targeted at mobile devices
• requires access to device's camera
• ability to add objects (say a rectangle) to a "canvas" and drag-drop it.
• ability to know during the drag operation the coordinates of the object in relation to the canvas.

Upvotes: 0

Views: 674

Answers (2)

Prateek
Prateek

Reputation: 4013

Well you should better ask programming questions here! Still check the answer. It will help I guess.

  • targeted at mobile devices - html5 and js will do.
  • requires access to device's camera - phone gap js will do.
  • ability to add objects ... - html5 and js will do.
  • ability to know during the drag operation ... - html5,js (your knowledge applies) , phone gap library has also a bit support check for it.

Well, your question is regarding the development of mobile apps using HTML5 and Javascript. So some good libraries are present already like phone gap . Go to the links and use the knowledge of your HTML5 and Javascript to fulfill your needs.

As far as your requirements are concerned they can be accomplished using phone gap js libraries. Its quite easy to handle just try it here with the latest version phonegap , the link answers in its documentation what you exactly want.

Upvotes: -1

Chris Clower
Chris Clower

Reputation: 5104

Yes, absolutely! You can capture a camera directly in HTML5 without the use of libraries: http://dev.w3.org/2009/dap/camera/

Also, HTML5 has the ability to drag and drop items around on the canvas, and can know the coordinates of the object as well as the mouse. jQuery can also meet this requirement, but it's not the only JavaScript library capable of doing so (it's arguably the most popular though, and for good reason in my opinion).

Upvotes: 5

Related Questions