mirror of
https://github.com/vector-im/element-call.git
synced 2026-07-18 18:59:23 +00:00
tmp: Debug show device id in display name if devtool
This commit is contained in:
@@ -96,6 +96,7 @@ import { ReactionsOverlay } from "./ReactionsOverlay";
|
|||||||
import { CallEventAudioRenderer } from "./CallEventAudioRenderer";
|
import { CallEventAudioRenderer } from "./CallEventAudioRenderer";
|
||||||
import {
|
import {
|
||||||
debugTileLayout as debugTileLayoutSetting,
|
debugTileLayout as debugTileLayoutSetting,
|
||||||
|
developerMode,
|
||||||
useExperimentalToDeviceTransportSetting,
|
useExperimentalToDeviceTransportSetting,
|
||||||
useSetting,
|
useSetting,
|
||||||
} from "../settings/settings";
|
} from "../settings/settings";
|
||||||
@@ -134,6 +135,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
|||||||
};
|
};
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
const [showDeveloperModeDebugOptions] = useSetting(developerMode);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (livekitRoom !== undefined) {
|
if (livekitRoom !== undefined) {
|
||||||
@@ -145,6 +147,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
|||||||
connStateObservable$,
|
connStateObservable$,
|
||||||
reactionsReader.raisedHands$,
|
reactionsReader.raisedHands$,
|
||||||
reactionsReader.reactions$,
|
reactionsReader.reactions$,
|
||||||
|
showDeveloperModeDebugOptions,
|
||||||
);
|
);
|
||||||
setVm(vm);
|
setVm(vm);
|
||||||
return (): void => {
|
return (): void => {
|
||||||
@@ -152,7 +155,13 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
|||||||
reactionsReader.destroy();
|
reactionsReader.destroy();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, [props.rtcSession, livekitRoom, props.e2eeSystem, connStateObservable$]);
|
}, [
|
||||||
|
props.rtcSession,
|
||||||
|
livekitRoom,
|
||||||
|
props.e2eeSystem,
|
||||||
|
connStateObservable$,
|
||||||
|
showDeveloperModeDebugOptions,
|
||||||
|
]);
|
||||||
|
|
||||||
if (livekitRoom === undefined || vm === null) return null;
|
if (livekitRoom === undefined || vm === null) return null;
|
||||||
|
|
||||||
|
|||||||
@@ -268,6 +268,7 @@ function withCallViewModel(
|
|||||||
connectionState$,
|
connectionState$,
|
||||||
raisedHands$,
|
raisedHands$,
|
||||||
new BehaviorSubject({}),
|
new BehaviorSubject({}),
|
||||||
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
onTestFinished(() => {
|
onTestFinished(() => {
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ class UserMedia {
|
|||||||
|
|
||||||
public readonly speaker$: Observable<boolean>;
|
public readonly speaker$: Observable<boolean>;
|
||||||
public readonly presenter$: Observable<boolean>;
|
public readonly presenter$: Observable<boolean>;
|
||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
public readonly id: string,
|
public readonly id: string,
|
||||||
member: RoomMember | undefined,
|
member: RoomMember | undefined,
|
||||||
@@ -487,7 +488,11 @@ export class CallViewModel extends ViewModel {
|
|||||||
const disambiguate = shouldDisambiguate(member, memberships, room);
|
const disambiguate = shouldDisambiguate(member, memberships, room);
|
||||||
displaynameMap.set(
|
displaynameMap.set(
|
||||||
matrixIdentifier,
|
matrixIdentifier,
|
||||||
calculateDisplayName(member, disambiguate),
|
this.showDeveloperModeDebugOptions
|
||||||
|
? calculateDisplayName(member, disambiguate) +
|
||||||
|
" | " +
|
||||||
|
rtcMember.deviceId
|
||||||
|
: calculateDisplayName(member, disambiguate),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return displaynameMap;
|
return displaynameMap;
|
||||||
@@ -1344,6 +1349,7 @@ export class CallViewModel extends ViewModel {
|
|||||||
private readonly reactionsSubject$: Observable<
|
private readonly reactionsSubject$: Observable<
|
||||||
Record<string, ReactionInfo>
|
Record<string, ReactionInfo>
|
||||||
>,
|
>,
|
||||||
|
private readonly showDeveloperModeDebugOptions: boolean,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ export function getBasicCallViewModelEnvironment(
|
|||||||
of(ConnectionState.Connected),
|
of(ConnectionState.Connected),
|
||||||
handRaisedSubject$,
|
handRaisedSubject$,
|
||||||
reactionsSubject$,
|
reactionsSubject$,
|
||||||
|
false,
|
||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
vm,
|
vm,
|
||||||
|
|||||||
Reference in New Issue
Block a user