fix(carmode) Force potrait mode, add connection indicator
This commit is contained in:
parent
f3c6b54ffa
commit
38abca8a65
|
@ -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 (<>
|
||||
<View
|
||||
pointerEvents = 'box-none'
|
||||
style = { styles.roomNameWrapper }>
|
||||
<View style = { styles.qualityLabelContainer }>
|
||||
<VideoQualityLabel />
|
||||
</View>
|
||||
|
||||
<View style = { styles.headerLabels }>
|
||||
<RecordingLabel mode = { JitsiRecordingConstants.mode.FILE } />
|
||||
<RecordingLabel mode = { JitsiRecordingConstants.mode.STREAM } />
|
||||
</View>
|
||||
|
||||
{
|
||||
props._meetingNameEnabled
|
||||
&& <View style = { styles.roomNameView }>
|
||||
<Text
|
||||
numberOfLines = { 1 }
|
||||
style = { styles.roomName }>
|
||||
{props._meetingName}
|
||||
</Text>
|
||||
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>
|
||||
|
||||
{
|
||||
props._meetingNameEnabled
|
||||
&& <View style = { styles.roomNameView }>
|
||||
<Text
|
||||
numberOfLines = { 1 }
|
||||
style = { styles.roomName }>
|
||||
{props._meetingName}
|
||||
</Text>
|
||||
</View>
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</>);
|
||||
</>);
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps part of the Redux store to the props of this component.
|
||||
|
|
|
@ -203,5 +203,9 @@ export default {
|
|||
color: BaseTheme.palette.text01,
|
||||
marginBottom: 32,
|
||||
...BaseTheme.typography.bodyShortRegularLarge
|
||||
},
|
||||
|
||||
connectionIndicatorIcon: {
|
||||
fontSize: 20
|
||||
}
|
||||
};
|
||||
|
|
|
@ -32,6 +32,11 @@ export type Props = {
|
|||
*/
|
||||
participantId: string,
|
||||
|
||||
/**
|
||||
* Custom icon style.
|
||||
*/
|
||||
iconStyle?: Object,
|
||||
|
||||
/**
|
||||
* The source name of the track.
|
||||
*/
|
||||
|
|
|
@ -58,7 +58,7 @@ class ConnectionIndicator extends AbstractConnectionIndicator<Props, State> {
|
|||
}}>
|
||||
<BaseIndicator
|
||||
icon = { IconConnectionActive }
|
||||
iconStyle = { iconStyle } />
|
||||
iconStyle = { this.props.iconStyle || iconStyle } />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue