CamcelCase for enum values
This commit is contained in:
parent
432f7ef93a
commit
734d330a10
3 changed files with 13 additions and 13 deletions
|
|
@ -103,9 +103,9 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum ConnectionState {
|
export enum ConnectionState {
|
||||||
ESTABLISHING_CALL = "establishing call", // call hasn't been established yet
|
EstablishingCall = "establishing call", // call hasn't been established yet
|
||||||
WAIT_MEDIA = "wait_media", // call is set up, waiting for ICE to connect
|
WaitMedia = "wait_media", // call is set up, waiting for ICE to connect
|
||||||
CONNECTED = "connected", // media is flowing
|
Connected = "connected", // media is flowing
|
||||||
}
|
}
|
||||||
|
|
||||||
// Represents something that should get a tile on the layout,
|
// Represents something that should get a tile on the layout,
|
||||||
|
|
@ -179,14 +179,14 @@ export function InCallView({
|
||||||
for (const participant of participants) {
|
for (const participant of participants) {
|
||||||
const userCall = groupCall.getCallByUserId(participant.userId);
|
const userCall = groupCall.getCallByUserId(participant.userId);
|
||||||
const feed = userMediaFeeds.find((f) => f.userId === participant.userId);
|
const feed = userMediaFeeds.find((f) => f.userId === participant.userId);
|
||||||
let connectionState = ConnectionState.ESTABLISHING_CALL;
|
let connectionState = ConnectionState.EstablishingCall;
|
||||||
if (feed && feed.isLocal()) {
|
if (feed && feed.isLocal()) {
|
||||||
connectionState = ConnectionState.CONNECTED;
|
connectionState = ConnectionState.Connected;
|
||||||
} else if (userCall) {
|
} else if (userCall) {
|
||||||
if (userCall.state === CallState.Connected) {
|
if (userCall.state === CallState.Connected) {
|
||||||
connectionState = ConnectionState.CONNECTED;
|
connectionState = ConnectionState.Connected;
|
||||||
} else if (userCall.state === CallState.Connecting) {
|
} else if (userCall.state === CallState.Connecting) {
|
||||||
connectionState = ConnectionState.WAIT_MEDIA;
|
connectionState = ConnectionState.WaitMedia;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newConnStates.set(participant.userId, connectionState);
|
newConnStates.set(participant.userId, connectionState);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export const ParticipantsTest = () => {
|
||||||
member: new RoomMember("!fake:room.id", `@user${i}:fake.dummy`),
|
member: new RoomMember("!fake:room.id", `@user${i}:fake.dummy`),
|
||||||
focused: false,
|
focused: false,
|
||||||
presenter: false,
|
presenter: false,
|
||||||
connectionState: ConnectionState.CONNECTED,
|
connectionState: ConnectionState.Connected,
|
||||||
})),
|
})),
|
||||||
[participantCount]
|
[participantCount]
|
||||||
);
|
);
|
||||||
|
|
@ -80,7 +80,7 @@ export const ParticipantsTest = () => {
|
||||||
key={item.id}
|
key={item.id}
|
||||||
name={`User ${item.id}`}
|
name={`User ${item.id}`}
|
||||||
disableSpeakingIndicator={items.length < 3}
|
disableSpeakingIndicator={items.length < 3}
|
||||||
connectionState={ConnectionState.CONNECTED}
|
connectionState={ConnectionState.Connected}
|
||||||
{...rest}
|
{...rest}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const toolbarButtons: JSX.Element[] = [];
|
const toolbarButtons: JSX.Element[] = [];
|
||||||
if (connectionState == ConnectionState.CONNECTED && !isLocal) {
|
if (connectionState == ConnectionState.Connected && !isLocal) {
|
||||||
toolbarButtons.push(
|
toolbarButtons.push(
|
||||||
<AudioButton
|
<AudioButton
|
||||||
key="localVolume"
|
key="localVolume"
|
||||||
|
|
@ -97,15 +97,15 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
|
||||||
|
|
||||||
let caption: string;
|
let caption: string;
|
||||||
switch (connectionState) {
|
switch (connectionState) {
|
||||||
case ConnectionState.ESTABLISHING_CALL:
|
case ConnectionState.EstablishingCall:
|
||||||
caption = t("{{name}} (Connecting...)", { name });
|
caption = t("{{name}} (Connecting...)", { name });
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ConnectionState.WAIT_MEDIA:
|
case ConnectionState.WaitMedia:
|
||||||
// not strictly true, but probably easier to understand than, "Waiting for media"
|
// not strictly true, but probably easier to understand than, "Waiting for media"
|
||||||
caption = t("{{name}} (Waiting for video...)", { name });
|
caption = t("{{name}} (Waiting for video...)", { name });
|
||||||
break;
|
break;
|
||||||
case ConnectionState.CONNECTED:
|
case ConnectionState.Connected:
|
||||||
caption = name;
|
caption = name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue