jitsi / jitsi-meet-flutter-sdk

Jitsi Meet plugin for Flutter
Apache License 2.0
44 stars 33 forks source link

Conference closes when joining it, shortly after closing it #77

Closed saibotma closed 3 months ago

saibotma commented 3 months ago

Steps

Video

https://github.com/user-attachments/assets/59aaf6e5-92da-430a-9a9b-82c7c3c80bd5

Code

This is a mimized version of the code of the example app, ran using commit 0c1d2709f2656e97d02231262a83dffcaaff0ee6.

import 'package:flutter/material.dart';

import 'package:jitsi_meet_flutter_sdk/jitsi_meet_flutter_sdk.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool didCallReadyToClose = false;

  join() async {
    var options = JitsiMeetConferenceOptions(
      room: "testgabigabi2",
      configOverrides: {
        "startWithAudioMuted": true,
        "startWithVideoMuted": true,
      },
    );

    var listener = JitsiMeetEventListener(
      readyToClose: () => setState(() => didCallReadyToClose = true),
    );
    await JitsiMeet().join(options, listener);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              TextButton(
                onPressed: join,
                child: const Text("Join"),
              ),
              Text("Did call readyToClose: $didCallReadyToClose"),
            ],
          ),
        ),
      ),
    );
  }
}
Calinteodor commented 3 months ago

The fix is available with latest release aka 10.1.0.