Merge pull request #5529 from SimonBrandner/hide-local-feed
Hide local video if it is muted
This commit is contained in:
commit
4920614ca5
1 changed files with 5 additions and 1 deletions
|
@ -494,6 +494,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.call.type === CallType.Video) {
|
if (this.props.call.type === CallType.Video) {
|
||||||
|
let localVideoFeed = null;
|
||||||
let onHoldContent = null;
|
let onHoldContent = null;
|
||||||
let onHoldBackground = null;
|
let onHoldBackground = null;
|
||||||
const backgroundStyle: CSSProperties = {};
|
const backgroundStyle: CSSProperties = {};
|
||||||
|
@ -512,6 +513,9 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
backgroundStyle.backgroundImage = 'url(' + backgroundAvatarUrl + ')';
|
backgroundStyle.backgroundImage = 'url(' + backgroundAvatarUrl + ')';
|
||||||
onHoldBackground = <div className="mx_CallView_video_holdBackground" style={backgroundStyle} />;
|
onHoldBackground = <div className="mx_CallView_video_holdBackground" style={backgroundStyle} />;
|
||||||
}
|
}
|
||||||
|
if (!this.state.vidMuted) {
|
||||||
|
localVideoFeed = <VideoFeed type={VideoFeedType.Local} call={this.props.call} />;
|
||||||
|
}
|
||||||
|
|
||||||
// if we're fullscreen, we don't want to set a maxHeight on the video element.
|
// if we're fullscreen, we don't want to set a maxHeight on the video element.
|
||||||
const maxVideoHeight = getFullScreenElement() ? null : (
|
const maxVideoHeight = getFullScreenElement() ? null : (
|
||||||
|
@ -527,7 +531,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
<VideoFeed type={VideoFeedType.Remote} call={this.props.call} onResize={this.props.onResize}
|
<VideoFeed type={VideoFeedType.Remote} call={this.props.call} onResize={this.props.onResize}
|
||||||
maxHeight={maxVideoHeight}
|
maxHeight={maxVideoHeight}
|
||||||
/>
|
/>
|
||||||
<VideoFeed type={VideoFeedType.Local} call={this.props.call} />
|
{localVideoFeed}
|
||||||
{onHoldContent}
|
{onHoldContent}
|
||||||
{callControls}
|
{callControls}
|
||||||
</div>;
|
</div>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue