Add option to mirror local video feed

This commit is contained in:
Luke Barnard 2017-10-25 18:17:33 +01:00
parent 4cfbd66729
commit 3ae97348f8
3 changed files with 12 additions and 2 deletions

View file

@ -18,10 +18,13 @@ limitations under the License.
import React from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import sdk from '../../../index';
import dis from '../../../dispatcher';
import UserSettingsStore from '../../../UserSettingsStore';
module.exports = React.createClass({
displayName: 'VideoView',
@ -108,14 +111,16 @@ module.exports = React.createClass({
document.mozFullScreenElement ||
document.webkitFullscreenElement);
const maxVideoHeight = fullscreenElement ? null : this.props.maxHeight;
const localVideoFeedClasses = classNames("mx_VideoView_localVideoFeed",
{"mx_VideoView_localVideoFeed_flipped": UserSettingsStore.getSyncedSetting}
);
return (
<div className="mx_VideoView" ref={this.setContainer} onClick={this.props.onClick}>
<div className="mx_VideoView_remoteVideoFeed">
<VideoFeed ref="remote" onResize={this.props.onResize}
maxHeight={maxVideoHeight} />
</div>
<div className="mx_VideoView_localVideoFeed">
<div className={localVideoFeedClasses}>
<VideoFeed ref="local" />
</div>
</div>