Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between capture="user" and capture="camera" in input type file tag?

There is no capture="camera" attribute for input type="file" tag in official w3.org documentation.

Ironically on so many places I found capture="camera" is used. Example here or here or here and so many other places.

Not a single tutorial with capture="user". Why is that?

Is there any major difference between capture="user" and capture="camera"?

Can you please also mention device compatibility for capture="user" and capture="camera"? I couldn't find it anywhere.

like image 228
Faizan Anwer Ali Rupani Avatar asked Mar 08 '23 17:03

Faizan Anwer Ali Rupani


1 Answers

capture="camera" is deprecated in the HTML 5.1 spec.

The capture attributes keywords are user and environment which relate to front and rear facing cameras respectively.

In addition, there is a third state, the implementation-specific state.

The missing value default is the implementation-specific state. The invalid value default is also the implementation-specific state.

You can read more about it here

like image 170
miknik Avatar answered Mar 10 '23 06:03

miknik