File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class VideoContainer extends Component {
45
45
} }
46
46
disableMute = { this . props . users [ userId ] . disableMute }
47
47
muted = { this . props . users [ userId ] . muted }
48
+ mirror = { this . props . users [ userId ] . mirror }
48
49
/>
49
50
</ Col >
50
51
) ) }
@@ -81,7 +82,8 @@ function mapStateToProps (state, ownProps) {
81
82
streamUrl : state . user ? state . user . streamUrl : null ,
82
83
socketId : state . user . socket . id ,
83
84
muted : true ,
84
- disableMute : true
85
+ disableMute : true ,
86
+ mirror : true
85
87
}
86
88
}
87
89
}
Original file line number Diff line number Diff line change 1
1
.video {
2
2
width : 100% ;
3
+ }
4
+
5
+ .video-mirror {
3
6
-webkit-transform : scaleX (-1 );
4
7
transform : scaleX (-1 );
5
8
}
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class VideoPlayer extends Component {
58
58
</ div >
59
59
< video
60
60
poster = { getRandomAvatarUrl ( ) }
61
- className = 'video'
61
+ className = { `video ${ this . props . mirror ? 'video-mirror' : '' } ` }
62
62
ref = { el => { this . videoRef = el } }
63
63
muted = { this . props . muted }
64
64
onClick = { this . props . onClick }
@@ -94,7 +94,8 @@ VideoPlayer.propTypes = {
94
94
onLoadedMetadata : PropTypes . func ,
95
95
showDebugInfo : PropTypes . bool ,
96
96
metadata : PropTypes . any ,
97
- disableMute : PropTypes . bool
97
+ disableMute : PropTypes . bool ,
98
+ mirror : PropTypes . bool
98
99
}
99
100
100
101
VideoPlayer . defaultProps = {
@@ -104,7 +105,8 @@ VideoPlayer.defaultProps = {
104
105
autoPlay : true ,
105
106
muted : false ,
106
107
showDebugInfo : false ,
107
- disableMute : false
108
+ disableMute : false ,
109
+ mirror : false
108
110
}
109
111
110
112
export default VideoPlayer
You can’t perform that action at this time.
0 commit comments