Capacitor: source: CameraSource only supports Camera on PWA

Created on 21 Apr 2018  路  17Comments  路  Source: ionic-team/capacitor

source: CameraSource.Prompt and CameraSource.Photos have no effect on browser. It always opens my webcam instead of poping up the actionsheet or image picker. I tried the example https://github.com/ionic-team/capacitor/tree/master/example/src/pages/camera. All buttons opened my webcam directly. The plugin worked on ios&android simulator as expected.

$ ionic info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.2
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.1
ios-sim    : 5.0.6
Node       : v8.9.1
npm        : 5.5.1
OS         : macOS Sierra
Xcode      : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro
bug web

All 17 comments

$ npx cap doctor
馃拪 Capacitor Doctor 馃拪

Dependencies:

@capacitor/cli: 1.0.0-alpha.35

@capacitor/core: 1.0.0-alpha.35

@capacitor/android: 1.0.0-alpha.35

@capacitor/ios: 1.0.0-alpha.35

Capacitor iOS: 1.0.0-alpha.34
Capacitor Android: not installed

(node:2681) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Platform electron is not valid.
(node:2681) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[success] Android looking great! 馃憣
Found 0 Capacitor plugins for ios:
[success] Everything looking great! 馃憣

Yea that feature isn't implemented yet on the web

@mlynch That explains. Thanks Max.

Reopening to keep track of missing feature

anyone start working on this already?

Edited to also cover CameraSource.Photos

Looking forward to this, but the Webcam piece is working great!

It would be great to have an update regarding this issue/request.
Regards.

Hi @Bktechmasala,
The video you've posted has nothing to do with the source: CameraSource.Photos setting.

Thank you anyway.

A person that I am working with is also requesting. Any information regarding where this is on the backlog would be helpful so I can communicate that information back to them.

Yea right now it only supports clicking image from camera. Regardless of sourcetype . For work around I have created a popup and for capturing images i'm using capacitor and for choosing image i'm using normal input type file upload

@mlynch will #1856 solve this problem? if so, when will it merge into it?

@mlynch will #1856 solve this problem? if so, when will it merge into it?

I hope this will solve the problem and that it will be merge soon, for me it's more important on the web to have a file selector rather than a webcam.

In my case users take pictures outdoors with their smartphone so if they put pictures from a computer it will be from a file selector.

Hello all. Thanks @mlynch

I can see all the work for input selector on camera, but I have no idea how to integrate it into my project.

So far I use the HTML5 option.
Thanks

I am stii having same issue any updates on this ?

I would be interested in hearing about an update with this as well

2.3.0 allows CameraSource.Photos, but no CameraSource.Prompt yet

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TayKara picture TayKara  路  3Comments

json-derulo picture json-derulo  路  3Comments

danielsogl picture danielsogl  路  3Comments

peterpeterparker picture peterpeterparker  路  3Comments

json-derulo picture json-derulo  路  3Comments