React Native Api Reference
    Preparing search index...

    Function publishFramingSubject

      • Publishes the subject that auto-framing follows, as a box normalised to 0.0..1.0.

      • Requires framing.enabled through setVideoEffects. The SDK ships no detector, so with nothing published here the video is sent unchanged and no error is reported.

      • Call it for every box your detector produces, not once. Coordinates are relative to the frame the far end receives — after any geometry crop — not the raw camera frame. A smaller box zooms further, up to framing.maxZoom.

      Parameters

      • cx: number

        The subject centre's x, 0.0..1.0 across the frame.

      • cy: number

        The subject centre's y, 0.0..1.0 down the frame.

      • width: number

        The subject's width as a fraction of the frame. Zero or less means "no subject": the crop eases back to the full frame.

      • height: number

        The subject's height, same rule as width.

      Returns Promise<void>

      import { publishFramingSubject } from "@videosdk.live/react-native-sdk";

      // from your own detector, on every detection
      await publishFramingSubject(0.5, 0.42, 0.3, 0.45);

      // subject lost
      await publishFramingSubject(0, 0, 0, 0);