0

I am trying to create an app using an HTML5 form in which user can take picture using webcam and upload to server. I searched on the internet and tried several plugins and read a couple of posts and here is the summary of my research during which I found these plugins useful. enter image description here

But the problem is that, none of the plugin works in all browsers, meaning Firefox, Opera, Chrome, Safari and IE.

So this is my question: Is there any method using jQuery or Javascript or without them in HTML5 to use webcam to take pictures?

Webrtc is a good one, but it's not working in IE and Safari. How can I make this function in all browsers?

P.S.: Target Browsers are IE, Firefox, Google Chrome, Opera and Safari.

Please advise.

Nikhil Agrawal
  • 26,128
  • 21
  • 90
  • 126
  • To access the webacam you'll have to use getusermedia but it doesn't work on ie. I think using some sort of flash plugin with a getusermedia fallback for mobile devices is your best bet. Just my opinion though. – Jonas Grumann Dec 10 '13 at 09:13
  • @JonasGrumann Thanks for helping but without using flash we do not have any method which can work in all browsers?. 2. getusermedia works in safari or not? – Nikhil Agrawal Dec 10 '13 at 09:15
  • I'm afraid safari doesn't support it neither. I suggest you use this: https://code.google.com/p/wami-recorder/ – Jonas Grumann Dec 10 '13 at 09:18
  • Newer mobile browsers (Android, iOS), automatically offer the camera as an option if the input type is `image`. Are you just wanting the user to have the option of their webcam for an image upload, similar to the mobile browser behavior, or are you wanting the webcam to be the only option or are you wanting the page to have direct access to the webcam feed so that the video is displayed within the page and some "capture" event can be used? – Anthony Dec 10 '13 at 09:18
  • @Anthony Thanks for helping. YA I want he webcam to be the only option For uploading pictures. – Nikhil Agrawal Dec 10 '13 at 09:21
  • https://developer.mozilla.org/en-US/docs/WebRTC/Taking_webcam_photos - Requires WebRTC, currently only built into Firefox and Chrome (and Opera with Chrome engine). Here's a neat demo: http://jsfiddle.net/codepo8/agaRe/4/ – Anthony Dec 10 '13 at 09:25
  • The HTML5 is not compatible to all browsers yet. Probably you have to use some customized plugin. you can read this article - [Take a Photo from a Desktop Webcam and Upload in a Web Browser](http://www.codeproject.com/Articles/529721/Take-a-Photo-from-a-Desktop-Webcam-and-Upload-in-a) – yushulx Dec 12 '13 at 02:03

0 Answers0