;
}
@@ -362,24 +443,66 @@ export default class CallView extends React.Component {
// for voice calls (fills the bg)
let contentView: React.ReactNode;
+ const isOnHold = this.state.isLocalOnHold || this.state.isRemoteOnHold;
+ let onHoldText = null;
+ if (this.state.isRemoteOnHold) {
+ onHoldText = _t("You held the call Resume", {}, {
+ a: sub =>
+ {sub}
+ ,
+ });
+ } else if (this.state.isLocalOnHold) {
+ onHoldText = _t("%(peerName)s held the call", {
+ peerName: this.state.call.getOpponentMember().name,
+ });
+ }
+
if (this.state.call.type === CallType.Video) {
+ let onHoldContent = null;
+ let onHoldBackground = null;
+ const backgroundStyle: CSSProperties = {};
+ const containerClasses = classNames({
+ mx_CallView_video: true,
+ mx_CallView_video_hold: isOnHold,
+ });
+ if (isOnHold) {
+ onHoldContent =
+ {onHoldText}
+
;
+ const backgroundAvatarUrl = avatarUrlForMember(
+ // is it worth getting the size of the div to pass here?
+ this.state.call.getOpponentMember(), 1024, 1024, 'crop',
+ );
+ backgroundStyle.backgroundImage = 'url(' + backgroundAvatarUrl + ')';
+ onHoldBackground = ;
+ }
+
// if we're fullscreen, we don't want to set a maxHeight on the video element.
const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight - HEADER_HEIGHT;
- contentView =
;
}
}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 0d50128f32..de1c20be1b 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -836,6 +836,8 @@
"When rooms are upgraded": "When rooms are upgraded",
"My Ban List": "My Ban List",
"This is your list of users/servers you have blocked - don't leave the room!": "This is your list of users/servers you have blocked - don't leave the room!",
+ "You held the call Resume": "You held the call Resume",
+ "%(peerName)s held the call": "%(peerName)s held the call",
"Video Call": "Video Call",
"Voice Call": "Voice Call",
"Fill Screen": "Fill Screen",
@@ -2231,6 +2233,8 @@
"Warning: You should only set up key backup from a trusted computer.": "Warning: You should only set up key backup from a trusted computer.",
"Access your secure message history and set up secure messaging by entering your recovery key.": "Access your secure message history and set up secure messaging by entering your recovery key.",
"If you've forgotten your recovery key you can ": "If you've forgotten your recovery key you can ",
+ "Resume": "Resume",
+ "Hold": "Hold",
"Reject invitation": "Reject invitation",
"Are you sure you want to reject the invitation?": "Are you sure you want to reject the invitation?",
"Unable to reject invite": "Unable to reject invite",