Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(carmode) Force potrait mode, add connection indicator
Horatiu Muresan38abca8a651c
diff --git a/react/features/conference/components/native/carmode/TitleBar.tsx b/react/features/conference/components/native/carmode/TitleBar.tsxindex 8095e7f6b9..923e34e868 100644--- a/react/features/conference/components/native/carmode/TitleBar.tsx+++ b/react/features/conference/components/native/carmode/TitleBar.tsx@@ -1,13 +1,16 @@import React from 'react';+import { useSelector } from 'react-redux';import { Text, View } from 'react-native';import { getConferenceName } from '../../../../base/conference/functions';+import { ConnectionIndicator } from '../../../../connection-indicator';import { getFeatureFlag, MEETING_NAME_ENABLED } from '../../../../base/flags';import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';import { connect } from '../../../../base/redux';;import { RecordingLabel } from '../../../../recording';import { VideoQualityLabel } from '../../../../video-quality';+import { getLocalParticipant } from '../../../../base/participants';import styles from './styles';@@ -32,35 +35,42 @@ type Props = {* @param {Props} props - The React props passed to this component.* @returns {JSX.Element}*/-const TitleBar = (props: Props) : JSX.Element => (<>- <View- pointerEvents = 'box-none'- style = { styles.titleBarWrapper }>+const TitleBar = (props: Props) : JSX.Element => {+ const localParticipant = useSelector(getLocalParticipant);+ const localParticipantId = localParticipant?.id;++ return (<><ViewpointerEvents = 'box-none'- style = { styles.roomNameWrapper }>- <View style = { styles.qualityLabelContainer }>- <VideoQualityLabel />- </View>+ style = { styles.titleBarWrapper }>+ <View+ pointerEvents = 'box-none'+ style = { styles.roomNameWrapper }>+ <View style = { styles.qualityLabelContainer }>+ <VideoQualityLabel />+ </View>+ <ConnectionIndicator+ participantId = { localParticipantId }+ iconStyle = { styles.connectionIndicatorIcon } />+ <View style = { styles.headerLabels }>+ <RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />+ <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />+ </View>- <View style = { styles.headerLabels }>- <RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />- <RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />+ {+ props._meetingNameEnabled+ && <View style = { styles.roomNameView }>+ <Text+ numberOfLines = { 1 }+ style = { styles.roomName }>+ {props._meetingName}+ </Text>+ </View>+ }</View>-- {- props._meetingNameEnabled- && <View style = { styles.roomNameView }>- <Text- numberOfLines = { 1 }- style = { styles.roomName }>- {props._meetingName}- </Text>- </View>- }</View>- </View>-</>);+ </>);+}/*** Maps part of the Redux store to the props of this component.diff --git a/react/features/conference/components/native/carmode/styles.js b/react/features/conference/components/native/carmode/styles.jsindex ca48dc8c74..0e88cf4406 100644--- a/react/features/conference/components/native/carmode/styles.js+++ b/react/features/conference/components/native/carmode/styles.js@@ -203,5 +203,9 @@ export default {color: BaseTheme.palette.text01,marginBottom: 32,...BaseTheme.typography.bodyShortRegularLarge+ },++ connectionIndicatorIcon: {+ fontSize: 20}};diff --git a/react/features/connection-indicator/components/AbstractConnectionIndicator.js b/react/features/connection-indicator/components/AbstractConnectionIndicator.jsindex dbed0bb400..8eda3e9599 100644--- a/react/features/connection-indicator/components/AbstractConnectionIndicator.js+++ b/react/features/connection-indicator/components/AbstractConnectionIndicator.js@@ -32,6 +32,11 @@ export type Props = {*/participantId: string,+ /**+ * Custom icon style.+ */+ iconStyle?: Object,+/*** The source name of the track.*/diff --git a/react/features/connection-indicator/components/native/ConnectionIndicator.js b/react/features/connection-indicator/components/native/ConnectionIndicator.jsindex 544e229c72..41db41b5df 100644--- a/react/features/connection-indicator/components/native/ConnectionIndicator.js+++ b/react/features/connection-indicator/components/native/ConnectionIndicator.js@@ -58,7 +58,7 @@ class ConnectionIndicator extends AbstractConnectionIndicator<Props, State> {}}><BaseIndicatoricon = { IconConnectionActive }- iconStyle = { iconStyle } />+ iconStyle = { this.props.iconStyle || iconStyle } /></View>);}diff --git a/react/features/mobile/navigation/screenOptions.js b/react/features/mobile/navigation/screenOptions.jsindex c6a0a330a3..1f1709dc29 100644--- a/react/features/mobile/navigation/screenOptions.js+++ b/react/features/mobile/navigation/screenOptions.js@@ -184,7 +184,10 @@ export const presentationScreenOptions = {/*** Screen options for car mode.*/-export const carmodeScreenOptions = presentationScreenOptions;+export const carmodeScreenOptions = {+ ...presentationScreenOptions,+ orientation: 'portrait'+};/*** Screen options for chat.