flutter_meedu_videoplayer 4.0.10 copy "flutter_meedu_videoplayer: ^4.0.10" to clipboard
flutter_meedu_videoplayer: ^4.0.10 copied to clipboard

discontinuedreplaced by: media_kit

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 #

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

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.

Demo https://zezo357.github.io/flutter_meedu_videoplayer_example/

meedu_player meedu_player
meedu_player
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 keyboard arrows
Swipe to seek in video keyboard arrows keyboard arrows keyboard arrows keyboard arrows
FullScreen
Launch Player as FullScreen
Playback Speed
fastForward / Rewind
srt subtitles
Customize partially partially partially partially partially partially

Controls #

seekSwipes: On mobile devices, allows the user to swipe horizontally to seek forward or backward in the video.

volumeSwipes: On mobile devices, allows the user to swipe vertically on the right side of the screen to control the video volume.

brightnessSwipes: On mobile devices, allows the user to swipe vertically on the left side of the screen to control the video brightness.

doubleTapToSeek: On mobile devices, allows the user to double-tap on the sides of the screen to seek forward or backward in the video.

desktopDoubleTapToFullScreen: On desktop devices, allows the user to double-click with the mouse to toggle full-screen mode.

volumeArrows: On desktop devices, allows the user to use the keyboard up and down arrows to increase or decrease the video volume.

seekArrows: On desktop devices, allows the user to use the keyboard right and left arrows to seek forward or backward in the video.

escapeKeyCloseFullScreen: On desktop devices, allows the user to press the Escape key to close full-screen mode.

numPadDecimalKeyToggleFit: On desktop devices, allows the user to press the NumPad Decimal key (.) to toggle the video fit.

enterKeyOpensFullScreen: On desktop devices, allows the user to press the Enter key to open full-screen mode.

spaceKeyTogglePlay: On desktop devices, allows the user to press the Space key to toggle between playing and pausing the video.

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 #

Everything ready.

The minimum supported macOS version is 11.0,set MACOSX_DEPLOYMENT_TARGET = 11.0 macos\Runner.xcodeproj\project.pbxproj

Also, during the build phase, the following warnings are not critical and cannot be silenced:

#import "Headers/media_kit_video-Swift.h"
        ^
/path/to/media_kit/media_kit_test/build/macos/Build/Products/Debug/media_kit_video/media_kit_video.framework/Headers/media_kit_video-Swift.h:270:31: warning: 'objc_ownership' only applies to Objective-C object or block pointer types; type here is 'CVPixelBufferRef' (aka 'struct __CVBuffer *')
- (CVPixelBufferRef _Nullable __unsafe_unretained)copyPixelBuffer SWIFT_WARN_UNUSED_RESULT;
# 1 "<command line>" 1
 ^
<command line>:20:9: warning: 'POD_CONFIGURATION_DEBUG' macro redefined
#define POD_CONFIGURATION_DEBUG 1 DEBUG=1 
        ^
#define POD_CONFIGURATION_DEBUG 1
        ^

iOS (replace original video_player with media_kit one) #

  1. The minimum supported iOS version is 13.0, so the target needs to be set IPHONEOS_DEPLOYMENT_TARGET to 13.0 in ios\Runner.xcodeproj\project.pbxproj
  2. Just add this package in case you set iosUseMediaKit to true in initMeeduPlayer
dependencies:
  ...
  media_kit_libs_ios_video: ^1.0.2         # iOS package for video (& audio) native libraries.

Also, software rendering is forced in the iOS simulator, due to an incompatibility with OpenGL ES.

👋 👉 Complete documentation here