You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-07 21:23:00 +03:00
Proactively fix stuck devices in video rooms (#8587)
* Proactively fix stuck devices in video rooms * Fix tests * Explain why we're disabling the lint rule * Apply code review suggestions * Back VideoChannelStore's flags by SettingsStore instead of localStorage
This commit is contained in:
@@ -60,6 +60,8 @@ import StorageEvictedDialog from "./components/views/dialogs/StorageEvictedDialo
|
||||
import { setSentryUser } from "./sentry";
|
||||
import SdkConfig from "./SdkConfig";
|
||||
import { DialogOpener } from "./utils/DialogOpener";
|
||||
import VideoChannelStore from "./stores/VideoChannelStore";
|
||||
import { fixStuckDevices } from "./utils/VideoChannelUtils";
|
||||
import { Action } from "./dispatcher/actions";
|
||||
import AbstractLocalStorageSettingsHandler from "./settings/handlers/AbstractLocalStorageSettingsHandler";
|
||||
|
||||
@@ -835,6 +837,11 @@ async function startMatrixClient(startSyncing = true): Promise<void> {
|
||||
// Now that we have a MatrixClientPeg, update the Jitsi info
|
||||
Jitsi.getInstance().start();
|
||||
|
||||
// In case we disconnected uncleanly from a video room, clean up the stuck device
|
||||
if (VideoChannelStore.instance.roomId) {
|
||||
fixStuckDevices(MatrixClientPeg.get().getRoom(VideoChannelStore.instance.roomId), false);
|
||||
}
|
||||
|
||||
// dispatch that we finished starting up to wire up any other bits
|
||||
// of the matrix client that cannot be set prior to starting up.
|
||||
dis.dispatch({ action: 'client_started' });
|
||||
|
Reference in New Issue
Block a user