fix: fix connection fails for firefox. (#222)

This commit is contained in:
CloudWebRTC
2022-12-12 11:31:16 +08:00
committed by GitHub
parent 4381287a5d
commit 1596e67cf8
3 changed files with 13 additions and 5 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import 'dart:async';
import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart';
import 'package:livekit_client/src/support/app_state.dart';
import 'package:meta/meta.dart';
@@ -95,7 +96,7 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
_engineListener = this.engine.createListener();
_setUpEngineListeners();
if (!lkPlatformIsTest()) {
if (!kIsWeb && !lkPlatformIsTest()) {
_appCloseSubscription =
AppStateListener.instance.onWindowShouldClose.stream.listen((event) {
disconnect();