Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 38230C555 for ; Tue, 17 Jul 2012 22:57:21 +0000 (UTC) Received: (qmail 70914 invoked by uid 500); 17 Jul 2012 22:57:21 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 70872 invoked by uid 500); 17 Jul 2012 22:57:21 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 70864 invoked by uid 99); 17 Jul 2012 22:57:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2012 22:57:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CBF8014F7B; Tue, 17 Jul 2012 22:57:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anis@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/2] docs commit: CB-599 Update Bada capture documentation Message-Id: <20120717225720.CBF8014F7B@tyr.zones.apache.org> Date: Tue, 17 Jul 2012 22:57:20 +0000 (UTC) CB-599 Update Bada capture documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/commit/9386addd Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/9386addd Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/9386addd Branch: refs/heads/master Commit: 9386adddabc73d85df6f05c813cf208dd43ce5e0 Parents: c31e6cb Author: Anis Kadri Authored: Tue Jul 17 15:57:02 2012 -0700 Committer: Anis Kadri Committed: Tue Jul 17 15:57:02 2012 -0700 ---------------------------------------------------------------------- docs/en/edge/cordova/media/capture/captureImage.md | 25 +++++++++++++ docs/en/edge/cordova/media/capture/captureVideo.md | 29 +++++++++++++++ 2 files changed, 54 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/9386addd/docs/en/edge/cordova/media/capture/captureImage.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/cordova/media/capture/captureImage.md b/docs/en/edge/cordova/media/capture/captureImage.md index a66dacb..48733b7 100644 --- a/docs/en/edge/cordova/media/capture/captureImage.md +++ b/docs/en/edge/cordova/media/capture/captureImage.md @@ -42,6 +42,7 @@ Supported Platforms - BlackBerry WebWorks (OS 5.0 and higher) - iOS - Windows Phone 7 ( Mango ) +- Bada 2.x Windows Phone 7 Quirks ---------------------- @@ -131,3 +132,27 @@ Full Example +Bada Quirks +----------- + +Bada supports _captureImage_ just like the other platforms. However there is _another_ mode where you can capture a video or an image straight in the webview without launching any camera app. In order to do that you need to: + +1. create a _<div>_ element somewhere in your document and give it an id (such as "preview"). + +
+ +2. Initialize the camera preview with the following method + + navigator.camera.showPreview("preview"); + +3. Once you get the preview you can + + 3.1 Capture an image with + + var options = { destinationFilename: "images/cam01.jpg", highRes: false}; + navigator.capture.captureImage(success, fail, options); + +3. Hide the camera preview with the following method + + navigator.camera.hidePreview("preview"); + http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/9386addd/docs/en/edge/cordova/media/capture/captureVideo.md ---------------------------------------------------------------------- diff --git a/docs/en/edge/cordova/media/capture/captureVideo.md b/docs/en/edge/cordova/media/capture/captureVideo.md index f015557..bd13c47 100644 --- a/docs/en/edge/cordova/media/capture/captureVideo.md +++ b/docs/en/edge/cordova/media/capture/captureVideo.md @@ -42,6 +42,7 @@ Supported Platforms - BlackBerry WebWorks (OS 5.0 and higher) - iOS - Windows Phone 7 ( Mango ) +- Bada 2.x Quick Example ------------- @@ -128,3 +129,31 @@ BlackBerry WebWorks Quirks -------------------------- - Cordova for BlackBerry WebWorks attempts to launch the __Video Recorder__ application, provided by RIM, to capture the video recordings. The developer will receive a CaptureError.`CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device. + +Bada 2.x Quirks +--------------- + +Bada supports _captureVideo_ just like the other platforms. However there is _another_ mode where you can capture a video or an image straight in the webview without launching any camera apps. In order to do that you need to: + +1. create a _<div>_ element somewhere in your document and give it an id (such as "preview"). + +
+ +2. Initialize the camera preview with the following method + + navigator.camera.showPreview("preview"); + +3. Once you get the preview you can + + 3.1 Start capturing a video with + + navigator.capture.startVideoCapture(success, fail, {duration: 5000, destinationFilename: "videos/a.3gp"}); + + 3.2 Stop the video capture with + + navigator.capture.stopVideoCapture(); + +3. Hide the camera preview with the following method + + navigator.camera.hidePreview("preview"); +