12. Capture

The PhoneGap Capture API allows an application to capture audio, video, and image files using the appropriate built-in application on a mobile device. The device’s default camera application is used to capture pictures and videos, while the device’s default voice recorder application is used for capturing audio clips.

PhoneGap’s implementation of the Capture API is based on the W3C Media Capture API (www.w3.org/TR/media-capture-api). For whatever reason, though, the PhoneGap team has omitted support for many of the options supported by the W3C API. So, as you’ll see later, while the API is based upon a standard, with PhoneGap many of the API options just don’t work or haven’t even been implemented.

Camera vs. Capture

You may be asking ...

Get PhoneGap Essentials: Building Cross-Platform Mobile Apps now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.