Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
StyleSheet,
View,
} from 'react-native';
import { ParticipantsInfoList } from './ParticipantsInfoList';
import { ParticipantsInfoListModal } from './ParticipantsInfoListModal';
import { BottomControls } from './CallControlls/BottomControls';
import { useOrientation } from '../hooks/useOrientation';
import { Z_INDEX } from '../constants';
Expand Down Expand Up @@ -173,7 +173,7 @@ export const ActiveCall = ({
landscape={isLandscape}
layout={selectedLayout}
/>
<ParticipantsInfoList
<ParticipantsInfoListModal
isCallParticipantsInfoVisible={isCallParticipantsVisible}
setIsCallParticipantsInfoVisible={setIsCallParticipantsVisible}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,64 +36,69 @@ export const BottomControls = ({
}: BottomControlsProps) => {
const { useMicrophoneState } = useCallStateHooks();
const { isSpeakingWhileMuted } = useMicrophoneState();
const styles = useStyles(isSpeakingWhileMuted);
const styles = useStyles();

return (
<View style={styles.container}>
{isSpeakingWhileMuted && (
<View style={styles.speakingLabelContainer}>
<Text style={styles.label}>You are muted. Unmute to speak.</Text>
</View>
)}
<View style={[styles.callControlsWrapper]}>
<View style={styles.left}>
<MoreActionsButton />
<ToggleAudioPublishingButton />
<ToggleVideoPublishingButton />
<ScreenShareToggleButton />
<RecordCallButton
toggleCallRecording={toggleCallRecording}
isAwaitingResponse={isAwaitingResponse}
isCallRecordingInProgress={isCallRecordingInProgress}
/>
</View>
<View style={styles.right}>
<ParticipantsButton onParticipantInfoPress={onParticipantInfoPress} />
<ChatButton
onPressHandler={onChatOpenHandler}
unreadBadgeCount={unreadCountIndicator}
/>
<>
<View style={styles.container}>
<View style={[styles.callControlsWrapper]}>
<View style={styles.left}>
<MoreActionsButton />
<ToggleAudioPublishingButton />
<ToggleVideoPublishingButton />
<ScreenShareToggleButton />
<RecordCallButton
toggleCallRecording={toggleCallRecording}
isAwaitingResponse={isAwaitingResponse}
isCallRecordingInProgress={isCallRecordingInProgress}
/>
</View>
<View style={styles.right}>
<ParticipantsButton
onParticipantInfoPress={onParticipantInfoPress}
/>
<ChatButton
onPressHandler={onChatOpenHandler}
unreadBadgeCount={unreadCountIndicator}
/>
</View>
</View>
</View>
</View>
{/* {isSpeakingWhileMuted && ( */}
<View style={styles.speakingLabelContainer}>
<Text style={styles.label}>You are muted. Unmute to speak.</Text>
</View>
{/* )} */}
</>
);
};

const useStyles = (showMicLabel: boolean) => {
const useStyles = () => {
const { theme } = useTheme();

return useMemo(
() =>
StyleSheet.create({
container: {
paddingVertical: !showMicLabel ? theme.variants.spacingSizes.md : 0,
paddingHorizontal: theme.variants.spacingSizes.md,
backgroundColor: theme.colors.sheetPrimary,
paddingVertical: theme.variants.spacingSizes.md,
backgroundColor: 'pink',
height: BOTTOM_CONTROLS_HEIGHT,
},
speakingLabelContainer: {
backgroundColor: theme.colors.sheetPrimary,
width: '100%',
position: 'absolute',
left: 0,
right: 0,
bottom: BOTTOM_CONTROLS_HEIGHT,
},
label: {
textAlign: 'center',
color: theme.colors.textPrimary,
},
callControlsWrapper: {
display: 'flex',
paddingHorizontal: theme.variants.spacingSizes.md,
flexDirection: 'row',
justifyContent: 'flex-start',
zIndex: Z_INDEX.IN_FRONT,
},
left: {
flex: 2.5,
Expand All @@ -108,6 +113,6 @@ const useStyles = (showMicLabel: boolean) => {
gap: theme.variants.spacingSizes.xs,
},
}),
[theme, showMicLabel],
[theme],
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export const ClosedCaptions = () => {
const { useCallClosedCaptions } = useCallStateHooks();
const closedCaptions = useCallClosedCaptions();
const styles = useStyles();
console.log('closedCaptions', closedCaptions);

// if (closedCaptions.length === 0) {
// return null;
// }

return (
<View style={styles.rootContainer}>
{closedCaptions.map(({ user, start_time, text }) => (
Expand All @@ -27,7 +33,10 @@ const useStyles = () => {
backgroundColor: theme.colors.sheetPrimary,
padding: theme.variants.spacingSizes.md,
width: '100%',
minHeight: 55,
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
},
closedCaptionItem: {
flexDirection: 'row',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { Z_INDEX } from '../constants';
import { ButtonTestIds } from '../constants/TestIds';
import { useAppGlobalStoreValue } from '../contexts/AppContext';

export interface ParticipantsInfoListProps {
interface ParticipantsInfoListProps {
/**
* Boolean that decides whether the CallParticipantsInfo modal should be open or not.
*/
Expand All @@ -53,7 +53,7 @@ export interface ParticipantsInfoListProps {
* their mute states, video states, screen share states, etc.
* Mute all participants, invite participants, etc.
**/
export const ParticipantsInfoList = ({
export const ParticipantsInfoListModal = ({
isCallParticipantsInfoVisible,
setIsCallParticipantsInfoVisible,
}: ParticipantsInfoListProps) => {
Expand Down