How does input call a camera on a mobile device in html5?

I wrote an attribute corresponding to input, but it was packaged and installed on the phone. After clicking, it did not call the camera on the phone device.
is still the normal pop-up window for selecting file files.

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

I see that it is written like this on the Internet. Why can"t it be called?

Apr.29,2022

the front end cannot call the native api of the phone, so can't I borrow the method?


is probably a compatibility issue. IOS can pop up photo options without adding the capture attribute, and Android has different opinions.


Android versions behave differently. You can try to remove this attribute.
< input type= "file" accept= "image/*" >

Menu