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 React from 'react';
|
||||||
|
import { useSelector } from 'react-redux';
|
||||||
import { Text, View } from 'react-native';
|
import { Text, View } from 'react-native';
|
||||||
|
|
||||||
import { getConferenceName } from '../../../../base/conference/functions';
|
import { getConferenceName } from '../../../../base/conference/functions';
|
||||||
|
import { ConnectionIndicator } from '../../../../connection-indicator';
|
||||||
import { getFeatureFlag, MEETING_NAME_ENABLED } from '../../../../base/flags';
|
import { getFeatureFlag, MEETING_NAME_ENABLED } from '../../../../base/flags';
|
||||||
import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
|
import { JitsiRecordingConstants } from '../../../../base/lib-jitsi-meet';
|
||||||
import { connect } from '../../../../base/redux';;
|
import { connect } from '../../../../base/redux';;
|
||||||
import { RecordingLabel } from '../../../../recording';
|
import { RecordingLabel } from '../../../../recording';
|
||||||
import { VideoQualityLabel } from '../../../../video-quality';
|
import { VideoQualityLabel } from '../../../../video-quality';
|
||||||
|
|
||||||
|
import { getLocalParticipant } from '../../../../base/participants';
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,35 +35,42 @@ type Props = {
|
||||||
* @param {Props} props - The React props passed to this component.
|
* @param {Props} props - The React props passed to this component.
|
||||||
* @returns {JSX.Element}
|
* @returns {JSX.Element}
|
||||||
*/
|
*/
|
||||||
const TitleBar = (props: Props) : JSX.Element => (<>
|
const TitleBar = (props: Props) : JSX.Element => {
|
||||||
<View
|
const localParticipant = useSelector(getLocalParticipant);
|
||||||
pointerEvents = 'box-none'
|
const localParticipantId = localParticipant?.id;
|
||||||
style = { styles.titleBarWrapper }>
|
|
||||||
|
return (<>
|
||||||
<View
|
<View
|
||||||
pointerEvents = 'box-none'
|
pointerEvents = 'box-none'
|
||||||
style = { styles.roomNameWrapper }>
|
style = { styles.titleBarWrapper }>
|
||||||
<View style = { styles.qualityLabelContainer }>
|
<View
|
||||||
<VideoQualityLabel />
|
pointerEvents = 'box-none'
|
||||||
</View>
|
style = { styles.roomNameWrapper }>
|
||||||
|
<View style = { styles.qualityLabelContainer }>
|
||||||
<View style = { styles.headerLabels }>
|
<VideoQualityLabel />
|
||||||
<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>
|
||||||
}
|
<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>
|
||||||
</View>
|
</>);
|
||||||
</>);
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps part of the Redux store to the props of this component.
|
* Maps part of the Redux store to the props of this component.
|
||||||
|
|
|
@ -203,5 +203,9 @@ export default {
|
||||||
color: BaseTheme.palette.text01,
|
color: BaseTheme.palette.text01,
|
||||||
marginBottom: 32,
|
marginBottom: 32,
|
||||||
...BaseTheme.typography.bodyShortRegularLarge
|
...BaseTheme.typography.bodyShortRegularLarge
|
||||||
|
},
|
||||||
|
|
||||||
|
connectionIndicatorIcon: {
|
||||||
|
fontSize: 20
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -32,6 +32,11 @@ export type Props = {
|
||||||
*/
|
*/
|
||||||
participantId: string,
|
participantId: string,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom icon style.
|
||||||
|
*/
|
||||||
|
iconStyle?: Object,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The source name of the track.
|
* The source name of the track.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -58,7 +58,7 @@ class ConnectionIndicator extends AbstractConnectionIndicator<Props, State> {
|
||||||
}}>
|
}}>
|
||||||
<BaseIndicator
|
<BaseIndicator
|
||||||
icon = { IconConnectionActive }
|
icon = { IconConnectionActive }
|
||||||
iconStyle = { iconStyle } />
|
iconStyle = { this.props.iconStyle || iconStyle } />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,10 @@ export const presentationScreenOptions = {
|
||||||
/**
|
/**
|
||||||
* Screen options for car mode.
|
* Screen options for car mode.
|
||||||
*/
|
*/
|
||||||
export const carmodeScreenOptions = presentationScreenOptions;
|
export const carmodeScreenOptions = {
|
||||||
|
...presentationScreenOptions,
|
||||||
|
orientation: 'portrait'
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Screen options for chat.
|
* Screen options for chat.
|
||||||
|
|
Loading…
Reference in New Issue