ilhamdev commited on
Commit
374968d
·
verified ·
1 Parent(s): 0c3fce1

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -227,9 +227,9 @@ async function fileDitch(media){
227
  }
228
  async function ytAPI(url) {
229
  try {
230
- const ID = ytdl.getVideoID(url),
231
- const videoStream = await ytdl(ID, { filter: 'audioandvideo', quality: 'highestvideo' });
232
- const audioStream = await ytdl(ID, {filter: "audioonly", quality:"lowestaudio"})
233
  let buffermp4 = await streamToBuffer(videoStream)
234
  let buffermp3 = await streamToBuffer(audioStream)
235
  buffermp4 = await fileDitch(buffermp4)
 
227
  }
228
  async function ytAPI(url) {
229
  try {
230
+ const ID = ytdl.getVideoID(url)
231
+ let videoStream = await ytdl(ID, { filter: 'audioandvideo', quality: 'highestvideo' });
232
+ let audioStream = await ytdl(ID, {filter: "audioonly", quality:"lowestaudio"})
233
  let buffermp4 = await streamToBuffer(videoStream)
234
  let buffermp3 = await streamToBuffer(audioStream)
235
  buffermp4 = await fileDitch(buffermp4)