flutter_meedu_videoplayer 4.0.8 flutter_meedu_videoplayer: ^4.0.8 copied to clipboard
A cross Platform video player that uses video_player for android and ios and web, video_player_media_kit for windows and linux and macos.
flutter_meedu_videoplayer #
Cross-platform video player #
- For Android, Ios and Web we are using video player
- For Windows and Linux and macos we are using media_kit.
Features | iOS | Android | windows | linux | macos | web |
---|---|---|---|---|---|---|
Videos from Network | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Videos from Assets | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Videos from local files | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Looping | ✅ | ✅ | x | x | x | x |
AutoPlay | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Swipe to increase and decrease Sound | ✅ | ✅ | keyboard arrows | keyboard arrows | ✅ | keyboard arrows |
Swipe to seek in video | ✅ | ✅ | keyboard arrows | keyboard arrows | ✅ | keyboard arrows |
FullScreen | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Launch Player as FullScreen | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Playback Speed | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
fastForward / Rewind | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
srt subtitles | ✅ | ✅ | x | x | x | x |
Customize | partially | partially | partially | partially | x | partially |
Initialize #
void main() {
initMeeduPlayer();
runApp(MyApp());
}
Setup #
Windows #
Everything ready.
Linux #
System shared libraries from distribution specific user-installed packages are used by-default. You can install these as follows.
Ubuntu / Debian
sudo apt install libmpv-dev mpv
Packaging
There are other ways to bundle these within your app package e.g. within Snap or Flatpak. Few examples:
Note: macos is not tested (if you have any problems open an issue) #
macOS #
Due to media_kit compilation fails these needs to be added (thats a workaround for now until this fix is released)
dependency_overrides:
media_kit:
git:
url: https://github.com/zezo357/media_kit
ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
path: ./media_kit
media_kit_video:
git:
url: https://github.com/zezo357/media_kit
ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
path: ./media_kit_video
media_kit_libs_ios_video:
git:
url: https://github.com/zezo357/media_kit
ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
path: ./media_kit_libs_ios_video
media_kit_native_event_loop:
git:
url: https://github.com/zezo357/media_kit
ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
path: ./media_kit_native_event_loop
media_kit_libs_macos_video:
git:
url: https://github.com/zezo357/media_kit
ref: 6fc3720bea0b162262c9dc48e655b34cfa66903f
path: ./media_kit_libs_macos_video
iOS (replace original video_player with media_kit one) #
- set IPHONEOS_DEPLOYMENT_TARGET to 13.0 in
ios\Runner.xcodeproj\project.pbxproj
- Just add this package in case you set iosUseMediaKit to true in initMeeduPlayer
dependencies:
...
media_kit_libs_ios_video: ^1.0.0 # iOS package for video (& audio) native libraries.