패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.0.5

flutter_youtube_downloader

YouTube 비디오 URL를 추출하고 다운로드하는 데 사용할 수 있는 Flutter 플러그인

AndroidiOS
30일 다운로드
261
좋아요
71
Pub 점수
130

패키지 설치

flutter pub add flutter_youtube_downloader

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Android 및 iOS 플랫폼을 지원하는 Flutter 플러그인으로, YouTube 비디오 URL의 추출과 다운로드를 가능하게 합니다. 개발자가 비디오 정보와 오프라인 접근을 위한 다운로드 링크를 가져올 수 있도록 합니다. 이 패키지는 Flutter 앱에 원활하게 통합되어 YouTube 콘텐츠를 처리하기 위한 간단한 API를 제공합니다. 공식 YouTube API에 의존하지 않고 YouTube에서 비디오를 검색해야 하는 미디어 애플리케이션에 유용합니다. 소스 코드는 투명성과 사용자 맞춤 설정을 위해 GitHub에서 공개되어 있습니다.

사용 사례

  • 오프라인 비디오 재생
  • 비디오 콘텐츠 집약
  • 교육용 앱 미디어 다운로드
  • 사용자 지정 비디오 플레이어 통합
  • 개인 용도의 콘텐츠 크롤링

주요 기능

  • YouTube 동영상 URL 추출
  • Android 및 iOS를 지원합니다
  • 비디오 메타데이터 제공
  • 오픈소스이며 공개 저장소 보유
  • Flutter와의 간단한 통합

적합한 대상

  • 미디어 앱을 개발하는 개발자
  • 오프라인 비디오 접근이 필요한 앱
  • 교육 또는 튜토리얼 플랫폼
  • YouTube 콘텐츠 검색이 필요한 프로젝트

고려 사항

  • YouTube 이용 약관 준수 필요
  • YouTube의 반 스크래핑 조치의 영향을 받을 수 있습니다
  • 공식 YouTube API 사용 없음
  • YouTube 업데이트로 인한 변경 가능성
  • 비디오 URL 추출에 한정되며, 전체 비디오 다운로드는 불가능

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_youtube_downloader

A flutter plugin for extracting and downloading youtube video url

Usage

[Example] (https://github.com/Destiny-Ed/flutter_youtube_downloader/blob/main/example/lib/main.dart)

To use this plugin : *add the dependency to your [pubspec.yaml] file

    dependencies:
        flutter:
            sdk : flutter
        flutter_youtube_downloader:

Add to your app manifest.xml file

  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">  <!-- Add This line -->
    
    ...........
  
    <application
        ..............
        <!-- Add This line -->

        tools:replace="android:label" 
        android:requestLegacyExternalStorage="true"> <!-- Add This line if you are targeting android API 29+-->

        <activity>
            ...............
        </activity>
     
    </application>
</manifest>

Warning

Make sure you don't add ...(dots) after the video title name

[Example] Bad final result = await FlutterYoutubeDownloader.downloadVideo( youTube_link, "Video Title goes Here...", 18);

[Example] Good final result = await FlutterYoutubeDownloader.downloadVideo( youTube_link, "Video Title goes Here", 18);

How To Use

    import 'package:flutter/material.dart';
    import 'dart:async';

    import 'package:flutter/services.dart';
    import 'package:flutter_youtube_downloader/flutter_youtube_downloader.dart';

    void main() {
      runApp(MyApp());
    }

    class MyApp extends StatefulWidget {
      @override
      _MyAppState createState() => _MyAppState();
    }

    class _MyAppState extends State<MyApp> {
      String _extractedLink = 'Loading...';

      String youTube_link = "https://www.youtube.com/watch?v=nRhYQlg8fVw";

      @override
      void initState() {
        super.initState();
        extractYoutubeLink();
      }

      // Platform messages are asynchronous, so we initialize in an async method.
      Future<void> extractYoutubeLink() async {
        String link;
        // Platform messages may fail, so we use a try/catch PlatformException.
        try {
          link = await FlutterYoutubeDownloader.extractYoutubeLink(youTube_link, 18);
        } on PlatformException {
          link = 'Failed to Extract YouTube Video Link.';
        }

        // If the widget was removed from the tree while the asynchronous platform
        // message was in flight, we want to discard the reply rather than calling
        // setState to update our non-existent appearance.
        if (!mounted) return;

        setState(() {
          _extractedLink = link;
        });
      }

      Future<void> downloadVideo() async {
        final result = await FlutterYoutubeDownloader.downloadVideo(
            youTube_link, "Video Title goes Here", 18);
        print(result);
      }

      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            appBar: AppBar(
              title: const Text('Flutter Youtube Link Downloader example app'),
            ),
            body: Center(
              child: Text('Extracted Link : $_extractedLink\n'),
            ),
            floatingActionButton: FloatingActionButton(
              onPressed: downloadVideo,
              child: const Icon(Icons.download_rounded),
            ),
          ),
        );
      }
    }

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.