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

youtube_player_iframe 封面
插件详情v6.0.2

youtube_player_iframe

官方 YouTube iFrame 播放器 API 的 Flutter 版本。支持 Android、iOS、macOS 和 Web。

AndroidiOSWebmacOS
近 30 天下载
26.1万
喜欢数
668
Pub 分数
160

安装插件

flutter pub add youtube_player_iframe

插件介绍

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

一个 Flutter 包,提供官方 YouTube iFrame Player API 的 Flutter 实现,可在 Android、iOS、Web 和 macOS 平台上无缝集成 YouTube 视频。它提供了对视频播放的完全控制,包括播放、暂停、快进和音量调整,同时保持与 YouTube 最新功能和响应式设计的兼容性。该包轻量级,专为寻求可靠、跨平台 YouTube 视频嵌入且设置简单的开发者而设计。

适合场景

  • 在移动和网页应用中嵌入 YouTube 视频
  • 创建视频教程或内容播放器
  • 构建媒体丰富的教育应用程序
  • 将 YouTube 内容集成到流媒体平台
  • 开发响应式视频画廊

主要特点

  • 支持 Android、iOS、Web 和 macOS
  • 通过 API 完全控制视频播放
  • 适用于所有屏幕尺寸的响应式设计
  • 实时事件处理(播放、暂停、结束)
  • 轻量且易于集成

适合对象

  • 开发跨平台视频应用的开发者
  • 教育类应用程序创作者
  • 使用YouTube视频的内容平台
  • 需要嵌入视频播放的应用程序
  • 使用一个代码库针对多个平台的团队

使用建议

  • 需要互联网连接以加载视频
  • 超出标准 YouTube 播放器 UI 的自定义功能有限
  • 可能需要额外的样式来支持品牌特定的主题
  • 依赖于 YouTube 的 iFrame 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.

所属分类

依赖

依赖清单 6 项

源码仓库

使用此插件的项目