|
|
|
@ -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 |
|
|
|
|
}; |
|
|
|
|