Open thomaspiller opened 1 year ago
The Autoplay functionality that is available could be improved and a "play as a video" method could be made available to users when they share the link of a story map. To discuss.
Video Export Feature: Technical Snapshot
Exporting our story map to video is possible but complex. Here's the tech angle:
Frame Capture: We can directly extract map imagery, but replicating the full HTML/CSS layout for non-map elements (like text and legends) requires a tool like html2canvas
. It's not fail-proof for sophisticated effects or transparency.
Handling Animations: To accurately capture the full user experience, including complex animations, we're looking at using headless Chrome with Puppeteer. It'll mimic user interactions and capture each frame.
Encoding: Post-capture, we'd stitch frames into a video server-side. It's a heavy process, with a good codec needed to maintain quality.
Performance: This is a resource-intensive process. At 60fps, the server-side load is substantial. We'd need to process this asynchronously and probably set up a queuing system.
Considerations: Given the server demands, this might end up as a premium offering. We're exploring the interest levels and practicality.
Considering that a real video exporter can be very consuming in terms of time and resources, I would like to know how long it would take to improve the current autoPlay function in order to:
Investigate solutions for exporting story maps in different formats including video