You can also use the inbuilt camera of your iPhone (3GS and above) or Android device to record video. The quality and length of video that you can record is dependent on both your device's memory capabilities and the type of camera that is included in the hardware. However, you should at least be able to capture short video clips in VGA resolution.
In this recipe, we will create a basic interface for our Video tab consisting of a record button, which will launch the camera and record video on our device. We'll also perform this in two separate ways: using standard Titanium code for iPhone and using intents for Android.
Note
Note that this recipe will require a physical device for testing. In addition, iPhone 3G models are not be capable of recording video, but all models from the 3GS and upwards should be fine.
The complete source code for this recipe can be found in the /Chapter 4/Recipe 7
folder.