Skip to content
Platform docs
Auth, users, webhooks & more

Camera Zoom

Zooming the local participant's camera is a feature that users often expect in video applications. The StreamVideo SDK makes this easy by handling all interactions with the device's camera for you.

Basic Usage

To zoom the camera, simply call the setZoom method on the Call instance and provide the desired zoomLevel:

await call.setZoom(zoomLevel: 1.5);

The zoomLevel parameter accepts a double value where:

  • 1.0 represents the default zoom (no zoom)
  • Values greater than 1.0 increase the zoom level

Example Implementation

The following example demonstrates how to toggle between normal view and zoomed view when a user double-taps on the local video:

bool zoomed = false;

StreamCallContainer(
  call: call,
  callContentWidgetBuilder: (
    BuildContext context,
    Call call,
  ) {
    return StreamCallContent(
      call: call,
      callParticipantsWidgetBuilder: (context, call) {
        return StreamCallParticipants(
          call: call,
          localVideoParticipantBuilder: (context, call, participant) {
            return GestureDetector(
              onDoubleTap: () {
                call.setZoom(
                  zoomLevel: zoomed ? 1.0 : 2.0,
                );

                setState(() {
                  zoomed = !zoomed;
                });
              },
              child: StreamCallParticipant(
                key: Key(participant.uniqueParticipantKey),
                call: call,
                participant: participant,
              ),
            );
          },
        );
      },
    );
  },
)

Platform Support

Camera zoom functionality is available on both iOS and Android platforms. Support for specific zoom levels may vary depending on the device's camera capabilities.

Add Chat to my app: getstream.io/SKILL.md

The fastest way to build with Stream. Start a new project or improve an existing one. Full CLI and documentation integration out of the box.


Ask your agent:

/stream Build me a Social App with Feeds and Moderation.
/stream Any livestream calls running?
/stream Video Flutter v1: <Your Question>