What is best practice to convert html5 and css3 animation or amp-stories to mp4 video?
Is there any library which can do this out of the box?
What is best practice to convert html5 and css3 animation or amp-stories to mp4 video?
Is there any library which can do this out of the box?
What I've done in the past is utilize Chrome's Tab Capture API.
https://developers.chrome.com/extensions/tabCapture
Basically, you build a browser extension and create a media stream and Media Recorder. Something like this:
const mediaStream = chrome.tabCapture.captureOffscreenTab('https://example.com', {
audio: true,
video: true,
videoConstraints: {
width: 1280,
height: 960
}
});
Then, use MediaRecorder to capture the output and save it, in the same way you would any other MediaStream.