You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by de...@apache.org on 2012/05/11 20:58:41 UTC
spec commit: [CB-757] Add support for recording via Media API on
BlackBerry
Updated Branches:
refs/heads/master 6df5dbebf -> da3f09256
[CB-757] Add support for recording via Media API on BlackBerry
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/commit/da3f0925
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/tree/da3f0925
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/diff/da3f0925
Branch: refs/heads/master
Commit: da3f09256961085409bf436a118c7111917db709
Parents: 6df5dbe
Author: Drew Walters <de...@apache.org>
Authored: Fri May 11 13:58:09 2012 -0500
Committer: Drew Walters <de...@apache.org>
Committed: Fri May 11 13:58:09 2012 -0500
----------------------------------------------------------------------
audio/index.html | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-mobile-spec/blob/da3f0925/audio/index.html
----------------------------------------------------------------------
diff --git a/audio/index.html b/audio/index.html
index 93cd5bb..7961d74 100755
--- a/audio/index.html
+++ b/audio/index.html
@@ -231,6 +231,22 @@
}
/**
+ * Function to create a file for BB recording
+ */
+ function getRecordSrcBB() {
+ var fsFail = function(error) {
+ console.log("error creating file for BB recording");
+ };
+ var gotFile = function(file) {
+ recordSrc = file.fullPath;
+ };
+ var gotFS = function(fileSystem) {
+ fileSystem.root.getFile("BBRecording.amr", {create: true}, gotFile, fsFail);
+ };
+ window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, gotFS, fsFail);
+ }
+
+ /**
* Function called when page has finished loading.
*/
function init() {
@@ -239,6 +255,8 @@
if (device.platform.indexOf("iPhone") !=-1 || device.platform.indexOf("iPad") !=-1)
{
getRecordSrc();
+ } else if (typeof blackberry !== 'undefined') {
+ getRecordSrcBB();
}
console.log("Device="+device.platform+" "+device.version);
}, false);