onPublisherVideoSizeChanged method

void onPublisherVideoSizeChanged(
  1. int width,
  2. int height,
  3. ZegoPublishChannel channel
)

The callback triggered when the video capture resolution changes.

Available since: 1.1.0 Description: When the audio and video stream is not published startPublishingStream or previewed startPreview for the first time, the publishing stream or preview first time, that is, the engine of the audio and video module inside the SDK is started, the video data of the local device will be collected, and the collection resolution will change at this time. Trigger: After the successful publish startPublishingStream, the callback will be received if there is a change in the video capture resolution in the process of publishing the stream. Use cases: You can use this callback to remove the cover of the local preview UI and similar operations.You can also dynamically adjust the scale of the preview view based on the resolution of the callback. Caution: What is notified during external collection is the change in encoding resolution, which will be affected by flow control. Note: This function is only available in ZegoExpressVideo SDK!

  • width Video capture resolution width.
  • height Video capture resolution height.
  • channel Publishing stream channel.If you only publish one audio and video stream, you can ignore this parameter.

Implementation

void onPublisherVideoSizeChanged(
  int width,
  int height,
  ZegoPublishChannel channel,
) {}