Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 806AAE512 for ; Tue, 19 Feb 2013 22:27:19 +0000 (UTC) Received: (qmail 61328 invoked by uid 500); 19 Feb 2013 22:27:18 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 61250 invoked by uid 500); 19 Feb 2013 22:27:18 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 60541 invoked by uid 99); 19 Feb 2013 22:27:17 -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, 19 Feb 2013 22:27:17 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0FBB182CC2F; Tue, 19 Feb 2013 22:27:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mwbrooks@apache.org To: commits@cordova.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [37/52] [partial] [#2454] Remove versions pre-dating Apache Cordova. Message-Id: <20130219222717.0FBB182CC2F@tyr.zones.apache.org> Date: Tue, 19 Feb 2013 22:27:17 +0000 (UTC) http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/capture/capture.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/capture/capture.md b/docs/en/0.9.5.1/phonegap/media/capture/capture.md deleted file mode 100644 index ecdcb18..0000000 --- a/docs/en/0.9.5.1/phonegap/media/capture/capture.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -Capture -======= - -> Provides access to the audio, image, and video capture capabilities of the device. - -Objects -------- - -- Capture -- CaptureAudioOptions -- CaptureImageOptions -- CaptureVideoOptions -- CaptureCB -- CaptureErrorCB -- ConfigurationData -- MediaFile -- MediaFileData - -Methods -------- - -- capture.captureAudio -- capture.captureImage -- capture.captureVideo -- MediaFile.getFormatData - -Scope ------ - -The __capture__ object is assigned to the __navigator.device__ object, and therefore has global scope. - - // The global capture object - var capture = navigator.device.capture; - -Properties ----------- - -- __supportedAudioModes:__ The audio recording formats supported by the device. (ConfigurationData[]) -- __supportedImageModes:__ The recording image sizes and formats supported by the device. (ConfigurationData[]) -- __supportedVideoModes:__ The recording video resolutions and formats supported by the device. (ConfigurationData[]) - -Methods -------- - -- capture.captureAudio: Launch the device audio recording application for recording audio clip(s). -- capture.captureImage: Launch the device camera application for taking image(s). -- capture.captureVideo: Launch the device video recorder application for recording video(s). - - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/capture/captureAudio.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/capture/captureAudio.md b/docs/en/0.9.5.1/phonegap/media/capture/captureAudio.md deleted file mode 100644 index 2a18ed1..0000000 --- a/docs/en/0.9.5.1/phonegap/media/capture/captureAudio.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -capture.captureAudio -==================== - -> Start the audio recorder application and return information about captured audio clip file(s). - - navigator.device.capture.captureAudio( - CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureAudioOptions options] - ); - -Description ------------ - -This method starts an asynchronous operation to capture audio recordings using the device's default audio recording application. The operation allows the device user to capture multiple recordings in a single session. - -The capture operation ends when either the user exits the audio recording application, or the maximum number of recordings, specified by the __limit__ parameter in CaptureAudioOptions, has been reached. If no value is provided for the __limit__ parameter, a default value of one (1) is used, and the capture operation will terminate after the user records a single audio clip. - -When the capture operation is finished, it will invoke the CaptureCB callback with an array of MediaFile objects describing each captured audio clip file. If the operation is terminated by the user before an audio clip is captured, the CaptureErrorCB callback will be invoked with a CaptureError object with the CaptureError.`CAPTURE_NO_MEDIA_FILES` error code. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) - -Quick Example -------------- - - // capture callback - var captureSuccess = function(mediaFiles) { - var i, path, len; - for (i = 0, len = mediaFiles.length; i < len; i += 1) { - path = mediaFiles[i].fullPath; - // do something interesting with the file - } - }; - - // capture error callback - var captureError = function(error) { - navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error'); - }; - - // start audio capture - navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2}); - -Full Example ------------- - - - - - Capture Audio - - - - - - -
- - - -BlackBerry WebWorks Quirks --------------------------- - -- PhoneGap for BlackBerry WebWorks attempts to launch the __Voice Notes Recorder__ application, provided by RIM, to capture the audio recordings. The developer will receive a CaptureError.`CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/capture/captureAudioOptions.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/capture/captureAudioOptions.md b/docs/en/0.9.5.1/phonegap/media/capture/captureAudioOptions.md deleted file mode 100644 index b6a4ce3..0000000 --- a/docs/en/0.9.5.1/phonegap/media/capture/captureAudioOptions.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -CaptureAudioOptions -=================== - -> Encapsulates audio capture configuration options. - -Properties ----------- - -- __limit:__ The maximum number of audio clips the device user can record in a single capture operation. The value must be greater than or equal to 1 (defaults to 1). -- __duration:__ The maximum duration of an audio sound clip, in seconds. -- __mode:__ The selected audio mode. The value must match one of the elements in `capture.supportedAudioModes`. - -Quick Example -------------- - - // limit capture operation to 3 media files, no longer than 10 seconds each - var options = { limit: 3, duration: 10 }; - - navigator.device.capture.captureAudio(captureSuccess, captureError, options); - -Android Quirks --------------- - -- The __duration__ parameter is not supported. Recording lengths cannot be limited programmatically. -- The __mode__ parameter is not supported. The audio recording format cannot be altered programmatically. Recordings are encoded using Adaptive Multi-Rate (AMR) format (audio/amr). - -BlackBerry WebWorks Quirks --------------------------- - -- The __duration__ parameter is not supported. Recording lengths cannot be limited programmatically. -- The __mode__ parameter is not supported. The audio recording format cannot be altered programmatically. Recordings are encoded using Adaptive Multi-Rate (AMR) format (audio/amr). http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/capture/captureImage.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/capture/captureImage.md b/docs/en/0.9.5.1/phonegap/media/capture/captureImage.md deleted file mode 100644 index 7ee0bec..0000000 --- a/docs/en/0.9.5.1/phonegap/media/capture/captureImage.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -capture.captureImage -==================== - -> Start the camera application and return information about captured image file(s). - - navigator.device.capture.captureImage( - CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureImageOptions options] - ); - -Description ------------ - -This method starts an asynchronous operation to capture images using the device camera application. The operation allows the device user to capture multiple images in a single session. - -The capture operation ends when either the user exits the camera application, or the maximum number of images, specified by the __limit__ parameter in CaptureImageOptions, has been reached. If no value is provided for the __limit__ parameter, a default value of one (1) is used, and the capture operation will terminate after the user captures a single image. - -When the capture operation is finished, it will invoke the CaptureCB callback with an array of MediaFile objects describing each captured image file. If the operation is terminated by the user before an image is captured, the CaptureErrorCB callback will be invoked with a CaptureError object with the CaptureError.`CAPTURE_NO_MEDIA_FILES` error code. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) - -Quick Example -------------- - - // capture callback - var captureSuccess = function(mediaFiles) { - var i, path, len; - for (i = 0, len = mediaFiles.length; i < len; i += 1) { - path = mediaFiles[i].fullPath; - // do something interesting with the file - } - }; - - // capture error callback - var captureError = function(error) { - navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error'); - }; - - // start image capture - navigator.device.capture.captureImage(captureSuccess, captureError, {limit:2}); - -Full Example ------------- - - - - - Capture Image - - - - - - -
- - - - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/capture/captureImageOptions.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/capture/captureImageOptions.md b/docs/en/0.9.5.1/phonegap/media/capture/captureImageOptions.md deleted file mode 100644 index 9822545..0000000 --- a/docs/en/0.9.5.1/phonegap/media/capture/captureImageOptions.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -CaptureImageOptions -=================== - -> Encapsulates image capture configuration options. - -Properties ----------- - -- __limit:__ The maximum number of images the device user can capture in a single capture operation. The value must be greater than or equal to 1 (defaults to 1). -- __mode:__ The selected image mode. The value must match one of the elements in `capture.supportedImageModes`. - -Quick Example -------------- - - // limit capture operation to 3 images - var options = { limit: 3 }; - - navigator.device.capture.captureImage(captureSuccess, captureError, options); - -Android Quirks --------------- - -- The __mode__ parameter is not supported. The image size and format cannot be altered programmatically; however, the image size can be altered by the device user. Images are saved in JPEG format (image/jpeg). - -BlackBerry WebWorks Quirks --------------------------- - -- The __mode__ parameter is not supported. The image size and format cannot be altered programmatically; however, the image size can be altered by the device user. Images are saved in JPEG format (image/jpeg). http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/capture/captureVideo.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/capture/captureVideo.md b/docs/en/0.9.5.1/phonegap/media/capture/captureVideo.md deleted file mode 100644 index b632a63..0000000 --- a/docs/en/0.9.5.1/phonegap/media/capture/captureVideo.md +++ /dev/null @@ -1,129 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -capture.captureVideo -==================== - -> Start the video recorder application and return information about captured video clip file(s). - - navigator.device.capture.captureVideo( - CaptureCB captureSuccess, CaptureErrorCB captureError, [CaptureVideoOptions options] - ); - -Description ------------ - -This method starts an asynchronous operation to capture video recordings using the device video recording application. The operation allows the device user to capture multiple recordings in a single session. - -The capture operation ends when either the user exits the video recording application, or the maximum number of recordings, specified by the __limit__ parameter in CaptureVideoOptions, has been reached. If no value is provided for the __limit__ parameter, a default value of one (1) is used, and the capture operation will terminate after the user records a single video clip. - -When the capture operation is finished, it will invoke the CaptureCB callback with an array of MediaFile objects describing each captured video clip file. If the operation is terminated by the user before an video clip is captured, the CaptureErrorCB callback will be invoked with a CaptureError object with the CaptureError.`CAPTURE_NO_MEDIA_FILES` error code. - -Supported Platforms -------------------- - -- Android -- BlackBerry WebWorks (OS 5.0 and higher) - -Quick Example -------------- - - // capture callback - var captureSuccess = function(mediaFiles) { - var i, path, len; - for (i = 0, len = mediaFiles.length; i < len; i += 1) { - path = mediaFiles[i].fullPath; - // do something interesting with the file - } - }; - - // capture error callback - var captureError = function(error) { - navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error'); - }; - - // start video capture - navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:2}); - -Full Example ------------- - - - - - Capture Video - - - - - - -
- - - -BlackBerry WebWorks Quirks --------------------------- - -- PhoneGap 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. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/capture/captureVideoOptions.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/capture/captureVideoOptions.md b/docs/en/0.9.5.1/phonegap/media/capture/captureVideoOptions.md deleted file mode 100644 index c567216..0000000 --- a/docs/en/0.9.5.1/phonegap/media/capture/captureVideoOptions.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -CaptureVideoOptions -=================== - -> Encapsulates video capture configuration options. - -Properties ----------- - -- __limit:__ The maximum number of video clips the device user can capture in a single capture operation. The value must be greater than or equal to 1 (defaults to 1). -- __duration:__ The maximum duration of a video clip, in seconds. -- __mode:__ The selected video capture mode. The value must match one of the elements in `capture.supportedVideoModes`. - -Quick Example -------------- - - // limit capture operation to 3 video clips - var options = { limit: 3 }; - - navigator.device.capture.captureVideo(captureSuccess, captureError, options); - -Android Quirks --------------- - -- The __duration__ parameter is not supported. Recording lengths cannot be limited programmatically. -- The __mode__ parameter is not supported. The video size and format cannot be altered programmatically; however, these parameters can be changed by the device user. By default, videos are recorded in 3GPP (video/3gpp) format. - - -BlackBerry WebWorks Quirks --------------------------- - -- The __duration__ parameter is not supported. Recording lengths cannot be limited programmatically. -- The __mode__ parameter is not supported. The video size and format cannot be altered programmatically; however, these parameters can be changed by the device user. By default, videos are recorded in 3GPP (video/3gpp) format. - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.getCurrentPosition.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.getCurrentPosition.md b/docs/en/0.9.5.1/phonegap/media/media.getCurrentPosition.md deleted file mode 100644 index 1794dd6..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.getCurrentPosition.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.getCurrentPosition -======================== - -Returns the current position within an audio file. - - media.getCurrentPosition(mediaSuccess, [mediaError]); - -Parameters ----------- - -- __mediaSuccess__: The callback that is called with the current position. -- __mediaError__: (Optional) The callback that is called if there was an error. - -Description ------------ - -Function `media.getCurrentPosition` is an asynchronous function that returns the current position of the underlying audio file of a Media object. - -Supported Platforms -------------------- - -- Android - -Quick Example -------------- - - // Audio player - // - var my_media = new Media(src, onSuccess, onError); - - // Update media position every second - var mediaTimer = setInterval(function() { - // get media position - my_media.getCurrentPosition( - // success callback - function(position) { - if (position > -1) { - console.log((position/1000) + " sec"); - } - }, - // error callback - function(e) { - console.log("Error getting pos=" + e); - } - ); - }, 1000); - - -Full Example ------------- - - - - - Media Example - - - - - - Play Audio - Pause Playing Audio - Stop Playing Audio -

- - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.getDuration.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.getDuration.md b/docs/en/0.9.5.1/phonegap/media/media.getDuration.md deleted file mode 100644 index e72160c..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.getDuration.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.getDuration -================= - -Returns the duration of an audio file. - - media.getDuration(); - - -Description ------------ - -Function `media.getDuration` is a synchronous function that returns the duration of the audio file in seconds, if known. If the duration is unknown, a value of -1 is returned. - -Supported Platforms -------------------- - -- Android - -Quick Example -------------- - - // Audio player - // - var my_media = new Media(src, onSuccess, onError); - - // Get duration - var counter = 0; - var timerDur = setInterval(function() { - counter = counter + 100; - if (counter > 2000) { - clearInterval(timerDur); - } - var dur = my_media.getDuration(); - if (dur > 0) { - clearInterval(timerDur); - document.getElementById('audio_duration').innerHTML = (dur/1000) + " sec"; - } - }, 100); - - -Full Example ------------- - - - - - Media Example - - - - - - Play Audio - Pause Playing Audio - Stop Playing Audio -

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.md b/docs/en/0.9.5.1/phonegap/media/media.md deleted file mode 100644 index 89e11ef..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -Media -===== - -> The `Media` object provides the ability to record and play back audio files on a device. - - var media = new Media(src, mediaSuccess, [mediaError]); - - -Note: The current implementation does not adhere to a W3C specification for media capture, and is provided for convenience only. A future implementation will adhere to the latest W3C specification and may deprecate the current APIs. - -Parameters ----------- - -- __src__: A URI containing the audio content. _(DOMString)_ -- __mediaSuccess__: (Optional) The callback that is invoked after a Media object has completed the current play/record or stop action. _(Function)_ -- __mediaError__: (Optional) The callback that is invoked if there was an error. _(Function)_ - -Methods -------- - -- media.getCurrentPosition: Returns the current position within an audio file. -- media.getDuration: Returns the duration of an audio file. -- media.play: Start or resume playing audio file. -- media.pause: Pause playing audio file. -- media.release: Releases the underlying OS'es audio resources. -- media.startRecord: Start recording audio file. -- media.stopRecord: Stop recording audio file. -- media.stop: Stop playing audio file. - -Supported Platforms -------------------- - -- Android -- iOS - -iOS Quirks ----------- -- The callback functions must be global in scope (version 0.9.4 and earlier). -- In the media constructor iOS calls a prepare method to load the file into the player in preparation for playing. An optional downloadCompleteCallback can be passed as the final parameter to the Media constructor. It will be called when the the call to prepare completes. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.pause.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.pause.md b/docs/en/0.9.5.1/phonegap/media/media.pause.md deleted file mode 100644 index 896d6c3..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.pause.md +++ /dev/null @@ -1,170 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.pause -=========== - -Pauses playing an audio file. - - media.pause(); - - -Description ------------ - -Function `media.pause` is a synchronous function that pauses playing an audio file. - -Supported Platforms -------------------- - -- Android -- iOS - -Quick Example -------------- - - // Play audio - // - function playAudio(url) { - // Play the audio file at url - var my_media = new Media(url, - // success callback - function() { - console.log("playAudio():Audio Success"); - }, - // error callback - function(err) { - console.log("playAudio():Audio Error: "+err); - }); - - // Play audio - my_media.play(); - - // Pause after 10 seconds - setTimeout(function() { - media.pause(); - }, 10000); - } - - -Full Example ------------- - - - - - Media Example - - - - - - Play Audio - Pause Playing Audio - Stop Playing Audio -

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.play.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.play.md b/docs/en/0.9.5.1/phonegap/media/media.play.md deleted file mode 100644 index a650fe6..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.play.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.play -========== - -Starts or resumes playing an audio file. - - media.play(); - - -Description ------------ - -Function `media.play` is a synchronous function that starts or resumes playing an audio file. - -Supported Platforms -------------------- - -- Android -- iOS - -Quick Example -------------- - - // Play audio - // - function playAudio(url) { - // Play the audio file at url - var my_media = new Media(url, - // success callback - function() { - console.log("playAudio():Audio Success"); - }, - // error callback - function(err) { - console.log("playAudio():Audio Error: "+err); - }); - - // Play audio - my_media.play(); - } - - -Full Example ------------- - - - - - Media Example - - - - - - Play Audio - Pause Playing Audio - Stop Playing Audio -

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.release.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.release.md b/docs/en/0.9.5.1/phonegap/media/media.release.md deleted file mode 100644 index adb7256..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.release.md +++ /dev/null @@ -1,153 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.release -================= - -Releases the underlying operating systems audio resources. - - media.release(); - - -Description ------------ - -Function `media.release` is a synchronous function that releases the underlying operating systems audio resources. This function is particularly important for Android as there are a finite amount of OpenCore instances for media playback. Developers should call the 'release' function when they no longer need the Media resource. - -Supported Platforms -------------------- - -- Android - -Quick Example -------------- - - // Audio player - // - var my_media = new Media(src, onSuccess, onError); - - my_media.play(); - my_media.stop(); - my_media.release(); - -Full Example ------------- - - - - - Media Example - - - - - - Play Audio - Pause Playing Audio - Stop Playing Audio -

- - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.startRecord.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.startRecord.md b/docs/en/0.9.5.1/phonegap/media/media.startRecord.md deleted file mode 100644 index c2a90ab..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.startRecord.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.startRecord -================= - -Starts recording an audio file. - - media.startRecord(); - - -Description ------------ - -Function `media.startRecord` is a synchronous function that starts recording an audio file. - -Supported Platforms -------------------- - -- Android -- iOS - -Quick Example -------------- - - // Record audio - // - function recordAudio() { - var src = "myrecording.mp3"; - var mediaRec = new Media(src, - // success callback - function() { - console.log("recordAudio():Audio Success"); - }, - - // error callback - function(err) { - console.log("recordAudio():Audio Error: "+ err.code); - }); - - // Record audio - mediaRec.startRecord(); - } - - -Full Example ------------- - - - - - Device Properties Example - - - - - -

Recording audio...

-

- - - - -iOS Quirks ----------- - -- The method name is `startAudioRecord` on iOS. -- The file to record to must already exist. http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.stop.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.stop.md b/docs/en/0.9.5.1/phonegap/media/media.stop.md deleted file mode 100644 index 3716141..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.stop.md +++ /dev/null @@ -1,169 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.stop -========== - -Stops playing an audio file. - - media.stop(); - - -Description ------------ - -Function `media.stop` is a synchronous function that stops playing an audio file. - -Supported Platforms -------------------- - -- Android -- iOS - -Quick Example -------------- - - // Play audio - // - function playAudio(url) { - // Play the audio file at url - var my_media = new Media(url, - // success callback - function() { - console.log("playAudio():Audio Success"); - }, - // error callback - function(err) { - console.log("playAudio():Audio Error: "+err); - }); - - // Play audio - my_media.play(); - - // Pause after 10 seconds - setTimeout(function() { - my_media.stop(); - }, 10000); - } - -Full Example ------------- - - - - - Media Example - - - - - - Play Audio - Pause Playing Audio - Stop Playing Audio -

- - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/media/media.stopRecord.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/media/media.stopRecord.md b/docs/en/0.9.5.1/phonegap/media/media.stopRecord.md deleted file mode 100644 index e155bfe..0000000 --- a/docs/en/0.9.5.1/phonegap/media/media.stopRecord.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -media.stopRecord -================ - -Stops recording an audio file. - - media.stopRecord(); - - -Description ------------ - -Function `media.stopRecord` is a synchronous function that stops recording an audio file. - -Supported Platforms -------------------- - -- Android -- iOS - -Quick Example -------------- - - // Record audio - // - function recordAudio() { - var src = "myrecording.mp3"; - var mediaRec = new Media(src, - // success callback - function() { - console.log("recordAudio():Audio Success"); - }, - - // error callback - function(err) { - console.log("recordAudio():Audio Error: "+ err.code); - }); - - // Record audio - mediaRec.startRecord(); - - // Stop recording after 10 seconds - setTimeout(function() { - mediaRec.stopRecord(); - }, 10000); - } - - -Full Example ------------- - - - - - Device Properties Example - - - - - -

Recording audio...

-

- - - -iOS Quirks ----------- - -- The method name is `stopAudioRecord` on iOS. - http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/network/NetworkStatus/NetworkStatus.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/network/NetworkStatus/NetworkStatus.md b/docs/en/0.9.5.1/phonegap/network/NetworkStatus/NetworkStatus.md deleted file mode 100644 index 2314cc1..0000000 --- a/docs/en/0.9.5.1/phonegap/network/NetworkStatus/NetworkStatus.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -NetworkStatus -============= - -`NetworkStatus` defines a set of constants that describe the state of the network connection. The `reachability` argument of `network.isReachable` is a `NetworkStatus` constant. - -Constants ---------- - -- `NetworkStatus.NOT_REACHABLE` -- `NetworkStatus.REACHABLE_VIA_WIFI_NETWORK` -- `NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK` http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/network/network.isReachable.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/network/network.isReachable.md b/docs/en/0.9.5.1/phonegap/network/network.isReachable.md deleted file mode 100644 index f49bdba..0000000 --- a/docs/en/0.9.5.1/phonegap/network/network.isReachable.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -network.isReachable -=================== - -Checks if a connection can be established with a specific domain. - - network.isReachable(reachableHostname, reachableCallback, [reachableOptions]) - -Description ------------ - -This is a fast way to determine the device's network connection state, type of connection, and whether a specific domain is online. - -Since `network.isReachable` is an asynchronous function, the network state is returned using a callback function. - -Supported Platforms -------------------- - -- Android -- BlackBerry -- BlackBerry WebWorks (OS 5.0 and higher) -- iPhone - -Quick Example -------------- - - function reachableCallback(reachability) { - // There is no consistency on the format of reachability - var networkState = reachability.code || reachability; - - var states = {}; - states[NetworkStatus.NOT_REACHABLE] = 'No network connection'; - states[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection'; - states[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK] = 'WiFi connection'; - - alert('Connection type: ' + states[networkState]); - } - - navigator.network.isReachable('phonegap.com', reachableCallback); - - -Full Example ------------- - - - - - isReachable Example - - - - - -

A dialog box will report the network state.

- - \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/network/network.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/network/network.md b/docs/en/0.9.5.1/phonegap/network/network.md deleted file mode 100644 index 06aeb89..0000000 --- a/docs/en/0.9.5.1/phonegap/network/network.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -Network -======= - -> The `network` object gives access to the device's cellular and wifi connection information. - -Methods -------- - -- network.isReachable - -Arguments ---------- - -- reachableHostname -- reachableCallback -- reachableOptions - -Constants ---------- - -- NetworkStatus http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/network/parameters/reachableCallback.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/network/parameters/reachableCallback.md b/docs/en/0.9.5.1/phonegap/network/parameters/reachableCallback.md deleted file mode 100644 index aeecfef..0000000 --- a/docs/en/0.9.5.1/phonegap/network/parameters/reachableCallback.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -reachableCallback -================= - -A callback function that provides the reachability status of a hostname. - - function reachableCallback(reachability) { - // Check the reachability state - } - -Parameters ----------- - -- __reachability:__ The device's network state. (`NetworkStatus`) - - Unfortunately, there is no consistency across the platforms on the `reachability` format. See the quirks below for platform details. - -Description ------------ - -This callback accepts a single argument called `reachability`, which is a `NetworkStatus` constant. - -Example -------- - - function reachableCallback(reachability) { - // There is no consistency on the format of reachability - var networkState = reachability.code || reachability; - - var states = {}; - states[NetworkStatus.NOT_REACHABLE] = 'No network connection'; - states[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection'; - states[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK] = 'WiFi connection'; - - alert('Connection type: ' + states[networkState]); - } - -BlackBerry Quirks ------------------ - -Provides the network status as the value of `reachability` - - function reachableCallback(reachability) { - var hasConnection = (reachability !== NetworkStatus.NOT_REACHABLE); - } - -iPhone Quirks -------------- - -The iPhone implementation only provides information about the type of connection available. It does not verify that the host is actually available. - - function reachableCallback(reachability) { - var networkState = reachability.code; - alert('Connection type: ' + networkState + ' - ' + reachability.message); - } http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/network/parameters/reachableHostname.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/network/parameters/reachableHostname.md b/docs/en/0.9.5.1/phonegap/network/parameters/reachableHostname.md deleted file mode 100644 index f3f67fa..0000000 --- a/docs/en/0.9.5.1/phonegap/network/parameters/reachableHostname.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -reachableHostname -================= - -A `String` that specifies the remote host. - -The hostname can be a domain name or a network address: - - // Valid host names - // - var hostname = 'phonegap.com'; - var hostname = '192.168.0.1'; - var hostname = 'localhost'; http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/d132c2bd/docs/en/0.9.5.1/phonegap/network/parameters/reachableOptions.md ---------------------------------------------------------------------- diff --git a/docs/en/0.9.5.1/phonegap/network/parameters/reachableOptions.md b/docs/en/0.9.5.1/phonegap/network/parameters/reachableOptions.md deleted file mode 100644 index b46f814..0000000 --- a/docs/en/0.9.5.1/phonegap/network/parameters/reachableOptions.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -license: Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. ---- - -reachableOptions -================ - -None. \ No newline at end of file