Fix: re-publish tracks after re connect (#238)

* fix republish local tracks after reconnect.

* update flutter-webrtc.

* remove unused import.

* add dart_webrtc.

* cleanup.

* fix: Fix sendSyncState timing error, when reconnecting is sending.

* Adjust the re-connect logic to ensure that the publisher negotiates and reconnects correctly.

* Update room.dart
This commit is contained in:
CloudWebRTC
2023-02-17 09:04:56 +08:00
committed by GitHub
parent 5018f355f8
commit 5c4761bc7c
6 changed files with 29 additions and 31 deletions
-17
View File
@@ -216,18 +216,6 @@ class _ControlsWidgetState extends State<ControlsWidget> {
if (result == true) await widget.room.disconnect();
}
void _onTapReconnect() async {
final result = await context.showReconnectDialog();
if (result == true) {
try {
await widget.room.reconnect();
await context.showReconnectSuccessDialog();
} catch (error) {
await context.showErrorDialog(error);
}
}
}
void _onTapUpdateSubscribePermission() async {
final result = await context.showSubscribePermissionDialog();
if (result != null) {
@@ -440,11 +428,6 @@ class _ControlsWidgetState extends State<ControlsWidget> {
icon: const Icon(EvaIcons.paperPlane),
tooltip: 'send demo data',
),
IconButton(
onPressed: _onTapReconnect,
icon: const Icon(EvaIcons.refresh),
tooltip: 're-connect',
),
IconButton(
onPressed: _onTapUpdateSubscribePermission,
icon: const Icon(EvaIcons.settings2),