Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I take snapshot from stream? #31

Open
CYael-Izquierdo opened this issue Oct 29, 2020 · 1 comment
Open

How can I take snapshot from stream? #31

CYael-Izquierdo opened this issue Oct 29, 2020 · 1 comment

Comments

@CYael-Izquierdo
Copy link

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?

@cycjimmy
Copy link
Owner

cycjimmy commented Nov 2, 2020

Set preserveDrawingBuffer to true in overlayOptions.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants