1# Previewing Development
2
3
4## When to Use
5
6Use the camera module APIs to generate and play video streams.
7
8
9## Available APIs
10
11For details, see [Available APIs](subsys-multimedia-camera-photo-guide.md#available-apis).
12
13
14## Constraints
15
16None
17
18
19## How to Develop
20
211. Perform step 1 through step 4 described in [Photographing Development](subsys-multimedia-camera-photo-guide.md).
22
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