fix(prejoin): Use localFlipX on prejoin screen

This commit is contained in:
Vlad Piersec 2021-03-16 15:45:23 +02:00 committed by Saúl Ibarra Corretgé
parent 79ab973694
commit bb19567efa
1 changed files with 9 additions and 2 deletions

View File

@ -8,6 +8,11 @@ import { getLocalVideoTrack } from '../../../tracks';
export type Props = {
/**
* Flag controlling whether the video should be flipped or not.
*/
flipVideo: boolean,
/**
* Flag signaling the visibility of camera preview.
*/
@ -26,13 +31,14 @@ export type Props = {
* @returns {ReactElement}
*/
function Preview(props: Props) {
const { videoMuted, videoTrack } = props;
const { videoMuted, videoTrack, flipVideo } = props;
const className = flipVideo ? 'flipVideoX' : '';
if (!videoMuted && videoTrack) {
return (
<div id = 'preview'>
<Video
className = 'flipVideoX'
className = { className }
videoTrack = {{ jitsiTrack: videoTrack }} />
</div>
);
@ -50,6 +56,7 @@ function Preview(props: Props) {
*/
function _mapStateToProps(state, ownProps) {
return {
flipVideo: state['features/base/settings'].localFlipX,
videoMuted: ownProps.videoTrack ? ownProps.videoMuted : state['features/base/media'].video.muted,
videoTrack: ownProps.videoTrack || (getLocalVideoTrack(state['features/base/tracks']) || {}).jitsiTrack
};