Reputation: 1267
I'm working on a project with Asp.net MVC4. I need to take pictures with a webcam. This application should be configurable with any tablet. Currently runs the application on desktop, on tablets no.
I am using jscam.swf and jscam_canvas_only.swf.
On tablets I use this the Samsung Galaxy on these devices install adobe flash player to a well does not work ... someone knows some other technology to take pictures or if someone can help me solve this problem I'll be grateful
Upvotes: 5
Views: 8659
Reputation: 4963
const userVideo = await navigator.mediaDevices.getUserMedia({ video: true })
const userVideoTrack = userVideo.getVideoTracks()[0]
const photoBlob = await new ImageCapture(userVideoTrack).takePhoto()
You can then proceed the blob with something like the FileReader
or URL
API.
Upvotes: 0
Reputation: 1267
I found the way to enable the camera and audio using HTML5 Chrome using Android for tablets. We connect to chrome://flags/ and look for WebRTC. After we enable this flag. Restart the browser or tablet and working properly.
Upvotes: 0
Reputation: 36113
Flash has limited support on Android tablets and no support on iOS devices.
A better solution may be to move to 100% HTML5. When using HTML5, your browser has access to your webcam. Below are some links showing HTML5 accessing your webcam:
Upvotes: 6
Reputation: 334
Have you tried with Silverlight? Since you are using .NET this might be helpful. http://elegantcode.com/2009/11/20/silverlight-4-webcam-a-quick-glance/
SL is a simple plugin it runs on every browser, you just need to embed your Silverlight component within your view code and the browser will handle it as an object tag.
Hope it helps.
Upvotes: 0