Closed inhohwangg closed 11 months ago
can you test https://github.com/alexmercerind/media_kit example
looks like a media_kit issue to me since i am using it to run videos on linux,
also can you provide flutter doctor? and version of package used from pubspec.yaml
also did you follow the linux setup?
My flutter doctor
[✓] Flutter (Channel stable, 3.10.5, on Debian GNU/Linux 11 (bullseye) 5.10.0-23-amd64, locale ko_KR.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2022.2)
[✓] Android Studio (version 2021.3)
[✓] Android Studio
[✓] VS Code (version 1.74.3)
[✓] VS Code (version 1.75.0-insider)
[✓] Connected device (2 available)
[✓] Network resources
I initialized initMeeduPlayer in main.dart
void main() async { try { WidgetsFlutterBinding.ensureInitialized(); await initMeeduPlayer(); if (Platform.isLinux) { // Must add this line. await windowManager.ensureInitialized();
WindowOptions windowOptions = WindowOptions(
fullScreen: true,
center: true,
backgroundColor: Colors.transparent,
skipTaskbar: false,
titleBarStyle: TitleBarStyle.hidden,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
// await windowManager.setPosition(Offset(2240, 0));
// await windowManager.setSize(Size(400, 400));
});
}
} catch (e, stackTrace) { print('Error initializing window manager: $e'); print(stackTrace); }
} await GetStorage.init(); HttpOverrides.global = NoCheckCertificateHttpOverrides(); runApp(MyApp()); } And for the rest of the code, I referenced the basicExample in the link below. https://zezo357.github.io/flutter_meedu_videoplayer/#/?id=linux
Did you try media_kit example?
And did you follow the Linux setup?
I used the example you gave and it failed And the Linux settings what should I follow?
I installed only the packages listed in the official documentation
sudo apt install libmpv-dev mpv
This needed,
And I recommend you test media_kit to figure out if it's a problem from this package or media_kit
I installed sudo apt install libmpv-dev mpv
.
I then used media_kit
and succeeded in getting the video on the screen.
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4`
The above link is the one I tested
But I still get
[xcb] Unknown sequence number while processing reply
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
I got the above error.
Well then you will need to open the issue in media_kit since its an issue in their package
As I mentioned I am only using media_kit to render video on Linux.
When I entered the command flutter run -d linux I got the following error
I used this package like this
In main.dart, initialize initMeeduPlayer and call
In home_page.dart, I looked at the code in basicExample and wrote it
The error occurs in initMeeduPlayer().
This is because commenting out initMeeduPlayer() prevents the error from occurring.
Can you tell me how to resolve the error?