O'Reilly logo

PhoneGap Essentials: Building Cross-Platform Mobile Apps by John M. Wargo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required