-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Camera - use file input #1856
Conversation
I need to do one more thing: hide the input so it doesn't mess w/ any UI. |
I think you can’t click it if hidden, but you can probably use absolute position to put it outside of the visible area |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments
when will this be merged? |
This is great function . I looks forward to merge this🎉 |
When will this be merged? 👍 @mlynch |
I noticed that iOS Safari may not work input of createElement... User must prepare real DOM in index.html.
I think this is not smart. Is there any good way? |
Any movement on this 10 month PR? I'd like to use file input for both web and native app. |
Co-authored-by: jcesarmobile <[email protected]>
Co-authored-by: jcesarmobile <[email protected]>
Alright this is updated, working, and ready for review |
Looks good! @jcesarmobile want to approve? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added two comments.
Also, CameraDirection
description says it's iOS only, but this PR seems to add support for web, so should be mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed my comment about CameraDirection
, I've added that information in a new commit.
Using the input as default will "break" apps that already configured and use pwa-elements, so the default behavior should be changed or the PR should be sent to v3 branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
This PR adds support for the native file input method for picking/taking a photo. This makes it possible to select a photo from the filesystem or use the native prompt provided on mobile.
Because this experience is likely a bit closer to what users would expect on mobile/desktop browsers, I've also changed the default so that the PWA Elements system is opt-in instead of the default if installed. Technically, this is a breaking change, but I don't think it warrants a major release.