Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Contributor
cuixu66
Posts: 21
Registered: ‎12-25-2011
My Device: Playbook
My Carrier: No mobile
Accepted Solution

A question about Audio recording examples

I have tried to run to the following audio recording examples:

 

https://bdsc.webapps.blackberry.com/html5/apis/blackberry.media.microphone.html

 

I saved the code into an "index.html' and created a simple config.xml to grant shared files access.

I have successfully built the application and deployed onto my playbook.

 

When I click "record" button on the application, it gives me the following JavaScript Alert:

 

Record, e:'undefined' is not an object.

 

I did a search and didn't find any related topics.

 

Also, I think this may have something to do with using google's api.

I have read about how to add features in config.xml, but I can't find a helpful example to tell me how I know where do I find the feature elements' details from "google" or other places.

 

Thanks!!

Please use plain text.
Contributor
cuixu66
Posts: 21
Registered: ‎12-25-2011
My Device: Playbook
My Carrier: No mobile

Re: A question about Audio recording examples

Silly me.

 

Forgot to put

<feature id="blackberry.io.dir" />

in my config.xml.

 

But there's another question:

 

When will we need to access features under external domains? And how can we find out information (i.e. id) about these features from external domains?

 

i.e.

 

<access uri="http://www.somedomain.com" subdomains="true">
   <feature id="blackberry.app.event" required="true" version="1.0.0"/>
   <feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access

I don't understand the above code:smileysad:.

 

Thanks a lot!

Please use plain text.
BlackBerry Development Advisor (Retired)
jeffheifetz
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: A question about Audio recording examples

Hi cuixu66,

 

You would need to access fetures from external domains when you are running javascript from those domains.

 

For example if you had the following piece of code to go with yours

 

<script type="text/javascript" src="http://www.somedomain.com/someJs.js"> </script>

This would then mean that "someJS.js" can use event and invoke APIs.

 

Does that make sense? 




1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.