youtube_player_embed
1.6.4, released 2 years ago by an unverified publisher
Embed YouTube videos and shorts in Flutter using an InAppWebView.
What it does
Allows developers to embed YouTube videos and YouTube Shorts directly into Flutter applications using an InAppWebView. Provides customizable options such as autoplay, mute, aspect ratio customization, programmatic playback controls, and event listeners.
AI-written summary of version 1.6.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to embed YouTube videos or Shorts into your Flutter application across multiple platforms.
- You require advanced playback controls and event handling for YouTube embeds.
Skip it when
- You are playing raw video files or streaming non-YouTube video sources.
- You want a native video player without web-view overhead.
Strengths
- Supports YouTube Shorts and normal videos with custom aspect ratios.
- Offers programmatic control like play, pause, seek, and mute/unmute.
- Includes advanced event listeners for state changes, time tracking, and seeking.
Weaknesses
- Relies on InAppWebView behind the scenes rather than a purely native player implementation.
- Requires platform-specific configuration for Android and iOS.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires adding INTERNET and ACCESS_NETWORK_STATE permissions in AndroidManifest.xml, and configuring NSAppTransportSecurity and Info.plist settings on iOS.
YoutubePlayerEmbed(
videoId: 'dQw4w9WgXcQ',
autoPlay: false,
aspectRatio: 16 / 9,
)Alternatives
Packages that do the same job and could replace youtube_player_embed.
- video_player_android
Android implementation of the video_player plugin
88Compare - video_player_avfoundation
iOS and macOS implementation of the video_player plugin
86Compare - omni_video_player
A unified Flutter widget for playing videos from YouTube, Vimeo, network, and local files.
76Compare - youtube_player_iframe
Flutter widget for embedding YouTube videos via the official iFrame API
94Compare
Works with
Packages commonly used together with youtube_player_embed: ones it builds on, ones built on it, and its own family.