add key rotation debug information

This commit is contained in:
Timo K.
2026-08-15 22:32:23 +02:00
parent f2622f0032
commit 0aa9d94826
4 changed files with 52 additions and 0 deletions

View File

@@ -69,6 +69,23 @@ import { Slider } from "../Slider";
import { useUrlParams } from "../UrlParams";
import { type CallViewModel } from "../state/CallViewModel/CallViewModel.ts";
import { getSFUConfigWithOpenID } from "../livekit/openIDSFU";
import { useBehavior } from "../useBehavior";
/**
* Shows whether the call is large enough that MatrixRTC has stopped rotating the media key.
*/
const KeyRotationStatus: FC<{ vm: CallViewModel }> = ({ vm }) => {
const suppressed = useBehavior(vm.keyRotationSuppressed$);
const participantCount = useBehavior(vm.participantCount$);
return (
<p>
Media key rotation:{" "}
{suppressed
? `suppressed, participant limit reached (${participantCount} participants)`
: `active (${participantCount} participants)`}
</p>
);
};
interface Props {
client: MatrixClient;
@@ -368,6 +385,7 @@ export const DeveloperSettingsTab: FC<Props> = ({
id: client.getDeviceId() || "unknown",
})}
</p>
{vm && <KeyRotationStatus vm={vm} />}
<Separator />
<FieldRow>
<InputField