setViewPort method

Future<void> setViewPort(
  1. dynamic width,
  2. dynamic height
)

Sets the video quality of the participant’s video stream based on the specified viewport dimensions.

  • This method adjusts the video stream quality dynamically according to the provided viewport width and height, helping optimize rendering quality and bandwidth usage.

Parameters

  • width: The width of the viewport in pixels.

  • height: The height of the viewport in pixels.

Returns

  • A Future<void> that completes once the native SDK accepts the request, or throws a VideoSDKError carrying its code and name.

Example

// Set viewport size for participant video
await participant.setViewPort(480, 360);

Implementation

Future<void> setViewPort(width, height) => _setViewPort(width, height);