How to test if the browser support <input capture />
问题 How could I test if the current browser support the feature of mobile browsers to use the device camera to take a picture? https://addpipe.com/html-media-capture-demo/ Capture is basically ignored in all desktop browsers: https://caniuse.com/#feat=html-media-capture How could I detect if I can use capture (and that it won't show an open file dialog, but will actually open the picture application)? 回答1: You can create an input element in JS and test for the capture property. It will be