diff --git a/index.js b/index.js
index 5fe3a30..9714372 100644
--- a/index.js
+++ b/index.js
@@ -68,14 +68,15 @@ app.get("/getLink", async (req, res) => {
}
if (["mp4", "webm"].includes(format)) {
- var ytvid = ytdl(url, { 'quality': quality, 'format': format })
+ var ytvid = ytdl(url, { 'quality': quality, 'format': format, 'filter': 'videoandaudio' })
var debounce = false
ytvid.on("progress", (chunk, cd, td) => {
if (!debounce) {
- res.setHeader('Content-Disposition', `attachment; filename="${filename}.${format}";`);
+ res.setHeader('Content-Disposition', `attachment; filename="${filename}.${format}";`)
+ res.setHeader('Content-Type', `video/${format}`)
+ console.log(`${filename}.${format}"`)
res.setHeader("Content-Length", td)
ytvid.pipe(res)
- // console.log(td)
debounce = true
}
})
diff --git a/static/index.html b/static/index.html
index 57d0b48..0e64264 100644
--- a/static/index.html
+++ b/static/index.html
@@ -55,7 +55,7 @@