updatePlayingCanvas method

Future<int> updatePlayingCanvas(
  1. String streamID,
  2. ZegoCanvas canvas
)

Update playing canvas.

Available: since 3.4.0 Description: This interface will update playing view. Use case: The user can call this function to update canvas display video. When to call: After receiving a successful playing stream from the onPlayerStateUpdate or onUserStreamStateUpdate callback. Restrictions: None. Caution: None. Note: This function is only available in ZegoExpressVideo SDK!

  • streamID Stream ID, a string of up to 256 characters. Caution: Only support numbers, English characters and '-', '_'.
  • canvas The view used to display the play audio and video stream's image. When the view is set to null, no video is displayed, only audio is played.
  • Returns Error code, please refer to the error codes document https://doc-en.zego.im/en/5548.html for details.

Implementation

Future<int> updatePlayingCanvas(String streamID, ZegoCanvas canvas) async {
  return await ZegoExpressImpl.instance.updatePlayingCanvas(streamID, canvas);
}