Skip to content
pubscout

youtube_player_iframe

6.0.3, released 5 days ago by sarbagyastha.com.np

Flutter widget for embedding YouTube videos via the official iFrame API

WASM-readyUses material_ui
$ flutter pub add youtube_player_iframe
Source repository

What it does

Provides a WebView‑based player that supports inline playback, custom controls, playlists, lazy thumbnails, and full‑screen handling across Android, iOS, macOS and Web.

AI-written summary of version 6.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Embedding YouTube videos in a Flutter app
  • Need full control over playback UI
  • Want lazy thumbnail loading for lists
  • Require cross‑platform support without API key

Skip it when

  • You need a native player for non‑YouTube videos
  • You need advanced analytics or DRM support
  • You want to avoid WebView overhead on low‑memory devices

Strengths

  • No API key required
  • Full control over UI via YoutubeValueBuilder
  • Lazy thumbnail support for efficient lists
  • Automatic full‑screen handling and rotation support

Weaknesses

  • Relies on WebView, which can be heavy
  • Limited to YouTube only
  • No native media controls outside YouTube

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
7

Add dependency, follow webview_flutter setup guide for each platform (Android, iOS, macOS, Web). No build_runner or codegen needed.

final controller=YoutubePlayerController.fromVideoId(videoId:'<video-id>',autoPlay:false,params:const YoutubePlayerParams(showFullscreenButton:true));

YoutubePlayer(controller:controller,aspectRatio:16/9);

Alternatives

Packages that do the same job and could replace youtube_player_iframe.

Works with

Packages commonly used together with youtube_player_iframe: ones it builds on, ones built on it, and its own family.