youtube_player_embed is a lightweight and customizable Flutter package that allows developers to embed YouTube videos, including YouTube Shorts, directly into their Flutter applications using an InAppWebView. With this package, you can seamlessly integrate videos with advanced event handling, autoplay, mute, and aspect ratio customization.
Features
🎥 Embed YouTube Videos and Shorts easily with minimal configuration.
🔄 Autoplay Support for instant video playback.
🔇 Mute Option for silent playback.
📱 Responsive Design supporting both horizontal (16:9) and vertical (9:16) videos.
💡 Customizable options to remove YouTube branding buttons for a cleaner UI.
🔗 Direct Shorts Integration for embedding vertical YouTube Shorts seamlessly.
⏰ Advanced Event Listeners for video state updates, time tracking, seek events, and mute/unmute detection.
🔑 Enhanced Control to programmatically remove share and branding buttons dynamically.
⏯ Full-Screen Support with seamless entry and exit.
⏹️ Playback Controls: Play, Pause, Seek, Mute, and Unmute programmatically.
🔍 Custom Video Titles: Dynamically set or hide video titles.
🚀 Performance Optimized: Lightweight and efficient for a smoother user experience.
Installation
Add the following dependency to your pubspec.yaml:
If you still have this problem, try to edit iOS Podfile like this
Edit the Podfile
Add the following to your iOS Podfile if you encounter issues:
target 'Runner' do
use_frameworks! # required by flutter_inappwebview
...
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0' # required by flutter_inappwebview
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end