1# Development Guidelines on Previewing<a name="EN-US_TOPIC_0000001051930577"></a> 2 3- [When to Use](#section186634310418) 4- [Available APIs](#section125479541744) 5- [Limitations and Constraints](#section1165911177314) 6- [How to Develop](#section34171333656) 7 8## When to Use<a name="section186634310418"></a> 9 10Use the camera module APIs to generate and play video streams. 11 12## Available APIs<a name="section125479541744"></a> 13 14For details, see the available APIs described in development guidelines on photographing. 15 16## Limitations and Constraints<a name="section1165911177314"></a> 17 18None 19 20## How to Develop<a name="section34171333656"></a> 21 221. Perform step 1 through step 4 described in development guidelines on photographing. 232. Set the preview area. 24 25 ``` 26 Surface *surface = Surface::CreateSurface(); 27 /* Set the display area. */ 28 surface->SetUserData("region_position_x", "480"); // X-coordinate of the upper left corner of the rectangle 29 surface->SetUserData("region_position_y", "270"); // Y-coordinate of the upper left corner of the rectangle 30 surface->SetUserData("region_width", "960"); // Width 31 surface->SetUserData("region_height", "540"); // Height 32 33 fc->AddSurface(*surface); 34 ``` 35 363. Start and stop previewing. 37 38 ``` 39 stateCallback->camera_->TriggerLoopingCapture(*fc); // Start previewing. 40 stateCallback->camera_->StopLoopingCapture(); // Stop previewing. 41 ``` 42 43 44