搜索插件、代码仓与 APP 分类

youtube_player_flutter 封面
插件详情v10.0.1

youtube_player_flutter

使用官方 iFrame 播放器 API 播放或流式传输内联 YouTube 视频的 Flutter 插件。此插件支持 Android 和 iOS。

AndroidiOSWebmacOSWindows
近 30 天下载
21.6万
喜欢数
1710
Pub 分数
160

安装插件

flutter pub add youtube_player_flutter

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 插件,使用官方 iFrame Player API 实现 YouTube 视频的内联播放。它支持 Android、iOS、Web、macOS 和 Windows 多个平台,为将 YouTube 内容无缝集成到 Flutter 应用程序中提供了便捷方式。该插件提供可自定义的视频播放器,支持多种播放控制、事件和画质设置。开发者可以轻松在应用中嵌入和管理 YouTube 视频,而无需依赖外部播放器或复杂的变通方案。

适合场景

  • 在移动应用中嵌入 YouTube 视频
  • 在网页应用中流式传输视频
  • 创建视频教程或内容中心
  • 在教育类应用程序中集成视频播放
  • 构建丰富的媒体 Flutter 体验

主要特点

  • 支持 iframe 播放器 API
  • 跨平台兼容性
  • 可自定义的播放器UI
  • 播放状态的事件处理
  • 跨设备的响应式设计
  • 视频质量选择

适合对象

  • 开发媒体密集型应用的开发者
  • 教育或教程平台
  • 内容分发应用
  • 需要嵌入视频流的应用程序
  • Flutter 团队针对多个平台

使用建议

  • 需要互联网连接以加载视频
  • 与原生播放器相比,自定义功能有限
  • 取决于 YouTube 的 API 可用性
  • 对低端设备的潜在性能影响
  • 某些平台可能需要额外的权限

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Youtube Player iFrame Youtube Player Flutter

Youtube Player for Flutter

A Flutter monorepo for seamless YouTube video playback, powered by the official iFrame Player API.

Stars Issues BSD-3 License


Packages

Package Version Demo Description Platforms
youtube_player_flutter pub demo Batteries-included YouTube player with built-in controls, gestures, and live stream UI Android, iOS, macOS, Web
youtube_player_iframe pub demo Full-control Flutter port of the YouTube iFrame API. Build your own UI. Android, iOS, macOS, Web
youtube_player_iframe_web pub Web platform implementation for youtube_player_iframe (added automatically) Web

Which package should I use?

youtube_player_flutter: just want a player that works

The quickest path to YouTube playback in your app. It ships with ready-made controls, a progress bar, drag-to-seek, pinch-to-fullscreen, and a live stream UI, all out of the box. Drop it in, point it at a video ID, and you're done.

flutter pub add youtube_player_flutter

Best for: apps that want a polished, functional player with minimal setup.


youtube_player_iframe: want full control over the player

A lower-level package that gives you the complete YouTube iFrame API. You own the UI; the package handles playback state, playlists, metadata, fullscreen transitions, thumbnails, and more. Includes a lazy-loading thumbnail widget perfect for video lists.

flutter pub add youtube_player_iframe

Best for: apps with a custom player design, complex playback logic, or playlist management needs.


youtube_player_iframe_web: you probably don't need to add this

This is the web platform implementation consumed automatically by youtube_player_iframe. You only need to add it directly if you're building a platform plugin or working inside this monorepo.


License

BSD-3-Clause. See LICENSE for details.

This project uses the YouTube IFrame Player API. By using these packages, you agree to the YouTube API Services Terms of Service.

API method documentation is adapted from the YouTube IFrame Player API Reference, © Google LLC, licensed under CC BY 4.0. See NOTICE for details.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目