WebAPI/CameraControl

From MozillaWiki
Jump to: navigation, search

This is a proposal for an API to control a camera which goes further than the Camera API and WebRTC and may be required in order to build a camera web app equivalent to native camera apps in terms of functionality and user experience.

It is not clear which of these use cases should be satisfied by an API, by the implementation of that API or an application consuming the API.

Use Cases

Essential

  • Programmatically capture an image
  • Turn flash on/off/auto

Additional Settings

  • Specify which of multiple cameras to capture an image from
  • Zoom in/out
  • Set aspect ratio
  • Set resolution
  • Set exposure
  • Set focus type (e.g. auto, macro...)
  • Add/remove Image processing filters (e.g. brightness, contrast, sharpness, saturation, greyscale, sepia, negative...)
  • Set special capture mode (e.g. panorama, anti-shake...)

Can probably be implemented in app

  • Set timer
  • Geotagging (Get via geolocation API, could set EXIF metadata using JavaScript after photograph is taken?)

Outside scope

  • A fullscreen viewfinder may be required but this could be provided by WebRTC. However, some image processing settings described above may need to be applied in real time to the video stream of the viewfinder.