Activate mobile camera for photo - javascript

I am working with a project that what I want to achieve is that from web, android or IOS can activate the camera and take a picture
In addition to this, I keep it in a database, I currently work with MVC, C #, SQL and for the front part with html and JavaScrip
Any suggestions to do it?
Or some example on which I can base

You can do it with a hybride application like Ionic or React and you can manipulate the input of camera and mic with mediaDevices API good luck

Related

Get live audio and video preview in reactjs

I am trying to develop a feature like google-meet wherein it let's you test the audio and video by previewing it through audio bar fluctuating as well as input video and testing speaker along with letting you select the appropriate input channels in a react application without using any external sdk or package or library.
Can somebody help me out in the same?
I tried looking up in github and web but no solution so far.

My ear speaker doesn't detected in my Angular app (using enumerateDevices)

I am building a project with Ionic 5 / Angular.
I want to build a voice call app, which needs to access my phone ear speaker, not the loudspeaker.
The problem is when I fetch my device's audio output using enumerateDevices(), I don't find any other audio output besides the default audio output (the loudspeaker itself).
I want to attach the HTMLMediaElement using .setSinkId() to the ear speaker's device ID, but didn't find it. Is there any native plugin or workaround for this? Or is it just my phone that doesn't support it? Currently, I am using Samsung Galaxy A51.
Thank you.
Check this Plugin: Github Repo
NPM : Npm LInk
Usage:
AudioToggle.setAudioMode(AudioToggle.SPEAKER);
// or
AudioToggle.setAudioMode(AudioToggle.EARPIECE);

Launch Android phone front camera by HTML5 or JavaScript

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.

Dart Language and Android: accessing phone's camera

I'm starting a project to develop a mobile application where I'll need to access the phone's camera and retrieve a picture/photo.
However, before going to a native application, I would like to know if Dart (compiled to JavaScript, of course) could access Android phone's camera and retrieve that picture. In that case, the application would be web based.
Could Dart do it or I'll need a native application?
(It's more depending on the browser than on the language...)
There is a dedicated html input tag for this since android 3.0 but i dunno if you can easily access it from dart or if it's enough for you..?
There is also the more conventionnal Html5 mediastream (that should fit all your needs) but it wont work below android 4.4...
Yes you can access the camera.
window.navigator.getUserMedia(audio: false, video: true)
.then((MediaStream stream) {
// Stuff happens here
});
Also I've been looking at the Rikulo Gap package and it seems to be able to access the camera as well as other mobile sensors.
https://github.com/rikulo/gap

Using microphone as input on iBooks Widget or .js game on IOS

I'm converting a Processing Game (that I've made last year) to a widget to embed on iBooks Author.
I do know that we can embed html or javascript on a widget to publish on iBook, but I couldn't find some integrations to use microphone from an iPad in real time using javascript.
Is this possible?
The game is basicly whisper on the microphone to pass a level, like mario bros running.
thanks in advance!
Unfortunately, you can't access the microphone in an HTML widget in iBooks Author. The only workarounds I've found are to create a native iOS app that can access it.

Categories