パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.0.0

youtube

YouTube動画の情報を複数の品質で取得するためのパッケージ。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
136
いいね数
60
Pub ポイント
140

パッケージをインストール

flutter pub add youtube

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

youtube パッケージは、YouTube 動画の情報とさまざまな品質レベルのサムネイルを取得する簡単な方法を提供します。Android、iOS、Web、macOS、Windows、Linux など、多数のプラットフォームをサポートしています。開発者はタイトル、説明、再生時間、視聴回数などのメタデータおよび高品質なサムネイル URL を取得できます。複雑な API の設定が不要なため、アプリに YouTube コンテンツを統合するのに最適です。バックグラウンドでは YouTube Data API を活用しており、動画プレビューの表示やメディア検索機能の構築に効率的です。

用途

  • YouTube動画プレビューの埋め込み
  • メディアディスカバリーアプリの構築
  • 動画メタデータの表示
  • 動画プレイリストビューアの作成
  • 品質別にサムネイルを取得する

主な機能

  • 動画の詳細を取得
  • 複数のサムネイル品質オプション
  • クロスプラットフォーム対応
  • シンプルなAPIインターフェース
  • API キーの設定は不要です

適している対象

  • YouTubeデータが必要なアプリ
  • メディア豊富なアプリケーション
  • コンテンツプレビュー機能
  • 迅速な統合を求めるFlutter開発者

注意事項

  • インターネット接続が必要です
  • パブリック動画データに限定
  • YouTubeのAPIの利用可能性に依存します
  • 高容量の使用ではレート制限の処理が必要になる可能性があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

This Flutter package provides functionalities to retrieve and manage YouTube video information, including details about the video and the uploader, as well as various thumbnail resolutions.

GitHub Sponsor

Configuration

Before fetching video details, you need to configure the package with the video ID:

await Youtube.config(videoId: 'your_video_id');

Accessing Video Information

You can access the video and channel details using the provided getters:

var channelDetails = Youtube.channelDetails;
var videoDetails = Youtube.videoDetails;
var thumbnails = Youtube.thumbnails;
ChannelDetails

Holds details about the YouTube channel.

  • Properties
    • String name: The name of the uploader.
    • String id: The ID of the channel.
    • String username: The username of the uploader.
  • Example
var channelDetails = Youtube.channelDetails;
print('Channel Name: ${channelDetails.name}');
print('Channel ID: ${channelDetails.id}');
print('Channel Username: ${channelDetails.username}');
VideoDetails

Holds details about the YouTube video.

  • Properties
    • String title: The title of the video.
    • int duration: The duration of the video in seconds.
    • int viewCount: The view count of the video.
    • String defaultThumbnail: The URL of the default thumbnail.
  • Example
var videoDetails = Youtube.videoDetails;
print('Video Title: ${videoDetails.title}');
print('Video Duration: ${videoDetails.duration} seconds');
print('Video View Count: ${videoDetails.viewCount}');
print('Default Thumbnail: ${videoDetails.defaultThumbnail}');
Thumbnails

Holds URLs for different resolutions of the video's thumbnails.

  • Properties
    • String fullhd: URL for the Full HD thumbnail.
    • String hd: URL for the HD thumbnail.
    • String sd: URL for the SD thumbnail.
    • String hq: URL for the HQ thumbnail.
    • String lq: URL for the LQ thumbnail.
  • Example
var thumbnails = Youtube.thumbnails;
print('Full HD Thumbnail: ${thumbnails.fullhd}');
print('HD Thumbnail: ${thumbnails.hd}');
print('SD Thumbnail: ${thumbnails.sd}');
print('HQ Thumbnail: ${thumbnails.hq}');
print('LQ Thumbnail: ${thumbnails.lq}');
Video Infortimation
  • String url - URL of the video for allquality with direct streaming and downloading
  • int fps - Frames per second
  • String resolution - Resolution of the video
  • String audio - Audio of the video
  • int filesize - Filesize of the video
  • String quality - Quality of the video
  • String videoExtension - Video extension
  • int height - Height of the video
  • int width - Width of the video

Example

👉 For a complete example, refer to the Youtube package documentation.

Report bugs or issues

You are welcome to open a ticket on github if any 🐞 problems arise. New ideas are always welcome.

Note: This package uses third-party api to fetch data.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。