cycjimmy/jsmpeg-player

How can I take snapshot from stream?

CYael-Izquierdo opened this issue · 1 comments

I'm trying to get an snapshot from the stream using player.els.canvas.toDataURL() but it gives me a black image.

How can I do it?

Set preserveDrawingBuffer to true in overlayOptions.

new JSMpeg.VideoElement('#wrapper', 'video.ts', {
    // some options in jsmpeg-player
    ...
  }, {
    // some overlay options in jsmpeg
    preserveDrawingBuffer: true
});