webviewtube
4.0.0, released 5 months ago by an unverified publisher
Play YouTube videos on mobile platforms using WebView and IFrame Player API.
What it does
Embeds the YouTube IFrame Player API inside a WebView widget to play YouTube videos on Android and iOS platforms. It allows controlling playback state using a WebviewtubeController and WebviewtubeOptions.
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to embed and play YouTube videos within your Flutter mobile app.
- You want to use native YouTube player controls and the IFrame Player API.
Skip it when
- You need to play raw non-YouTube video files directly from local storage or custom URLs.
- You need custom overlays that violate YouTube's Required Minimum Functionality terms.
Strengths
- Integrates official YouTube IFrame Player API via webview_flutter.
- Provides a WebviewtubeController to manage options, playback events, and states easily.
Weaknesses
- Relies on a WebView implementation, which may have heavier overhead than native video players.
- Custom UI overlays on top of the iframe can violate YouTube's terms of service.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Requires setting minimum Android SDK to 21+ and iOS to 12.0+ as mandated by webview_flutter.
WebviewtubePlayer(
videoId: '4AoFA19gbLo',
)Alternatives
Packages that do the same job and could replace webviewtube.
- video_player
If you need to play raw video files or streams directly rather than embedding YouTube videos.
93Compare
Works with
Packages commonly used together with webviewtube: ones it builds on, ones built on it, and its own family.
- webview_flutter_wkwebviewwebviewtube depends on itA Flutter plugin providing a WebView widget based on Apple's WKWebView control.
- webview_flutter_androidwebviewtube depends on itAndroid implementation of the webview_flutter plugin providing a WebView widget.
- webview_flutterwebviewtube depends on itFlutter plugin that embeds a native WebView widget.
- providerwebviewtube depends on itA lightweight wrapper around InheritedWidget for state management