HTML5 & JavaScript: resolution or size of


When the device is taking very large photos and we want to make such setting to take smaller photos from the mobile phone, then we can use two W3C ways of taking pictures.

This can be done either through HTML or through JavaScript.

HTML Media Capture

For this, HTML uses capture and accept=”image/* ” on input tag .This will specify intend.

However, through this way, we cannot specify the size

Media capture streams

It allows fully programmatic access to the camera so that user can implement own capture dialogue for videos and still images.

It also specifies constraints related to width, height, frame rate, facing rate, facing mode, etc.

Global browser support for this stream is 50% and is usable in closed environments

Updated on: 30-Jul-2019

453 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements