02-21-2012 12:42 AM
i'm using this link
i keep getting an undefined error in the try/catch for the record. i'm not too familiar with the workings of the playbook's file directory.
when i hit the record button it calls the following code:
do i need to specify the extension for the filename? i.e. testSound.wav or just testSound
i also tried to hardcode the filename as follows:
i added these to my config file:
<feature id="blackberry.io.dir" />
<feature id="blackberry.io.file" />
<feature id="blackberry.media.microphone" />
again - i'm not too sure about the io.dir and io.file, but since i'm working with saving a file in a specified directory i figured they may be needed.
any help on what i'm doing wrong here would certainly be appreciated.
Solved! Go to Solution.
02-23-2012 03:18 PM
Yes you need to specify an extension.
If it helps, here is a sample application that includes a demo showing how to use microphone:
Here is the source code for the JS file, followed by a summarized snippet of code being used:
var filePath = blackberry.io.dir.appDirs.shared.music.path; var result = blackberry.media.microphone.record(filePath + "/test.wav", onAudioCaptured, onError);
02-23-2012 05:02 PM
i think this link for the kitchenSink should be stickied to the top... a lot of new folks to webworks look there for the most important of tools/resources.
thanks for the help!
02-27-2012 10:47 AM
Yeah that's a good idea. We do have "Sample Apps" published at the top of the BlackBerry HTML5 site https://bdsc.webapps.blackberry.com/html5/ however it certainly wouldn't hurt to sticky similar information in this forum.