Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_filterHighestQualityAudio = formats => {
let audioFormats = ytdl.filterFormats(formats, 'audioonly');
let highestFormat = audioFormats[0];
audioFormats.map(item => {
if (highestFormat.audioBitrate < item.audioBitrate) highestFormat = item;
});
const highestQualityAudio = highestFormat.url;
return highestQualityAudio;
};
_ytdlGetInfo = (videoId, callback, errCallback) => {