You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/04/23 20:57:34 UTC
[01/14] git commit: Add NOTICE file
Repository: cordova-plugin-media-capture
Updated Branches:
refs/heads/master f516d31b7 -> ae84ed3f3
Add NOTICE file
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/34cd79d4
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/34cd79d4
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/34cd79d4
Branch: refs/heads/master
Commit: 34cd79d41f371c2d5116ed33396084b89c4fec09
Parents: 0ac37c5
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 27 15:36:31 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Feb 27 15:37:07 2014 -0500
----------------------------------------------------------------------
NOTICE | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/34cd79d4/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..8ec56a5
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache Cordova
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
[02/14] git commit: CB-6114 Incremented plugin version on dev branch.
Posted by ia...@apache.org.
CB-6114 Incremented plugin version on dev branch.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/0ac37c5f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/0ac37c5f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/0ac37c5f
Branch: refs/heads/master
Commit: 0ac37c5fea70167b76ceb1836c7fe548f8262c2e
Parents: e187bd9
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 27 12:29:15 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Feb 27 15:37:07 2014 -0500
----------------------------------------------------------------------
plugin.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/0ac37c5f/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index a51d8ca..00b4a15 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -3,7 +3,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.media-capture"
- version="0.2.8">
+ version="0.2.9-dev">
<name>Capture</name>
<description>Cordova Media Capture Plugin</description>
[08/14] git commit: CB-6212 iOS: fix warnings compiled under arm64
64-bit
Posted by ia...@apache.org.
CB-6212 iOS: fix warnings compiled under arm64 64-bit
-fix one more warning
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/db9fa24c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/db9fa24c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/db9fa24c
Branch: refs/heads/master
Commit: db9fa24cf8ba165aabae0460a9cbeb1dd1d67e62
Parents: bd6af45
Author: James Jong <wj...@gmail.com>
Authored: Fri Mar 28 10:24:24 2014 -0400
Committer: James Jong <wj...@gmail.com>
Committed: Fri Mar 28 10:24:24 2014 -0400
----------------------------------------------------------------------
src/ios/CDVCapture.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/db9fa24c/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 11a4de6..aaa5d54 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -842,7 +842,7 @@
if (!self.pluginResult) {
// return error
- self.pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:self.errorCode];
+ self.pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:(int)self.errorCode];
}
self.avRecorder = nil;
[07/14] git commit: CB-6016 [BlackBerry10] Add audio capture
capability
Posted by ia...@apache.org.
CB-6016 [BlackBerry10] Add audio capture capability
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/bd6af454
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/bd6af454
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/bd6af454
Branch: refs/heads/master
Commit: bd6af454227a9c791acfdb70ea592a54c888ef98
Parents: 007630d
Author: Bryan Higgins <bh...@blackberry.com>
Authored: Wed Mar 12 11:45:23 2014 -0400
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Thu Mar 13 09:08:54 2014 -0400
----------------------------------------------------------------------
doc/index.md | 6 +-----
src/blackberry10/index.js | 24 +++++++++++++++++++++++-
2 files changed, 24 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/bd6af454/doc/index.md
----------------------------------------------------------------------
diff --git a/doc/index.md b/doc/index.md
index 8a29718..ed682f3 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -131,11 +131,6 @@ code.
// start audio capture
navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2});
-
-### BlackBerry 10 Quirks
-
-- Cordova for BlackBerry 10 attempts to launch the __Voice Notes Recorder__ application, provided by RIM, to capture audio recordings. The app receives a `CaptureError.CAPTURE_NOT_SUPPORTED` error code if the application is not installed on the device.
-
### iOS Quirks
- iOS does not have a default audio recording application, so a simple user interface is provided.
@@ -172,6 +167,7 @@ code.
### BlackBerry 10 Quirks
- The `duration` parameter is not supported. Recording lengths can't be limited programmatically.
+- The `limit` parameter is not supported, so only one recording can be created for each invocation.
### iOS Quirks
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/bd6af454/src/blackberry10/index.js
----------------------------------------------------------------------
diff --git a/src/blackberry10/index.js b/src/blackberry10/index.js
index d7c5627..ea78137 100644
--- a/src/blackberry10/index.js
+++ b/src/blackberry10/index.js
@@ -45,6 +45,14 @@ function capture(action, options, result, webview) {
}, fail);
}, fail);
},
+ onAudioCaptured = function (response) {
+ window.qnx.webplatform.getApplication().invocation.removeEventListener("childCardClosed", onAudioCaptured);
+ if (response.data && response.data !== "") {
+ onCaptured(response.data);
+ } else {
+ result.callbackError({code: NO_MEDIA_FILES_ERROR_CODE });
+ }
+ }
onCancelled = function () {
result.callbackError({code: NO_MEDIA_FILES_ERROR_CODE });
},
@@ -56,6 +64,20 @@ function capture(action, options, result, webview) {
if (limit < 0) {
result.error({code: INVALID_ARGUMENT_ERROR_CODE});
+ } else if (action === "audio") {
+ window.qnx.webplatform.getApplication().invocation.invoke(
+ {
+ target: "sys.apps.audiorecorder",
+ action: "bb.action.CAPTURE"
+ },
+ function (error) {
+ if (error) {
+ console.log(error);
+ } else {
+ window.qnx.webplatform.getApplication().invocation.addEventListener("childCardClosed", onAudioCaptured);
+ }
+ });
+ result.noResult(true);
} else {
window.qnx.webplatform.getApplication().cards.camera.open(action, onCaptured, onCancelled, onInvoked);
result.noResult(true);
@@ -89,6 +111,6 @@ module.exports = {
},
captureAudio: function (win, fail, args, env) {
var result = new PluginResult(args, env);
- result.error({code: NOT_SUPPORTED_ERROR_CODE});
+ capture("audio", {}, result, env.webview);
}
};
[13/14] git commit: CB-6460: Update license headers
Posted by ia...@apache.org.
CB-6460: Update license headers
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/2e755c9f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/2e755c9f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/2e755c9f
Branch: refs/heads/master
Commit: 2e755c9ff7e3ead929f85e9f000b75e505369513
Parents: bb9fb05
Author: Ian Clelland <ic...@chromium.org>
Authored: Wed Apr 16 16:19:35 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Wed Apr 16 16:19:35 2014 -0400
----------------------------------------------------------------------
plugin.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/2e755c9f/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 9db032d..7a3f6bd 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
[10/14] git commit: CB-6422 [windows8] use cordova/exec/proxy
Posted by ia...@apache.org.
CB-6422 [windows8] use cordova/exec/proxy
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/3ad7a3fb
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/3ad7a3fb
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/3ad7a3fb
Branch: refs/heads/master
Commit: 3ad7a3fb06f52cb3b5acdf43559a515ea9b148c5
Parents: 48a94b6
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Apr 8 16:32:33 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Apr 8 16:32:33 2014 -0700
----------------------------------------------------------------------
src/windows8/CaptureProxy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/3ad7a3fb/src/windows8/CaptureProxy.js
----------------------------------------------------------------------
diff --git a/src/windows8/CaptureProxy.js b/src/windows8/CaptureProxy.js
index 851adf8..d78dc41 100644
--- a/src/windows8/CaptureProxy.js
+++ b/src/windows8/CaptureProxy.js
@@ -158,4 +158,4 @@ module.exports = {
}
};
-require("cordova/windows8/commandProxy").add("Capture",module.exports);
+require("cordova/exec/proxy").add("Capture",module.exports);
[04/14] git commit: Merge branch 'master' into dev
Posted by ia...@apache.org.
Merge branch 'master' into dev
Conflicts:
plugin.xml
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/648f4546
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/648f4546
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/648f4546
Branch: refs/heads/master
Commit: 648f454649f6dfb756719226ef5c4d7bc5e7e989
Parents: 34cd79d f516d31
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 27 16:07:00 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Feb 27 16:07:00 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[09/14] git commit: CB-6385: Specify file plugin dependency version
Posted by ia...@apache.org.
CB-6385: Specify file plugin dependency version
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/94e82396
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/94e82396
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/94e82396
Branch: refs/heads/master
Commit: 94e82396151226003ef404a3b879a7ad9e006ef7
Parents: db9fa24
Author: Ian Clelland <ic...@chromium.org>
Authored: Wed Apr 2 16:22:27 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Wed Apr 2 16:22:27 2014 -0400
----------------------------------------------------------------------
plugin.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/94e82396/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index afeb02d..9db032d 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -13,7 +13,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets"
<repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git</repo>
<issue>https://issues.apache.org/jira/browse/CB/component/12320646</issue>
- <dependency id="org.apache.cordova.file" />
+ <dependency id="org.apache.cordova.file" version="1.0.1" />
<js-module src="www/CaptureAudioOptions.js" name="CaptureAudioOptions">
<clobbers target="CaptureAudioOptions" />
[06/14] git commit: CB-6212 iOS: fix warnings compiled under arm64
64-bit
Posted by ia...@apache.org.
CB-6212 iOS: fix warnings compiled under arm64 64-bit
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/007630da
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/007630da
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/007630da
Branch: refs/heads/master
Commit: 007630da4866d867321008c6b8e1ebf57f05f259
Parents: bf360f0
Author: James Jong <wj...@gmail.com>
Authored: Wed Mar 12 13:12:50 2014 -0400
Committer: James Jong <wj...@gmail.com>
Committed: Wed Mar 12 13:12:50 2014 -0400
----------------------------------------------------------------------
src/ios/CDVCapture.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/007630da/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index b214412..11a4de6 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -440,7 +440,7 @@
// NSLog(@"getFormatData: %@", [formatData description]);
}
if (bError) {
- result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:errorCode];
+ result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:(int)errorCode];
}
if (result) {
[self.commandDelegate sendPluginResult:result callbackId:callbackId];
[05/14] git commit: Add rim xml namespaces declaration
Posted by ia...@apache.org.
Add rim xml namespaces declaration
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/bf360f0e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/bf360f0e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/bf360f0e
Branch: refs/heads/master
Commit: bf360f0eca5c0c04af620d02c6d4ebbd78b14f49
Parents: 648f454
Author: Ryan Willoughby <ry...@nitobi.com>
Authored: Thu Mar 6 13:52:34 2014 -0800
Committer: Bryan Higgins <bh...@blackberry.com>
Committed: Wed Mar 12 12:44:07 2014 -0400
----------------------------------------------------------------------
plugin.xml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/bf360f0e/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 00b4a15..afeb02d 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -2,6 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
+xmlns:rim="http://www.blackberry.com/ns/widgets"
id="org.apache.cordova.media-capture"
version="0.2.9-dev">
<name>Capture</name>
[11/14] git commit: Merge branch 'dev' of
https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture into dev
Posted by ia...@apache.org.
Merge branch 'dev' of https://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture into dev
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/34191115
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/34191115
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/34191115
Branch: refs/heads/master
Commit: 3419111562b7b7f591e243b09b797dfff0be5475
Parents: 3ad7a3f 94e8239
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Tue Apr 8 16:33:15 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Tue Apr 8 16:33:15 2014 -0700
----------------------------------------------------------------------
NOTICE | 5 +
RELEASENOTES.md | 8 +
doc/index.md | 6 +-
plugin.xml | 12 +-
src/android/Capture.java | 16 +-
src/blackberry10/index.js | 24 +-
src/ios/CDVCapture.m | 4 +-
src/ubuntu/MediaCaptureWidget.qml | 207 ++
test/autotest/html/HtmlReporter.js | 101 -
test/autotest/html/HtmlReporterHelpers.js | 60 -
test/autotest/html/ReporterView.js | 164 --
test/autotest/html/SpecView.js | 79 -
test/autotest/html/SuiteView.js | 22 -
test/autotest/html/TrivialReporter.js | 192 --
test/autotest/index.html | 60 -
test/autotest/jasmine.css | 81 -
test/autotest/jasmine.js | 2530 ------------------------
test/autotest/pages/capture.html | 71 -
test/autotest/test-runner.js | 62 -
test/autotest/tests/.DS_Store | Bin 6148 -> 0 bytes
test/autotest/tests/capture.tests.js | 113 --
test/capture/index.html | 150 --
test/cordova-incl.js | 86 -
test/index.html | 65 -
test/main.js | 162 --
test/master.css | 164 --
26 files changed, 269 insertions(+), 4175 deletions(-)
----------------------------------------------------------------------
[03/14] git commit: CB-6114 Updated version and RELEASENOTES.md for
release 0.2.8
Posted by ia...@apache.org.
CB-6114 Updated version and RELEASENOTES.md for release 0.2.8
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/e187bd94
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/e187bd94
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/e187bd94
Branch: refs/heads/master
Commit: e187bd943da82f25d79c913f2bb6916b21113d99
Parents: 0c7941f
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Feb 27 11:56:29 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Feb 27 15:37:07 2014 -0500
----------------------------------------------------------------------
RELEASENOTES.md | 3 +++
plugin.xml | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/e187bd94/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index e6ba4d5..65a97ad 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -59,3 +59,6 @@
* [ubuntu] request audio/camera/microphone permission
* fixed cordova cli add capture plugin not work wp
* CB-5685 [BlackBerry10] Add access_shared permission
+
+### 0.2.8 (Feb 26, 2014)
+* CB-5202 Fix video capture crash on Android 4.3+
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/e187bd94/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 41885ee..a51d8ca 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -3,7 +3,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.media-capture"
- version="0.2.8-dev">
+ version="0.2.8">
<name>Capture</name>
<description>Cordova Media Capture Plugin</description>
[12/14] git commit: CB-6152: Make mediafile compatible with file
plugin
Posted by ia...@apache.org.
CB-6152: Make mediafile compatible with file plugin
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/bb9fb051
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/bb9fb051
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/bb9fb051
Branch: refs/heads/master
Commit: bb9fb051223aa8cb52c5f6eed5b07d8722d162fb
Parents: 3419111
Author: Ian Clelland <ic...@chromium.org>
Authored: Tue Apr 15 15:25:20 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Tue Apr 15 15:25:20 2014 -0400
----------------------------------------------------------------------
src/android/Capture.java | 18 ++++++++++--------
src/ios/CDVCapture.m | 13 +++++++++++++
www/MediaFile.js | 4 ++--
www/capture.js | 3 +++
4 files changed, 28 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/bb9fb051/src/android/Capture.java
----------------------------------------------------------------------
diff --git a/src/android/Capture.java b/src/android/Capture.java
index a24511e..65df61f 100644
--- a/src/android/Capture.java
+++ b/src/android/Capture.java
@@ -25,6 +25,9 @@ import java.io.OutputStream;
import android.os.Build;
+import org.apache.cordova.file.FileUtils;
+import org.apache.cordova.file.LocalFilesystemURL;
+
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.LOG;
@@ -201,15 +204,8 @@ public class Capture extends CordovaPlugin {
private String getTempDirectoryPath() {
File cache = null;
- // SD Card Mounted
- if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
- cache = new File(Environment.getExternalStorageDirectory().getAbsolutePath() +
- "/Android/data/" + cordova.getActivity().getPackageName() + "/cache/");
- }
// Use internal storage
- else {
- cache = cordova.getActivity().getCacheDir();
- }
+ cache = cordova.getActivity().getCacheDir();
// Create the cache directory if it doesn't exist
cache.mkdirs();
@@ -416,10 +412,16 @@ public class Capture extends CordovaPlugin {
File fp = webView.getResourceApi().mapUriToFile(data);
JSONObject obj = new JSONObject();
+ FileUtils filePlugin = (FileUtils)webView.pluginManager.getPlugin("File");
+ LocalFilesystemURL url = filePlugin.filesystemURLforLocalPath(fp.getAbsolutePath());
+
try {
// File properties
obj.put("name", fp.getName());
obj.put("fullPath", fp.toURI().toString());
+ if (url != null) {
+ obj.put("localURL", url.toString());
+ }
// Because of an issue with MimeTypeMap.getMimeTypeFromExtension() all .3gpp files
// are reported as video/3gpp. I'm doing this hacky check of the URI to see if it
// is stored in the audio or video content store.
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/bb9fb051/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index aaa5d54..6bcf0ad 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -18,6 +18,7 @@
*/
#import "CDVCapture.h"
+#import "CDVFile.h"
#import <Cordova/CDVJSON.h>
#import <Cordova/CDVAvailability.h>
@@ -452,8 +453,20 @@
NSFileManager* fileMgr = [[NSFileManager alloc] init];
NSMutableDictionary* fileDict = [NSMutableDictionary dictionaryWithCapacity:5];
+ CDVFile *fs = [self.commandDelegate getCommandInstance:@"File"];
+
+ // Get canonical version of localPath
+ NSURL *fileURL = [NSURL URLWithString:[NSString stringWithFormat:@"file://%@", fullPath]];
+ NSURL *resolvedFileURL = [fileURL URLByResolvingSymlinksInPath];
+ NSString *path = [resolvedFileURL path];
+
+ CDVFilesystemURL *url = [fs fileSystemURLforLocalPath:path];
+
[fileDict setObject:[fullPath lastPathComponent] forKey:@"name"];
[fileDict setObject:fullPath forKey:@"fullPath"];
+ if (url) {
+ [fileDict setObject:[url absoluteURL] forKey:@"localURL"];
+ }
// determine type
if (!type) {
id command = [self.commandDelegate getCommandInstance:@"File"];
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/bb9fb051/www/MediaFile.js
----------------------------------------------------------------------
diff --git a/www/MediaFile.js b/www/MediaFile.js
index 75a255b..17f12ef 100644
--- a/www/MediaFile.js
+++ b/www/MediaFile.js
@@ -32,7 +32,7 @@ var utils = require('cordova/utils'),
* lastModifiedDate {Date} last modified date
* size {Number} size of the file in bytes
*/
-var MediaFile = function(name, fullPath, type, lastModifiedDate, size){
+var MediaFile = function(name, localURL, type, lastModifiedDate, size){
MediaFile.__super__.constructor.apply(this, arguments);
};
@@ -48,7 +48,7 @@ MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
if (typeof this.fullPath === "undefined" || this.fullPath === null) {
errorCallback(new CaptureError(CaptureError.CAPTURE_INVALID_ARGUMENT));
} else {
- exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
+ exec(successCallback, errorCallback, "Capture", "getFormatData", [this.localURL, this.type]);
}
};
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/bb9fb051/www/capture.js
----------------------------------------------------------------------
diff --git a/www/capture.js b/www/capture.js
index 6b67ca8..fd17474 100644
--- a/www/capture.js
+++ b/www/capture.js
@@ -37,6 +37,9 @@ function _capture(type, successCallback, errorCallback, options) {
for (i = 0; i < pluginResult.length; i++) {
var mediaFile = new MediaFile();
mediaFile.name = pluginResult[i].name;
+
+ // Backwards compatibility
+ mediaFile.localURL = pluginResult[i].localURL || pluginResult[i].fullPath;
mediaFile.fullPath = pluginResult[i].fullPath;
mediaFile.type = pluginResult[i].type;
mediaFile.lastModifiedDate = pluginResult[i].lastModifiedDate;
[14/14] git commit: CB-6452 Updated version and RELEASENOTES.md for
release 0.3.0
Posted by ia...@apache.org.
CB-6452 Updated version and RELEASENOTES.md for release 0.3.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/ae84ed3f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/ae84ed3f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/ae84ed3f
Branch: refs/heads/master
Commit: ae84ed3f31964bb5f5e7a7a53447c6d132be4edf
Parents: 2e755c9
Author: Ian Clelland <ic...@chromium.org>
Authored: Thu Apr 17 10:53:20 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Thu Apr 17 10:53:20 2014 -0400
----------------------------------------------------------------------
RELEASENOTES.md | 10 ++++++++++
plugin.xml | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/ae84ed3f/RELEASENOTES.md
----------------------------------------------------------------------
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 65a97ad..b82a16c 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -62,3 +62,13 @@
### 0.2.8 (Feb 26, 2014)
* CB-5202 Fix video capture crash on Android 4.3+
+
+### 0.3.0 (Apr 17, 2014)
+* CB-6152: [ios, android] Make mediafile compatible with file plugin
+* CB-6385: Specify file plugin dependency version
+* CB-6212: [iOS] fix warnings compiled under arm64 64-bit
+* CB-6016 [BlackBerry10] Add audio capture capability
+* [Blackberry10] Add rim xml namespaces declaration
+* CB-6422 [windows8] use cordova/exec/proxy
+* CB-6460: Update license headers
+* Add NOTICE file
http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/ae84ed3f/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index 7a3f6bd..95dc8e4 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -22,7 +22,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:rim="http://www.blackberry.com/ns/widgets"
id="org.apache.cordova.media-capture"
- version="0.2.9-dev">
+ version="0.3.0">
<name>Capture</name>
<description>Cordova Media Capture Plugin</description>