.container {
width: 400px;
margin: 0 auto;
}
h1 {
text-align: center;
}
input {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
}
button {
background-color: #000;
color: #fff;
padding: 10px;
border: 1px solid #ccc;
cursor: pointer;
}
function download() {
var reelUrl = document.getElementById("reel_url").value;
var xhr = new XMLHttpRequest();
xhr.open("GET", reelUrl);
xhr.responseType = "arraybuffer";
xhr.onload = function() {
var data = xhr.response;
var blob = new Blob([data], {type: "video/mp4"});
var url = window.URL.createObjectURL(blob);
var a = document.createElement("a");
a.href = url;
a.download = "reel.mp4";
a.click();
};
xhr.send();
}