I am creating an html5 website for mobile and need to get camera access through the web browser without allowing the user to upload the picture from the gallery. I am having trouble making this work in iOS but in Android it works perfect.
Related
I'm developing a web application for remote assistance.
The webpage uses WebRTC to stream footage from the camera of one client to the other client.
Everything is working fine, with the default internal phone cameras that is (via navigator.mediaDevices.getUserMedia()).
The problem is that I'm developing this for a smartglass connected to the phone via USB3. I want to use the camera from the smartglass instead of the internal camera's.
When I enumerate all devices, I only get two audio devices and two video devices (the two internal cameras) even with the smartglass plugged in. I'm logging this remotely in chrome for desktop.
Also navigator.usb.getDevices won't give me any results.
Is it possible to access USB cameras from Javascript in Chrome for android?
This is not a duplicate question. In contrast to the other question I DO have access to the camera's, only not the camera I want, which is an external camera connected to my phone by USB3
Recently we worked on reading a QR code in our website, with manual focus camera in the System browser (Chrome) and the same is tested with Mobile browser (chrome) with mobile camera. We succeed in doing it but, according to the end user feed back its actually taking time to read/scan with manual focus camera and its easy with mobile camera. But as per our requirement we need to implement it on PC browser with manual focus camera.
Is there any way that we can use Mobile device camera to integrate with the PC browser. Currently we are working with few JAVA based mobiles which allow mobile camera to use as web cam. Any help would be appreciated to crack this.
what I have used is cordova has many plugins that can consume using Javascript or if you use angularjs there is a version called ng-cordova.
Cordova https://cordova.apache.org/
Ng-cordova: http://ngcordova.com/
I hope that will help.
You Can Use Mobile Camera With PC Browser But It Is Difficult
Step:
Write An Application To Capture Picture From Phone And Send It To Browser .
Phone And PC Should Be At Same Network And Phone Accessed From Browser with It Local IP address To Get Pictures .
Users Most Install Your Application On They Phones And Set Static IP Adderss For Phones Example 192.168.1.100
In Website You Most Get Picture From 192.168.1.100 And Show It.
I am building a web app which should open the front camera in the phone with Android (version 4.0+) and after taking the picture the app should upload captured image to my own server.
So is it possible to launch Android phone's front camera by any HTML5 tag or JavaScript code?
I know that rear camera is possible to launch with this tag:
<input type="file" accept="image/*;capture=camera">
But how about front camera? Furthermore, is it possible to add fixed size focus frame to the camera view by using HTML5 web app?
For clarity: Web app is simply the website in my case. It is not any Android app written with PhoneGap or something like that.
Use Device Camera without using PhoneGap or Android Native code
As per I understand you don't want to use PhoneGap for the mobile website but you want to use the native camera option.
In this scenario what I can suggest is you can use Bridgeit which can help you to access the native camera option. Click on the link to check for the demo.
It is very simple to use. You need to add a .js file in your HTML page and call the camera method to access the native camera option of the device.
Sample code:
Use the Bridgeit.js in the HTML header...
<script type="text/javascript" src="http://api.bridgeit.mobi/bridgeit/bridgeit.js"></script>
after that you can call the device camera using the following code:
bridgeit.camera( 'myId', callback, {postURL: '/upload'});
For more detail click on Bridgeit.
I'd like to create a web page which can access a body sensor on an Android tablet (to detect if someone is standing in front of the tablet).
I'd love to do this with a web page (an actual web page, not a PhoneGap/Cordova app). I've seen demos of accessing the webcam from a web page via HTML5/JS in Opera. I'd love to do the same with a body sensor.
Is there ANY way to achieve this? I'm okay with using a browser plugin if necessary or even a customed Android browser (that supports HTML5/CSS3).
Alternatively, is this even possible with PhoneGap/Cordova?
I'm writing a platform with an audio playback component. Audio is uploaded to the server as an wav/mp3/ogg file, and then (like the rest of our media), converted to base64 and stored within our redis database.
To play the audio back at the client side we make an AJAX request to the server for the base64 encoded audio. We have a desktop version that compliments the mobile application, at the moment audio playback works like this:
recording.sound = new Audio("data:audio/ogg;base64," + recording.audio);
recording.sound.play(); // this works
Today we started our tests on mobile devices, and have so far been unable to get it working, even on mobile browsers that apparently support HTML5 audio.
Any ideas? Or if this is not possible, is there a different approach we can take? Ideally there should be a mobile compatible version of the web app, and there has to be a phonegap version.
The reason might not be a technical one here, from Apple developer site:
In Safari on iOS (for all devices, including iPad), where the user may be on a cellular network and be charged per data unit, preload and autoplay are disabled. No data is loaded until the user initiates it. This means the JavaScript play() and load() methods are also inactive until the user initiates playback, unless the play() or load() method is triggered by user action. In other words, a user-initiated Play button works, but an onLoad="play()" event does not.
same applies to Android devices.
read more here: Safari HTML5 Audio and Video Guide
But „audio/wav“ doesn't exist. See spec here: http://www.iana.org/assignments/media-types/audio
You should use „audio/vnd.dts“ for .wav file, „audio/mpeg“ for .mp3 file and „audio/ogg“ for .ogg file...
OK, try StackOverflow search, see:
https://stackoverflow.com/search?q=audio+codec+support+mobile+devices+html5
or https://stackoverflow.com/search?q=audio+codec+support+mobile+devices+html
or try Google
Some search results, that might be useful:
In search for a library that knows to detect support for specific Audio Video format files
or html5 vs flash - full comparison chart anywhere?