Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova APP - Is it possible to show camera feed in a container?

I am using ionicFramework with Cordova to build an App. My requirement is to show (front) camera feed inside my app (say at top right corner of the app).

Unfortunately "cordovaCapture" is not working for me. "navigator.camera" just opens camera view, but my requirement is to show its feed in a container so its also not fitting in requirement.

I tried backgroundvideo plugin also.

Please help me in understanding, Is it possible to access camera feed without going native app approach ? Please share any leads.

Thanks in Advance.

like image 863
Mayuresh Avatar asked Jun 30 '15 03:06

Mayuresh


People also ask

What is camera plugin in Cordova?

This plugin defines a global navigator. camera object, which provides an API for taking pictures and for choosing images from the system's image library. Although the object is attached to the global scoped navigator , it is not available until after the deviceready event.

What is camera plugin?

Details. A plugin that enables an application to access the camera features of the user's device. This plugin allows the implementation of actions for taking pictures or choosing images from the device gallery.

Can I use ionic with Cordova?

While developers can still use Cordova in the Ionic stack, the future is Ionic with Capacitor (or Capacitor on its own with any popular web stack!). These apps are known as Web Native apps, in contrast to the older hybrid approach.


1 Answers

I'll just point you to the right direction:

  1. https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview
  2. https://github.com/donaldp24/CanvasCameraPlugin

Try these plugins (in order) and lemme know if either of them worked out for you.

like image 122
Abhishek Jain Avatar answered Oct 19 '22 11:10

Abhishek Jain