abdelaziz-mahdy / flutter_meedu_videoplayer

Cross-Platform Video Player for flutter
https://abdelaziz-mahdy.github.io/flutter_meedu_videoplayer/
MIT License
132 stars 69 forks source link

flutter_meedu_videoplayer

Buy Me A Coffee Buy Me a Coffee at ko-fi.com

Cross-Platform Video Player

We have implemented a cross-platform video player, which provides a seamless video playback experience.

👋 👉 Complete documentation here

Flutter Web Demo

meedu_player meedu_player
meedu_player
Feature iOS Android Windows Linux macOS Web
Videos from Network ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Videos from Assets ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Videos from Local Files ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Looping ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
AutoPlay ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Swipe to Control Volume ✔️ ✔️ Keyboard Arrows Keyboard Arrows Keyboard Arrows Keyboard Arrows
Swipe to Seek ✔️ ✔️ Keyboard Arrows Keyboard Arrows Keyboard Arrows Keyboard Arrows
FullScreen ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Launch Player in FullScreen ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Playback Speed ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Fast Forward/Rewind ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
SRT Subtitles ✔️ ✔️ ✔️ ✔️ ✔️ ✔️
Customization Partially Partially Partially Partially Partially Partially
Picture in Picture (PIP) Not Implemented (Help Wanted) ✔️ ✔️ Implemented (Not tested) Implemented (Crashes, waiting for window_manager release, fixed in GitHub) Not Implemented

Video Player Controls

Mobile Controls

Desktop Controls

Initialize

void main() {
  initMeeduPlayer();
  runApp(MyApp());
}

Android (replace original video_player with fvp one)

  1. Just add this package and set androidUseFVP to true in initMeeduPlayer

    iOS (replace original video_player with fvp one)

  2. Just add this package in case you set iosUseFVP to true in initMeeduPlayer

    hls on web

Add to pubspec.yaml

  video_player_web_hls: ^1.0.0+3

Add

<script
  src="https://cdn.jsdelivr.net/npm/hls.js@latest"
  type="application/javascript"
></script>

in index.html above

<script src="https://github.com/abdelaziz-mahdy/flutter_meedu_videoplayer/raw/master/main.dart.js" type="application/javascript"></script>

or above

<script src="https://github.com/abdelaziz-mahdy/flutter_meedu_videoplayer/raw/master/flutter.js" defer></script>