chore: Add simulate for candidate protocol switch. (#176)
This commit is contained in:
@@ -174,5 +174,6 @@ enum SimulateScenarioResult {
|
||||
nodeFailure,
|
||||
migration,
|
||||
serverLeave,
|
||||
switchCandidate,
|
||||
clear,
|
||||
}
|
||||
|
||||
@@ -222,6 +222,8 @@ class _ControlsWidgetState extends State<ControlsWidget> {
|
||||
nodeFailure: result == SimulateScenarioResult.nodeFailure ? true : null,
|
||||
migration: result == SimulateScenarioResult.migration ? true : null,
|
||||
serverLeave: result == SimulateScenarioResult.serverLeave ? true : null,
|
||||
switchCandidate:
|
||||
result == SimulateScenarioResult.switchCandidate ? true : null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,12 +575,14 @@ extension RoomDebugMethods on Room {
|
||||
bool? nodeFailure,
|
||||
bool? migration,
|
||||
bool? serverLeave,
|
||||
bool? switchCandidate,
|
||||
}) async {
|
||||
engine.signalClient.sendSimulateScenario(
|
||||
speakerUpdate: speakerUpdate,
|
||||
nodeFailure: nodeFailure,
|
||||
migration: migration,
|
||||
serverLeave: serverLeave,
|
||||
switchCandidate: switchCandidate,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -438,6 +438,7 @@ extension SignalClientRequests on SignalClient {
|
||||
bool? nodeFailure,
|
||||
bool? migration,
|
||||
bool? serverLeave,
|
||||
bool? switchCandidate,
|
||||
}) =>
|
||||
_sendRequest(lk_rtc.SignalRequest(
|
||||
simulate: lk_rtc.SimulateScenario(
|
||||
@@ -445,6 +446,9 @@ extension SignalClientRequests on SignalClient {
|
||||
nodeFailure: nodeFailure,
|
||||
migration: migration,
|
||||
serverLeave: serverLeave,
|
||||
switchCandidateProtocol: (switchCandidate != null && switchCandidate)
|
||||
? lk_rtc.CandidateProtocol.TCP
|
||||
: null,
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user