adaptive_video_player 1.1.0 copy "adaptive_video_player: ^1.1.0" to clipboard
adaptive_video_player: ^1.1.0 copied to clipboard

A Flutter video player package that seamlessly handles both YouTube videos and direct video URLs with adaptive player selection. Supports Android, iOS, Windows, and Web.

Adaptive Video Player ๐ŸŽฅ #

๐Ÿ”ฅ One Widget. All Platforms. YouTube + MP4. Zero Headaches.

A powerful cross-platform Flutter video player that supports YouTube, MP4, HLS, and local videos with one unified widget.

Android ยท iOS ยท Windows ยท macOS ยท Linux ยท Web

pub package Flutter Platforms License: MIT


Quick Start โšก #

AdaptiveVideoPlayer(
  config: VideoConfig(
    videoUrl: "https://youtu.be/VIDEO_ID",
  ),
);

Just drop it in โ€” it automatically adapts to YouTube or direct video streams.


Screenshots ๐Ÿ“ธ #

Android Windows Web
[Android] [Windows] [Web]

Features โœจ #

Adaptive Video Player ๐ŸŽฌ #

  • ๐Ÿ” Smart YouTube vs MP4 detection
  • ๐ŸŽฏ Unified API (one widget for everything)
  • ๐ŸŒ True Cross-Platform support
  • ๐Ÿ“Š Native analytics events & callbacks (onAnalyticsEvent)
  • ๐Ÿง  Production-ready architecture

YouTube Support ๐Ÿ“บ #

  • Native-like mobile experience
  • Native YouTube controls on Desktop & Web
  • Live Stream support (isLive, viewerCount)
  • Force Desktop Mode on mobile
  • Settings panel (HD, captions, loop, mute)
  • Safe external link handling
  • Fullscreen with state preservation
  • WASM ready (Web via package:web)

Direct Video Support ๐ŸŽž๏ธ #

  • MP4 ยท MOV ยท MKV ยท WebM ยท HLS ยท Local files
  • Quality selection
  • Subtitle support (SRT/VTT)
  • Custom control builders
  • Error handling
  • Windows plugin integration
  • Fully custom adaptive controls (No Chewie dependency)

Comparison With Popular Packages ๐Ÿ†š #

Feature adaptive_video_player youtube_player_flutter chewie video_player
YouTube Support โœ… โœ… โŒ โŒ
MP4/HLS Support โœ… โŒ โœ… โœ…
Desktop Support โœ… โŒ โš ๏ธ โš ๏ธ
Unified Widget โœ… โŒ โŒ โŒ
Live Stream โœ… โŒ โŒ โŒ

Platform Behavior ๐Ÿ–ฅ #

Platform Engine
Android / iOS youtube_player_flutter
Windows / macOS / Linux InAppWebView + localhost
Web HTML iframe via package:web

Desktop uses http://localhost to bypass YouTube iframe Error 153 restriction.


Installation ๐Ÿ“ฆ #

dependencies:
  adaptive_video_player: ^1.1.0

Example Usage ๐Ÿš€ #

YouTube #

AdaptiveVideoPlayer(
  config: VideoConfig(
    videoUrl: 'https://www.youtube.com/watch?v=vM2dC8OCZoY',
  ),
);

Direct MP4 #

AdaptiveVideoPlayer(
  config: VideoConfig(
    videoUrl: 'https://example.com/video.mp4',
  ),
);

Live Stream #

AdaptiveVideoPlayer(
  config: VideoConfig(
    videoUrl: 'https://www.youtube.com/watch?v=LIVE_ID',
    isLive: true,
    viewerCount: "1.2K",
  ),
);

Roadmap (Planned) ๐Ÿ”ฎ #

  • ๐ŸŽฌ Playlist Support (Coming Soon)
  • ๐Ÿ“บ Picture-in-Picture (In Progress)

Author ๐Ÿ‘จ๐Ÿ’ป #

Ahmed Mohamed Alam GitHub: https://github.com/ahmedalam782


License ๐Ÿ“ #

MIT License

14
likes
0
points
251
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter video player package that seamlessly handles both YouTube videos and direct video URLs with adaptive player selection. Supports Android, iOS, Windows, and Web.

Repository (GitHub)
View/report issues

Topics

#video-player #youtube #streaming #hls #cross-platform

License

unknown (license)

Dependencies

flutter, flutter_bloc, flutter_inappwebview, url_launcher, video_player, video_player_win, web, youtube_player_flutter

More

Packages that depend on adaptive_video_player