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
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.
- video_player_android
Android implementation of the video_player plugin
88Compare - video_player_avfoundation
iOS and macOS implementation of the video_player plugin
86Compare - video_player
Flutter plugin for displaying inline video on Android, iOS, macOS, and web.
93Compare - video_player_tizen
Tizen implementation of the video_player plugin.
71Compare
Works with
Packages commonly used together with youtube_player_iframe: ones it builds on, ones built on it, and its own family.
- url_launcheryoutube_player_iframe depends on itFlutter plugin for launching URLs across mobile, desktop, and web platforms.
- webview_flutter_wkwebviewyoutube_player_iframe depends on itA Flutter plugin providing a WebView widget based on Apple's WKWebView control.
- webview_flutter_androidyoutube_player_iframe depends on itAndroid implementation of the webview_flutter plugin providing a WebView widget.
- webview_flutteryoutube_player_iframe depends on itFlutter plugin that embeds a native WebView widget.
- material_uiyoutube_player_iframe depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- youtube_playerSame familyPlay YouTube videos with the official IFrame Player API, in a minimal native WebView on Android, iOS, macOS, Windows and Linux, and in the page on the web.
- youtube_player_flutterBuilt on youtube_player_iframeFlutter widget for playing YouTube videos via the official IFrame Player API.