1

Who can tell you what the problem is. A link to the conference is launched in the webview, let's say jitsi, all rights are granted (microphone, camera). The microphone works fine, the interlocutor hears me and I hear him. But there is a problem with the camera, I see myself in the application, and I see the cameras of the interlocutors, but they don't see me. What could be the problem? At the same time, if you simply insert the link in safari, then everything works fine. Thank you all in advance for the answers.

void initState() {
    late final PlatformWebViewControllerCreationParams params;
    if (WebViewPlatform.instance is WebKitWebViewPlatform) {
      params = WebKitWebViewControllerCreationParams(
        allowsInlineMediaPlayback: true,
        mediaTypesRequiringUserAction: const <PlaybackMediaTypes>{
          PlaybackMediaTypes.audio,
        },
      );
    } else {
      params = const PlatformWebViewControllerCreationParams();
    }

    final WebViewController controller =
        WebViewController.fromPlatformCreationParams(
      params,
      onPermissionRequest: (WebViewPermissionRequest request) {
        request.grant();
      },
    );

    if (controller.platform is AndroidWebViewController) {
      AndroidWebViewController.enableDebugging(true);
      (controller.platform as AndroidWebViewController)
          .setMediaPlaybackRequiresUserGesture(false);
    }
    if (controller.platform is WebKitWebViewController) {
      (controller.platform as WebKitWebViewController)
          .setOnPlatformPermissionRequest((request) {
        request.grant();
      });
    }

    controller
      ..setJavaScriptMode(JavaScriptMode.unrestricted)
      ..enableZoom(false)
      ..setUserAgent(
          'Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0')
      ..setBackgroundColor(Colors.black)
      ..loadRequest(Uri.parse(
          'https://meet.jit.si/6ee351585f144d368255844691156d89'));
    _controller = controller;
    super.initState();
  }
@override
  Widget build(BuildContext context) {
    return SafeArea(
      child: WebViewWidget(
        controller: _controller,
      ),
    );
  }
ike13
  • 137
  • 1
  • 11

0 Answers0