Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev2.0.0

youtube

Um pacote para obter informações de vídeo do YouTube e miniaturas em múltiplas qualidades.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
136
Curtidas
60
Pontos Pub
140

Instalar pacote

flutter pub add youtube

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

O pacote youtube oferece uma maneira simples de buscar informações sobre vídeos do YouTube e miniaturas em vários níveis de qualidade. Ele suporta múltiplas plataformas, incluindo Android, iOS, Web, macOS, Windows e Linux. Desenvolvedores podem recuperar metadados como título, descrição, duração e contagem de visualizações, juntamente com URLs de miniaturas de alta qualidade. O pacote é ideal para integrar conteúdo do YouTube em aplicativos sem a necessidade de configurações complexas de API. Ele utiliza internamente a YouTube Data API, tornando-o eficiente para exibir pré-visualizações de vídeos ou construir funcionalidades de descoberta de mídia.

Casos de uso

  • Incorporar visualizações de vídeos do YouTube
  • Construindo aplicativos de descoberta de mídia
  • Exibindo metadados de vídeo
  • Criando visualizadores de lista de reprodução de vídeo
  • Buscando miniaturas por qualidade

Principais recursos

  • Buscar detalhes do vídeo
  • Várias opções de qualidade de miniatura
  • Suporte multiplataforma
  • Interface de API simples
  • Não é necessário configurar a chave da API

Indicado para

  • Aplicativos que precisam de dados do YouTube
  • Aplicações ricas em mídia
  • Funcionalidades de visualização de conteúdo
  • Desenvolvedores Flutter em busca de integração rápida

Considerações

  • Requer conexão com a internet
  • Limitado a dados de vídeo públicos
  • Depende da disponibilidade da API do YouTube
  • Pode ser necessário o tratamento de limite de taxa em uso de alto volume

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.

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.

Categorias

Dependências

Lista de dependências 1 itens

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.