URL에서 직접 다운로드 링크를 추출하는 플러터/다트 패키지로, 여러 플랫폼 간 미디어 파일의 원활한 스트리밍 및 다운로드를 가능하게 합니다. 다양한 소스에서 원본 파일 URL을 가져오는 과정을 단순화하여 오프라인 액세스 또는 실시간 재생이 필요한 앱에 이상적입니다. 안드로이드, iOS, 웹, macOS, Windows, 리눅스를 지원하여 광범위한 호환성을 보장합니다. 멀티미디어 애플리케이션을 개발하는 개발자를 위한 것으로, 복잡한 파싱 로직 없이 콘텐츠 검색을 간편하게 만듭니다.
사용 사례
미디어 파일을 직접 스트리밍
공유 링크에서 파일 다운로드
오프라인 콘텐츠 앱 구축
미디어 플레이어와의 통합
소셜 미디어 링크에서 리소스 가져오기
파일 다운로드 매니저 만들기
주요 기능
URL에서 직접 링크를 추출합니다
다중 플랫폼 배포 지원
스트리밍 및 다운로드를 활성화합니다
간단한 API 통합
다양한 URL 소스와 호환됩니다
가볍고 효율적인
적합한 대상
미디어 앱 개발자
파일 다운로드 도구
오프라인 콘텐츠 공급자
콘텐츠 집약 앱
직접 파일 액세스가 필요한 앱
고려 사항
소스 URL 구조에 의존합니다
레이트 제한 처리가 필요할 수 있습니다
모든 링크가 직접 스트림으로 해결되지는 않습니다
외부 서비스 사용 가능 여부에 따라 달라짐
실패한 요청에 대한 적절한 오류 처리가 필요합니다
지원되는 URL 형식에 제한됨
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
direct_link
direct_link is a Flutter package for extracting direct media links and basic metadata from supported public page URLs.
Use it when you need to build a downloader, media preview, or media utility app that can resolve a shared social/video URL into playable or downloadable links.
Features
Extract direct media links from supported websites.
Return media metadata such as title, thumbnail, and duration when available.
Return multiple qualities or formats when the source provides them.
Simple null-safe API with a single check method.
Supported websites
Facebook
Instagram
YouTube
Twitter/X
Dailymotion
Vimeo
VK
SoundCloud
TikTok
Reddit
Threads
Support depends on the upstream website response and the extraction service used internally. A supported website can still return null when the URL is private, removed, region-blocked, unsupported by the upstream service, or temporarily unavailable.
Platform support
This package currently depends on Flutter and flutter_inappwebview, so it is intended for Flutter apps.
Screenshot
Installation
Add direct_link to your Flutter project's pubspec.yaml:
dependencies:direct_link:^0.3.3
Then run:
flutter pub get
Import the package:
import'package:direct_link/direct_link.dart';
Usage
Create a DirectLink instance and call check with a supported page URL:
final directLink = DirectLink();
final data = await directLink.check(
'https://www.youtube.com/watch?v=kzOO_uplPdk',
);
if (data == null) {
// No media link was found, or the upstream service could not resolve it.return;
}
print(data.title);
print(data.thumbnail);
print(data.duration);
for (final link in data.links ?? []) {
print(link.quality);
print(link.type);
print(link.link);
}
Private, deleted, age-restricted, login-required, or region-blocked content may not resolve.
Website markup and upstream extraction behavior can change without notice.
The returned link list and quality labels depend on the source website and upstream service response.
Network-based social website checks are integration tests and are not run by default.
Testing
Run deterministic unit tests:
flutter test
Run real-site integration tests explicitly:
flutter test integration_test/social_test.dart
Integration tests depend on live third-party websites and may fail because of network issues, rate limits, region restrictions, or upstream website changes.