how to manipulate and save resources fetched by browser in javascript
In a webbrowser preferably google chrome, using JavaScript can we access
and manipulate the data fetched by various html media elements like img,
video? And save the resource or some data using javascript?
I want to do something like this
var myvideo=document.getElementById("myvideo");
if(window.save(myvideo.data,"myvideo.mp4")){
console.log("video saved successfully.");
}else{
console.log("save operation canceled by user");
}
and
var myfile="Some text file content";
if(window.save(myfile,"myfile.txt")){
console.log("video saved successfully.");
}else{
console.log("save operation canceled by user");
}
did any popular browser capable of doing this and how? Is it in HTML5
standard? Though the save is done on users permission Are there still any
security issues in implementing above?
No comments:
Post a Comment