Skip to content

flutterbysunny/smart_player_kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

smart_player_kit

smart_player_kit

Advanced Flutter media player kit with modern controls.

πŸ”₯ HLS Streaming β€’ 🎬 Reels Support β€’ πŸ“Ί Subtitles β€’ ⚑ Background Playback

Advanced Flutter media player kit with modern controls, subtitles, cache, reels support and background playback.


pub version likes pub points MIT License

✨ Features

  • 🎬 Video Player β€” YouTube / Netflix / Minimal styles
  • πŸ“Ί HLS / M3U8 Streaming
  • πŸͺŸ Mini Player β€” YouTube-style draggable floating player
  • πŸ“ Subtitles β€” SRT and WebVTT with real-time sync
  • 🎡 Audio Player β€” Podcast / Music (full, compact, minimal)
  • πŸ“± Reels Player β€” TikTok/Instagram style vertical feed
  • ⏯ Background Playback β€” plays when app is minimized
  • πŸ”„ Auto Resume β€” saves and restores playback position
  • πŸ“Š Analytics β€” watch time, pause count, completion %
  • πŸ‘† Gestures β€” double-tap seek, swipe volume/brightness
  • πŸ”† Fullscreen Support
  • 🎨 Custom Themes & Controls

πŸ“¦ Installation

Add this to your pubspec.yaml:

dependencies:
  smart_player_kit: ^1.0.0

Then run:

flutter pub get

πŸš€ Quick Start

import 'package:smart_player_kit/smart_player_kit.dart';

SmartPlayer.network(
  'https://example.com/video.mp4',
  title: 'My Video',
);

πŸ“˜ Usage


Basic Video Player

SmartPlayer.network(
  'https://example.com/video.mp4',
  title: 'My Video',
);

HLS Stream

SmartPlayer.config(
  SmartPlayerConfig.hls(
    'https://example.com/stream.m3u8',
    autoPlay: true,
  ),
  title: 'Live Stream',
);

Netflix Style Player

SmartPlayer.config(
  SmartPlayerConfig.network(
    'https://example.com/video.mp4',
    controlsStyle: SmartPlayerControlsStyle.netflix,
    theme: SmartPlayerTheme.netflix(),
  ),
  title: 'Netflix Style',
);

Auto Resume Playback

SmartPlayer.config(
  SmartPlayerConfig.network(
    'https://example.com/video.mp4',
    resumePlayback: true,
    resumeKey: 'my_video_1',
  ),
  title: 'Resume Demo',
);

Mini Player

final playerCtrl = SmartPlayerController(
  config: SmartPlayerConfig.network(
    url,
    autoPlay: true,
  ),
);

final miniCtrl = MiniPlayerController();

miniCtrl.openMiniPlayer(
  title: 'My Video',
  subtitle: 'Channel Name',
);

miniCtrl.minimize();

SmartMiniPlayer(
  miniController: miniCtrl,
  playerController: playerCtrl,
  videoWidget: VideoPlayer(playerCtrl.videoController!),
  onExpand: () {
    // show full player
  },
);

Reels Player

SmartReelsPlayer(
  videos: [
    ReelItem(
      videoUrl: 'https://example.com/reel1.mp4',
      authorName: 'flutter_dev',
      description: 'My first reel!',
      likeCount: 1200,
      commentCount: 34,
    ),
  ],
  onLike: (index, item) {},
  onComment: (index, item) {},
  onShare: (index, item) {},
);

Audio Player

SmartAudioPlayer(
  audioUrl: 'https://example.com/audio.mp3',
  title: 'My Podcast',
  artist: 'Sunny Singh',
  style: AudioPlayerStyle.full,
);

Subtitles (SRT / WebVTT)

final controller = SmartPlayerController(
  config: SmartPlayerConfig.network(url),
);

await controller.initialize();

controller.subtitleController.parseAndLoad(
  vttString,
  SubtitleFormat.webvtt,
);

🎨 Supported Player Styles

Style Description
Minimal Lightweight clean controls
YouTube Familiar YouTube-like controls
Netflix OTT / Netflix style controls

πŸ“± Platform Support

Platform Support
Android βœ…
iOS βœ…

βš™οΈ Requirements

  • Flutter >=3.10.0
  • Dart >=3.0.0

πŸ”₯ Upcoming Features

  • Chromecast Support
  • Download & Offline Playback
  • DRM Support
  • Playlist Queue
  • PiP (Picture in Picture)
  • Web Support

🀝 Contributing

Contributions are welcome!

If you’d like to improve smart_player_kit, feel free to:

  1. Fork the repo
  2. Create a new branch
  3. Make your changes
  4. Submit a Pull Request

πŸ› Issues & Feature Requests

Please open an issue on GitHub if you find bugs or want to request features.


πŸ“„ License

MIT License β€” Copyright (c) 2026 Sunny Singh

See LICENSE for details.

About

Advanced Flutter media player kit with modern controls and streaming support.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages