DrawImage only supports image, canvas, or video as image sources.
Since the plugin replaces <video> elements with <object> elements, drawImage is not capable of interacting with it.


To solve this issue, we display the API plugin.getFrame which returns a base64 encoded bitmap (header + buffer) of the last played frame.


Here's an example:


var canvas = ... // your canvas in the DOM
var video  = ... // your plugin rendering <object>
var base64 = video.getFrame();
var image  = new Image();
image.onload = function () {
  canvas.getContext('2d').
  drawImage(image, 0, 0, canvas.width, canvas.height);
};
image.setAttribute('src', 'data:image/bmp;base64,' + base64);


See live examples here : https://plugin.temasys.com.sg/demo/


This feature is supported starting with version 0.8.869