This commit is contained in:
edde746
2025-12-02 15:46:19 +01:00
parent e0fd77d7de
commit 920658485f
17 changed files with 1704 additions and 3 deletions
+8
View File
@@ -3,6 +3,7 @@
#include <optional>
#include "flutter/generated_plugin_registrant.h"
#include "mpv/mpv_plugin.h"
FlutterWindow::FlutterWindow(const flutter::DartProject& project)
: project_(project) {}
@@ -25,6 +26,13 @@ bool FlutterWindow::OnCreate() {
return false;
}
RegisterPlugins(flutter_controller_->engine());
// Register mpv player plugin.
OutputDebugStringA("FlutterWindow: About to register MpvPlayerPlugin\n");
MpvPlayerPluginRegisterWithRegistrar(
flutter_controller_->engine()->GetRegistrarForPlugin("MpvPlayerPlugin"));
OutputDebugStringA("FlutterWindow: MpvPlayerPlugin registered\n");
SetChildContent(flutter_controller_->view()->GetNativeWindow());
flutter_controller_->engine()->SetNextFrameCallback([&]() {