Only show toast about camera in video calls
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
37335b2c79
commit
6429b3c8bd
1 changed files with 5 additions and 4 deletions
|
@ -593,6 +593,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
const someoneIsScreensharing = this.props.call.getFeeds().some((feed) => {
|
const someoneIsScreensharing = this.props.call.getFeeds().some((feed) => {
|
||||||
return feed.purpose === SDPStreamMetadataPurpose.Screenshare;
|
return feed.purpose === SDPStreamMetadataPurpose.Screenshare;
|
||||||
});
|
});
|
||||||
|
const isVideoCall = this.props.call.type = CallType.Video;
|
||||||
|
|
||||||
let contentView: React.ReactNode;
|
let contentView: React.ReactNode;
|
||||||
let holdTransferContent;
|
let holdTransferContent;
|
||||||
|
@ -646,7 +647,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
if (
|
if (
|
||||||
(!isOnHold && !transfereeCall) &&
|
(!isOnHold && !transfereeCall) &&
|
||||||
(
|
(
|
||||||
(sidebarShown && this.props.call.type === CallType.Video) ||
|
(sidebarShown && isVideoCall) ||
|
||||||
(someoneIsScreensharing && sidebarShown) ||
|
(someoneIsScreensharing && sidebarShown) ||
|
||||||
isScreensharing
|
isScreensharing
|
||||||
)
|
)
|
||||||
|
@ -663,7 +664,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
// This is a bit messy. I can't see a reason to have two onHold/transfer screens
|
// This is a bit messy. I can't see a reason to have two onHold/transfer screens
|
||||||
if (isOnHold || transfereeCall) {
|
if (isOnHold || transfereeCall) {
|
||||||
if (this.props.call.type === CallType.Video) {
|
if (isVideoCall) {
|
||||||
const containerClasses = classNames({
|
const containerClasses = classNames({
|
||||||
mx_CallView_content: true,
|
mx_CallView_content: true,
|
||||||
mx_CallView_video: true,
|
mx_CallView_video: true,
|
||||||
|
@ -761,7 +762,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
let text = isScreensharing
|
let text = isScreensharing
|
||||||
? _t("You are presenting")
|
? _t("You are presenting")
|
||||||
: _t('%(sharerName)s is presenting', { sharerName });
|
: _t('%(sharerName)s is presenting', { sharerName });
|
||||||
if (!this.state.sidebarShown) {
|
if (!this.state.sidebarShown && isVideoCall) {
|
||||||
text += " • " + (this.props.call.isLocalVideoMuted()
|
text += " • " + (this.props.call.isLocalVideoMuted()
|
||||||
? _t("Your camera is turned off")
|
? _t("Your camera is turned off")
|
||||||
: _t("Your camera is still enabled"));
|
: _t("Your camera is still enabled"));
|
||||||
|
@ -794,7 +795,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const callTypeText = this.props.call.type === CallType.Video ? _t("Video Call") : _t("Voice Call");
|
const callTypeText = isVideoCall ? _t("Video Call") : _t("Voice Call");
|
||||||
let myClassName;
|
let myClassName;
|
||||||
|
|
||||||
let fullScreenButton;
|
let fullScreenButton;
|
||||||
|
|
Loading…
Reference in a new issue