简体   繁体   中英

On mobile web, can I listen to the event when a user press the camera button?

On a mobile web app, I can ask users to upload photos from their camera using an input element, ie:

<input type="file" accept="image/*" >

On Android and iOS, having the user interact with such an element triggers a flow which looks very different but has the same steps:

  • (first, we can capture the event corresponding to the moment the user interacts with the input event).
  • user is then asked whether to choose an existing image from their phone, take a photo, or choose a file;
  • if the user takes a photo, they are then asked whether to use this picture or retake it, and they can retake it any number of times;
  • if they use the picture, then the input element receives a change event.

what i am wondering is whether we can listen to the event when the user actually takes a picture - not just the one when they enter the flow, or when the input receives the change event.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM