8000 windows-desktop_multi_window No implementation found for method initialize on channel FlutterWebRTC.Method · Issue #1811 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content

windows-desktop_multi_window No implementation found for method initialize on channel FlutterWebRTC.Method #1811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yangkun19921001 opened this issue Apr 6, 2025 · 1 comment

Comments

@yangkun19921001
Copy link
yangkun19921001 commented Apr 6, 2025

Describe the bug
When using desktop_multi_window to create child windows on Windows 11, invoking any flutter-webrtc methods (e.g., getUserMedia, RTCPeerConnection) in child windows consistently triggers the error:
MissingPluginException(No implementation found for method initialize on channel FlutterWebRTC.Method)
This occurs exclusively in child windows; the main window works normally despite identical plugin registration logic .

To Reproduce

  1. Initialize desktop_multi_window with explicit plugin registration for child windows:
// Windows platform code (C++)
DesktopMultiWindowSetWindowCreatedCallback([](void* controller) {
  auto* flutter_view_controller = 
      reinterpret_cast<flutter::FlutterViewController*>(controller);
  auto* registry = flutter_view_controller->engine();

  // Register WebRTC plugin for child window
  auto fp = registry->GetRegistrarForPlugin("FlutterWebRTCPlugin");
  FlutterWebRTCPluginRegisterWithRegistrar(fp); // From flutter_webrtc.h
});
  1. In the child window's Flutter UI, call a WebRTC method:
// Dart code in child window
    final rtcConfig = {
      'iceServers': [
        {'urls': 'stun:stun.l.google.com:19302'},
      ],
    };

    // create PeerConnection
    final peerConnection = await rtc.createPeerConnection(rtcConfig);
  1. Observe the MissingPluginException immediately upon method invocation.

Expected behavior
The WebRTC plugin should function in child windows after explicit registration via FlutterWebRTCPluginRegisterWithRegistrar, as it does in the main window .

Platform information

  • Flutter version:

       Flutter 3.29.0 • channel stable •
       https://github.com/flutter/flutter.git
       Framework • revision 35c388afb5 (8 weeks ago) • 2025-02-10 12:48:41
       -0800
       Engine • revision f73bfc4522
      Tools • Dart 3.7.0 • DevTools 2.42.2
    
  • Plugin version:

    • desktop_multi_window: ^0.2.1
    • flutter_webrtc: ^0.13.1
  • OS: Windows 11 21H2 22000.2538

  • Additional context:

    • Plugin registration succeeds in the main window.
    • No issues with other plugins (e.g., path_provider) in child windows.
    • Multi-window plugin registration works correctly on macOS but fails on Windows.
@lsq286224380
Copy link

遇到了相同的问题,希望有解决方法

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
< 3B16 /form>
Projects
None yet
Development

No branches or pull requests

2 participants
0