direct_link
0.3.3, released 9 months ago by an unverified publisher
Extracts direct media links from supported URLs for streaming or downloading
What it does
The package parses a given URL from supported sites and returns metadata such as title, thumbnail, duration and a list of available direct links with quality and type. It can be used to stream or download media directly.
AI-written summary of version 0.3.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to fetch direct media URLs from popular video or media hosting sites
- You want to avoid using the sites’ own players and stream/download directly in your app
Skip it when
- You only need to display the original site’s player
- You need advanced download management or offline caching
Strengths
- Supports many popular sites (Facebook, Instagram, YouTube, Vimeo, etc.)
- Provides metadata (title, thumbnail, duration) along with direct links
- Simple API with a single `check` method
Weaknesses
- No built‑in download manager or progress tracking
- Limited to the sites listed in the package
- No official support for non‑media sites
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add `direct_link: ^0.3.3` to pubspec and import `package:direct_link/direct_link.dart`
var directLink = DirectLink();
var data = await directLink.check('https://youtube.com/watch?v=xyz');
if (data != null) {
print(data.title);
for (var e in data.links!) {
print('${e.type} ${e.quality}: ${e.link}');
}
}Alternatives
Packages that do the same job and could replace direct_link.
- simple_link_preview
Fetch lightweight link preview metadata from HTTP and HTTPS URLs.
50Compare - favicon
Scrapes a website for favicons and orders them by image dimensions.
47Compare
Works with
Packages commonly used together with direct_link: ones it builds on, ones built on it, and its own family.