SetCanvas

Sets the view window for displaying video.

bool SetCanvas(Canvas *canvas, Error *err = nullptr)
Since
Available since v4.4.0.

This method specifies a Canvas object to display video. Once the video stream starts playing successfully, the video will be displayed on this Canvas.

Timing

This method must be called after Player is called.

Parameters

canvas
Canvas object used to render video frames. See Canvas.
err
Output parameter for status or error information. See Error.

Return Values

  • true: Set successfully.
  • false: Set failed. You can check the error code returned in the err parameter for details.