Merge pull request #2 from livekit/migration
Add simulate migration in debug options
This commit is contained in:
commit
9964dc42b3
1 changed files with 6 additions and 2 deletions
|
@ -65,10 +65,13 @@ export const DebugOverlay = ({ room }: DebugProps) => {
|
||||||
if (value == '') {
|
if (value == '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
onClose();
|
||||||
|
|
||||||
event.target.value = '';
|
event.target.value = '';
|
||||||
let isReconnect = false;
|
let isReconnect = false;
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 'signal-reconnect':
|
case 'signal-reconnect':
|
||||||
|
case 'migration':
|
||||||
isReconnect = true;
|
isReconnect = true;
|
||||||
|
|
||||||
// fall through
|
// fall through
|
||||||
|
@ -81,14 +84,14 @@ export const DebugOverlay = ({ room }: DebugProps) => {
|
||||||
title: 'Reconnecting...',
|
title: 'Reconnecting...',
|
||||||
description: `current server: ${room.engine.connectedServerAddress}`,
|
description: `current server: ${room.engine.connectedServerAddress}`,
|
||||||
status: 'info',
|
status: 'info',
|
||||||
duration: 4000,
|
duration: 3000,
|
||||||
});
|
});
|
||||||
room.once(RoomEvent.Reconnected, () => {
|
room.once(RoomEvent.Reconnected, () => {
|
||||||
toast({
|
toast({
|
||||||
title: 'Reconnected',
|
title: 'Reconnected',
|
||||||
description: `reconnected server: ${room.engine.connectedServerAddress}`,
|
description: `reconnected server: ${room.engine.connectedServerAddress}`,
|
||||||
status: 'success',
|
status: 'success',
|
||||||
duration: 4000,
|
duration: 3000,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -120,6 +123,7 @@ export const DebugOverlay = ({ room }: DebugProps) => {
|
||||||
<option value="signal-reconnect">Signal reconnect</option>
|
<option value="signal-reconnect">Signal reconnect</option>
|
||||||
<option value="speaker">Speaker update</option>
|
<option value="speaker">Speaker update</option>
|
||||||
<option value="server-leave">Server booted</option>
|
<option value="server-leave">Server booted</option>
|
||||||
|
<option value="migration">Migration (Cloud-only)</option>
|
||||||
</Select>
|
</Select>
|
||||||
</Td>
|
</Td>
|
||||||
</Tr>
|
</Tr>
|
||||||
|
|
Loading…
Add table
Reference in a new issue