mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-17 04:47:02 +00:00
cleanup
This commit is contained in:
@@ -314,6 +314,7 @@ export const GroupCallView: FC<Props> = ({
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
// TODO split this into leave and onDisconnect
|
||||
const onLeft = useCallback(
|
||||
(
|
||||
reason: "timeout" | "user" | "allOthersLeft" | "decline" | "error",
|
||||
|
||||
@@ -151,6 +151,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
||||
setVm(vm);
|
||||
|
||||
vm.leave$.pipe(scope.bind()).subscribe(props.onLeft);
|
||||
|
||||
return (): void => {
|
||||
scope.end();
|
||||
};
|
||||
|
||||
@@ -221,30 +221,6 @@ export const createLocalMembership$ = ({
|
||||
switchMap((connection) => (connection ? connection.state$ : of(null))),
|
||||
);
|
||||
|
||||
// /**
|
||||
// * Whether we are "fully" connected to the call. Accounts for both the
|
||||
// * connection to the MatrixRTC session and the LiveKit publish connection.
|
||||
// */
|
||||
// TODO remove this and just make it one single check of livekitConnectionState$
|
||||
// const connected$ = scope.behavior(
|
||||
// localConnectionState$.pipe(
|
||||
// switchMap((state) => {
|
||||
// logger.debug("livekit: Connected state changed", state);
|
||||
// if (!state) return of(false);
|
||||
// if (state.state === "ConnectedToLkRoom") {
|
||||
// logger.debug(
|
||||
// "livekit: Connected state changed (inner livekitConnectionState$)",
|
||||
// state.livekitConnectionState$.value,
|
||||
// );
|
||||
// return state.livekitConnectionState$.pipe(
|
||||
// map((lkState) => lkState === ConnectionState.Connected),
|
||||
// );
|
||||
// }
|
||||
// return of(false);
|
||||
// }),
|
||||
// ),
|
||||
// );
|
||||
|
||||
// MATRIX RELATED
|
||||
|
||||
const reconnecting$ = scope.behavior(
|
||||
@@ -365,7 +341,6 @@ export const createLocalMembership$ = ({
|
||||
map(() => true),
|
||||
startWith(false),
|
||||
),
|
||||
// TODO use local connection state here to give the full pciture of the livekit state!
|
||||
fatalLivekitError$,
|
||||
]).pipe(
|
||||
map(
|
||||
|
||||
Reference in New Issue
Block a user