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

Unable to take screen shot of video playing #2094

Closed
sadashivm opened this issue Dec 19, 2019 · 2 comments · Fixed by #2788
Closed

Unable to take screen shot of video playing #2094

sadashivm opened this issue Dec 19, 2019 · 2 comments · Fixed by #2788

Comments

@sadashivm
Copy link

Hello,
I want to take screen shot of playing video. But it is coming as blank, please find the attached file.
I have given ID attribute to the main container and playing video inside. May i missed anything?

<div id="videoPlayer">
<VideoPlayer />
</div>

const elem = document.querySelector('#videoPlayer');
html2canvas(elem).then(canvas => {
const link = document.createElement('a');
link.download = 'screenshot.png';
link.href = canvas.toDataURL();
link.click();
link.remove();
});

screenshot

Can you please help me , how to take screenshot of live video playing?

@orochitian
Copy link

我认为你的问题是无法解决的。
官方文档中说明了,这个插件并不是真正的截屏。
它是基于dom,通过canvas还原dom的一种操作。
视频的播放画面是无法获取的。

@unnown
Copy link

unnown commented Jan 23, 2020

This library recreates all elements on a page, rendering a video will never be possible

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

Successfully merging a pull request may close this issue.

3 participants