1# Previewing<a name="EN-US_TOPIC_0000001055394496"></a> 2 3## When to Use<a name="en-us_topic_0000001051930577_section186634310418"></a> 4 5Use the camera module APIs to generate and play video streams. 6 7## Available APIs<a name="en-us_topic_0000001051930577_section125479541744"></a> 8 9For details, see the available APIs described in development guidelines on photographing. 10 11## Limitations and Constraints<a name="en-us_topic_0000001051930577_section1165911177314"></a> 12 13None 14 15## How to Develop<a name="en-us_topic_0000001051930577_section34171333656"></a> 16 171. Perform step 1 through step 4 described in development guidelines on photographing. 182. Set the preview area. 19 20 ``` 21 Surface *surface = Surface::CreateSurface(); 22 /* Set the display area. */ 23 surface->SetUserData("region_position_x", "480"); // X-coordinate of the upper left corner of the rectangle 24 surface->SetUserData("region_position_y", "270"); // Y-coordinate of the upper left corner of the rectangle 25 surface->SetUserData("region_width", "960"); // Width 26 surface->SetUserData("region_height", "540"); // Height 27 28 fc->AddSurface(*surface); 29 ``` 30 313. Start and stop previewing. 32 33 ``` 34 stateCallback->camera_->TriggerLoopingCapture(*fc); // Start previewing. 35 stateCallback->camera_->StopLoopingCapture(); // Stop previewing. 36 ``` 37 38 39