Show when connection is lost on PTT mode

This commit is contained in:
David Baker
2022-05-30 16:28:16 +01:00
parent 5c4bab2a8a
commit e9b963080c
2 changed files with 32 additions and 3 deletions

View File

@@ -44,8 +44,11 @@ function getPromptText(
activeSpeakerIsLocalUser: boolean,
talkOverEnabled: boolean,
activeSpeakerUserId: string,
activeSpeakerDisplayName: string
activeSpeakerDisplayName: string,
connected: boolean
): string {
if (!connected) return "Connection Lost";
const isTouchScreen = Boolean(window.ontouchstart !== undefined);
if (showTalkOverError) {
@@ -127,6 +130,7 @@ export const PTTCallView: React.FC<Props> = ({
startTalking,
stopTalking,
transmitBlocked,
connected,
} = usePTT(
client,
groupCall,
@@ -234,7 +238,8 @@ export const PTTCallView: React.FC<Props> = ({
activeSpeakerIsLocalUser,
talkOverEnabled,
activeSpeakerUserId,
activeSpeakerDisplayName
activeSpeakerDisplayName,
connected
)}
</p>
{userMediaFeeds.map((callFeed) => (