media-resolver
v1.0.2
Published
Lightweight media resolver using third-party gateways
Maintainers
Readme
media-resolver
Lightweight media resolver using third-party gateways.
Designed for bots, automation tools, and backend services.
✨ Features
- Resolve media download links from YouTube URLs
- Supports audio and video formats
- No headless browser required
- Simple API
- CommonJS friendly
📦 Installation
bash
npm install media-resolver🚀 Usage
const { resolve } = require("media-resolver")
async function run() {
const res = await resolve(
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
{ format: "mp3" }
)
if (!res.status) {
console.error(res.error)
return
}
console.log(res.title)
console.log(res.download)
}
run()Available Formats
"mp3",
"144",
"240",
"360",
"480",
"720",
"1080"Response Structure
{
status: true,
id: "videoId",
title: "Video title",
duration: "3:32",
thumbnail: "https://...",
format: "mp3",
cached: false,
download: "https://..."
}