3

So I really don't know how to ask this question because I have not found any information on it at all but I will give it a go. Though a web application that I am developing I need to take a picture and save it using the built in camera.

Is there a way to do this in JavaScript?

keno
  • 2,956
  • 26
  • 39
washcloth
  • 2,730
  • 18
  • 29
  • Javascript is mostly client side. You might need something that can interface hardware via Java or .Net – Frank Tudor Mar 27 '14 at 19:59
  • @FrankTudor well most application for the store are written in javascript that interact with the camera but I can not find any information or example code that shows me. So i know it can be done. It might be just me but anything that i try to look up for the windows surface has no documentation at all. – washcloth Mar 27 '14 at 20:01
  • 1
    @FrankTudor There are plenty of ways to interact with a camera with JavaScript. Check out WebRTC and getUserMedia. – Brad Mar 27 '14 at 20:12
  • @ExcelledProducts While I was typing I was thinking node.js is an exception but I am not sure how to code with node.js or if it can be done. I have done these kinds of things with Coldfusion talking to printers and ports and devices like shipping scales using serial ports, hand scanner interfaces and barcode reading. So I have done one or two things with devices. The problems was I was always accessing some deeper .NET or Java apps or classes to extend CF and used JS for client stuff. Never to access the devices with JS. I upvoted/favorites because I would be interested what others say. – Frank Tudor Mar 27 '14 at 20:13
  • @Brad and there you go! Someone knows something. I will check out WebRTC...Thank you. – Frank Tudor Mar 27 '14 at 20:13
  • 1
    Now the question is, are they available on WindowsRT? I don't know, but I can't imagine WindowsRT devices would have cameras if nobody could use them. – Brad Mar 27 '14 at 20:15

1 Answers1

0

Using javascript might not be the best idea, since I think its still in Beta, and its buggy. You can use getUserMedia in html5 or you can use flash. But accesing hardware using javascript is gonna be very complicated and will require a lot of permissions.