|
@@ -8,6 +8,11 @@ import { getLocalVideoTrack } from '../../../tracks';
|
8
|
8
|
|
9
|
9
|
export type Props = {
|
10
|
10
|
|
|
11
|
+ /**
|
|
12
|
+ * Flag controlling whether the video should be flipped or not.
|
|
13
|
+ */
|
|
14
|
+ flipVideo: boolean,
|
|
15
|
+
|
11
|
16
|
/**
|
12
|
17
|
* Flag signaling the visibility of camera preview.
|
13
|
18
|
*/
|
|
@@ -26,13 +31,14 @@ export type Props = {
|
26
|
31
|
* @returns {ReactElement}
|
27
|
32
|
*/
|
28
|
33
|
function Preview(props: Props) {
|
29
|
|
- const { videoMuted, videoTrack } = props;
|
|
34
|
+ const { videoMuted, videoTrack, flipVideo } = props;
|
|
35
|
+ const className = flipVideo ? 'flipVideoX' : '';
|
30
|
36
|
|
31
|
37
|
if (!videoMuted && videoTrack) {
|
32
|
38
|
return (
|
33
|
39
|
<div id = 'preview'>
|
34
|
40
|
<Video
|
35
|
|
- className = 'flipVideoX'
|
|
41
|
+ className = { className }
|
36
|
42
|
videoTrack = {{ jitsiTrack: videoTrack }} />
|
37
|
43
|
</div>
|
38
|
44
|
);
|
|
@@ -50,6 +56,7 @@ function Preview(props: Props) {
|
50
|
56
|
*/
|
51
|
57
|
function _mapStateToProps(state, ownProps) {
|
52
|
58
|
return {
|
|
59
|
+ flipVideo: state['features/base/settings'].localFlipX,
|
53
|
60
|
videoMuted: ownProps.videoTrack ? ownProps.videoMuted : state['features/base/media'].video.muted,
|
54
|
61
|
videoTrack: ownProps.videoTrack || (getLocalVideoTrack(state['features/base/tracks']) || {}).jitsiTrack
|
55
|
62
|
};
|