Session migration (#72)

* impl

* retry logic

* simulate

* pass checks

* adjust log level

* retry condition

* fix simulate scenario params

* format

* use `RTCPeerConnectionState` instead of `RTCIceConnectionState`

* adjust retry

* additional check for completer

* more logging

* fix id

* pub

* change package

* doc update

* retry tests

* format

* apply suggestions
This commit is contained in:
Hiroshi Horie
2022-01-25 00:53:18 +07:00
committed by GitHub
parent 3d37f4491d
commit 224047c31f
25 changed files with 575 additions and 275 deletions
+17
View File
@@ -149,6 +149,18 @@ class _ControlsWidgetState extends State<ControlsWidget> {
}
}
void _onTapSimulateScenario() async {
final result = await context.showSimulateScenarioDialog();
if (result != null) {
print('${result}');
await widget.room.simulateScenario(
nodeFailure: result == SimulateScenarioResult.nodeFailure ? true : null,
migration: result == SimulateScenarioResult.migration ? true : null,
serverLeave: result == SimulateScenarioResult.serverLeave ? true : null,
);
}
}
void _onTapSendData() async {
final result = await context.showSendDataDialog();
if (result == true) {
@@ -238,6 +250,11 @@ class _ControlsWidgetState extends State<ControlsWidget> {
icon: const Icon(EvaIcons.settings2),
tooltip: 'Subscribe permission',
),
IconButton(
onPressed: _onTapSimulateScenario,
icon: const Icon(EvaIcons.alertTriangle),
tooltip: 'Simulate scenario',
),
],
),
);