Reputation: 6154
Using JS I creating a video from a series of screen grabs from a canvas element. E.g.
let encoder = new Whammy.Video(25); //25 is fps
for(...) {
//do stuff on canvas every x ms
....
//get a dataURL from the canvas
let dataURL = canvas.toDataURL('image/webp');
//add the dataURL to the encoder
encoder.add(dataURL);
}
// Now we want to create a video from the array of data urls
encoder.compile(false, (webm_output) => {
//webm_output is a blob
//create dataURL from blob
let url = URL.createObjectURL(webm_output);
let vid = documentGetElementById('myVid');
vid.src = url;
})
This all works, however, if the user would like to download the video (using in built controls), the name of the video is a random string.
Is it possible to manually specify the name?
Upvotes: 3
Views: 177