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
New Contributor
Posts: 3
Registered: ‎08-27-2012
My Device: Playbook
My Carrier: Unicom
Accepted Solution

Can I make the camera take video automatically in my app?

As we know, when we use playbook to take video, we must press the record button on the screen.

 

I am developing an app that monitor the acceleration of the playbook then take video automatically, but at the moment I cannot make the camera work by itself, it has to be continued working by user pressing the record button on the screen...


I wonder if there are any ways to make the camera take video automatically through the code in my app, not the action of the user? 

 

BlackBerry Development Advisor
Posts: 145
Registered: ‎10-11-2011
My Device: BlackBerry 9810
My Carrier: Rogers

Re: Can I make the camera take video automatically in my app?

Hi There,

Yes, you can. Here is the code sample to show how to do it.

https://developer.blackberry.com/html5/apis/blackberry.media.camera.html#.takeVideo

Thanks

Naveen M
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Can I make the camera take video automatically in my app?


naveenan wrote:
Hi There,

Yes, you can. Here is the code sample to show how to do it.

False, you can not without an extension for now. What you linked, as one can read in the documentation of this API functionality, it will open up the photo/video application and user needs to make a photo/video by themself and in to the app it will provide the filepath where the taken photo/video was stored.

 

So this isn't automaticaly, isn't it. In HTML5, what you might want to do is using the getUserMedia functionality when it will be ready in BB10 in the future. For now you would need to have an extension for such behaviour, as far as I know, to use the video from cam inline in your app.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
New Contributor
Posts: 3
Registered: ‎08-27-2012
My Device: Playbook
My Carrier: Unicom

Re: Can I make the camera take video automatically in my app?

Thanks very much!