WIP refactor for removing m.call events

This commit is contained in:
David Baker
2023-08-16 18:41:27 +01:00
parent e51492b3c7
commit 4242d45ba2
12 changed files with 209 additions and 323 deletions

View File

@@ -16,8 +16,8 @@ limitations under the License.
import { ReactNode } from "react";
import { MatrixClient } from "matrix-js-sdk/src/client";
import { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
import { useTranslation } from "react-i18next";
import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession";
import { useLoadGroupCall } from "./useLoadGroupCall";
import { ErrorView, FullScreenView } from "../FullScreenView";
@@ -26,7 +26,7 @@ interface Props {
client: MatrixClient;
roomIdOrAlias: string;
viaServers: string[];
children: (groupCall: GroupCall) => ReactNode;
children: (rtcSession: MatrixRTCSession) => ReactNode;
createPtt: boolean;
}
@@ -53,7 +53,7 @@ export function GroupCallLoader({
</FullScreenView>
);
case "loaded":
return <>{children(groupCallState.groupCall)}</>;
return <>{children(groupCallState.rtcSession)}</>;
case "failed":
return <ErrorView error={groupCallState.error} />;
}