drawVideoImage method

void drawVideoImage(
  1. HTMLVideoElement video,
  2. double dx,
  3. double dy,
  4. double dWidth,
  5. double dHeight,
)

Draws a video element to the canvas at the specified position and size. This uses JS interop to ensure proper binding.

Implementation

void drawVideoImage(
  web.HTMLVideoElement video,
  double dx,
  double dy,
  double dWidth,
  double dHeight,
) {
  // Use the drawImage method with CanvasImageSource
  drawImage(video, dx.toInt(), dy.toInt(), dWidth.toInt(), dHeight.toInt());
}