2020-07-07 00:42:46 +03:00
|
|
|
/*
|
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
|
|
|
Copyright 2019, 2020 The Matrix.org Foundation C.I.C.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
2020-07-07 17:11:08 +03:00
|
|
|
|
2020-10-29 20:56:24 +03:00
|
|
|
import React, { createRef } from 'react';
|
2020-07-07 00:42:46 +03:00
|
|
|
import Room from 'matrix-js-sdk/src/models/room';
|
|
|
|
import dis from '../../../dispatcher/dispatcher';
|
|
|
|
import CallHandler from '../../../CallHandler';
|
|
|
|
import {MatrixClientPeg} from '../../../MatrixClientPeg';
|
|
|
|
import { _t } from '../../../languageHandler';
|
2020-10-29 20:56:24 +03:00
|
|
|
import VideoFeed, { VideoFeedType } from "./VideoFeed";
|
2020-07-07 00:42:46 +03:00
|
|
|
import RoomAvatar from "../avatars/RoomAvatar";
|
2020-10-29 20:56:24 +03:00
|
|
|
import { CallState, CallType, MatrixCall } from 'matrix-js-sdk/src/webrtc/call';
|
|
|
|
import { CallEvent } from 'matrix-js-sdk/src/webrtc/call';
|
2020-11-18 17:22:38 +03:00
|
|
|
import classNames from 'classnames';
|
|
|
|
import AccessibleButton from '../elements/AccessibleButton';
|
2020-11-19 18:15:31 +03:00
|
|
|
import {isOnlyCtrlOrCmdKeyEvent, Key} from '../../../Keyboard';
|
2020-07-07 00:42:46 +03:00
|
|
|
|
|
|
|
interface IProps {
|
|
|
|
// js-sdk room object. If set, we will only show calls for the given
|
|
|
|
// room; if not, we will show any active call.
|
2020-07-07 17:40:05 +03:00
|
|
|
room?: Room;
|
2020-07-07 00:42:46 +03:00
|
|
|
|
|
|
|
// maxHeight style attribute for the video panel
|
2020-07-07 17:40:05 +03:00
|
|
|
maxVideoHeight?: number;
|
2020-07-07 00:42:46 +03:00
|
|
|
|
|
|
|
// a callback which is called when the user clicks on the video div
|
2020-07-07 17:40:05 +03:00
|
|
|
onClick?: React.MouseEventHandler;
|
2020-07-07 00:42:46 +03:00
|
|
|
|
|
|
|
// a callback which is called when the content in the callview changes
|
|
|
|
// in a way that is likely to cause a resize.
|
2020-07-07 17:40:05 +03:00
|
|
|
onResize?: any;
|
2020-07-07 00:42:46 +03:00
|
|
|
|
|
|
|
// Whether to show the hang up icon:W
|
2020-07-07 17:40:05 +03:00
|
|
|
showHangup?: boolean;
|
2020-07-07 00:42:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
interface IState {
|
2020-10-29 20:56:24 +03:00
|
|
|
call: MatrixCall;
|
|
|
|
isLocalOnHold: boolean,
|
2020-11-18 17:22:38 +03:00
|
|
|
micMuted: boolean,
|
|
|
|
vidMuted: boolean,
|
|
|
|
callState: CallState,
|
|
|
|
controlsVisible: boolean,
|
2020-10-29 20:56:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
function getFullScreenElement() {
|
|
|
|
return (
|
|
|
|
document.fullscreenElement ||
|
|
|
|
// moz omitted because firefox supports this unprefixed now (webkit here for safari)
|
|
|
|
document.webkitFullscreenElement ||
|
|
|
|
document.msFullscreenElement
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
function requestFullscreen(element: Element) {
|
|
|
|
const method = (
|
|
|
|
element.requestFullscreen ||
|
|
|
|
// moz omitted since firefox supports unprefixed now
|
|
|
|
element.webkitRequestFullScreen ||
|
|
|
|
element.msRequestFullscreen
|
|
|
|
);
|
|
|
|
if (method) method.call(element);
|
|
|
|
}
|
|
|
|
|
|
|
|
function exitFullscreen() {
|
|
|
|
const exitMethod = (
|
|
|
|
document.exitFullscreen ||
|
|
|
|
document.webkitExitFullscreen ||
|
|
|
|
document.msExitFullscreen
|
|
|
|
);
|
|
|
|
if (exitMethod) exitMethod.call(document);
|
2020-07-07 00:42:46 +03:00
|
|
|
}
|
|
|
|
|
2020-11-18 17:22:38 +03:00
|
|
|
const CONTROLS_HIDE_DELAY = 1000;
|
|
|
|
|
2020-07-07 00:42:46 +03:00
|
|
|
export default class CallView extends React.Component<IProps, IState> {
|
|
|
|
private dispatcherRef: string;
|
2020-11-12 21:09:56 +03:00
|
|
|
private contentRef = createRef<HTMLDivElement>();
|
2020-11-18 17:22:38 +03:00
|
|
|
private controlsHideTimer: number = null;
|
2020-07-07 00:42:46 +03:00
|
|
|
constructor(props: IProps) {
|
|
|
|
super(props);
|
|
|
|
|
2020-10-29 20:56:24 +03:00
|
|
|
const call = this.getCall();
|
2020-07-07 00:42:46 +03:00
|
|
|
this.state = {
|
2020-10-29 20:56:24 +03:00
|
|
|
call,
|
|
|
|
isLocalOnHold: call ? call.isLocalOnHold() : null,
|
2020-11-18 17:22:38 +03:00
|
|
|
micMuted: call ? call.isMicrophoneMuted() : null,
|
|
|
|
vidMuted: call ? call.isLocalVideoMuted() : null,
|
|
|
|
callState: call ? call.state : null,
|
|
|
|
controlsVisible: true,
|
2020-10-29 20:56:24 +03:00
|
|
|
}
|
2020-07-07 00:42:46 +03:00
|
|
|
|
2020-10-29 20:56:24 +03:00
|
|
|
this.updateCallListeners(null, call);
|
2020-07-07 00:42:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public componentDidMount() {
|
|
|
|
this.dispatcherRef = dis.register(this.onAction);
|
2020-11-19 18:15:31 +03:00
|
|
|
document.addEventListener('keydown', this.onNativeKeyDown);
|
2020-07-07 00:42:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
public componentWillUnmount() {
|
2020-11-19 18:15:31 +03:00
|
|
|
document.removeEventListener("keydown", this.onNativeKeyDown);
|
2020-10-29 20:56:24 +03:00
|
|
|
this.updateCallListeners(this.state.call, null);
|
2020-07-07 00:42:46 +03:00
|
|
|
dis.unregister(this.dispatcherRef);
|
|
|
|
}
|
|
|
|
|
|
|
|
private onAction = (payload) => {
|
2020-10-29 20:56:24 +03:00
|
|
|
switch (payload.action) {
|
|
|
|
case 'video_fullscreen': {
|
2020-11-12 21:09:56 +03:00
|
|
|
if (!this.contentRef.current) {
|
2020-10-29 20:56:24 +03:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (payload.fullscreen) {
|
2020-11-12 21:09:56 +03:00
|
|
|
requestFullscreen(this.contentRef.current);
|
2020-10-29 20:56:24 +03:00
|
|
|
} else if (getFullScreenElement()) {
|
|
|
|
exitFullscreen();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'call_state': {
|
|
|
|
const newCall = this.getCall();
|
|
|
|
if (newCall !== this.state.call) {
|
|
|
|
this.updateCallListeners(this.state.call, newCall);
|
2020-11-18 17:22:38 +03:00
|
|
|
let newControlsVisible = this.state.controlsVisible;
|
|
|
|
if (newCall && !this.state.call) {
|
|
|
|
newControlsVisible = true;
|
|
|
|
if (this.controlsHideTimer !== null) {
|
|
|
|
clearTimeout(this.controlsHideTimer);
|
|
|
|
}
|
|
|
|
this.controlsHideTimer = window.setTimeout(this.onControlsHideTimer, CONTROLS_HIDE_DELAY);
|
|
|
|
}
|
2020-10-29 20:56:24 +03:00
|
|
|
this.setState({
|
|
|
|
call: newCall,
|
|
|
|
isLocalOnHold: newCall ? newCall.isLocalOnHold() : null,
|
2020-11-18 17:22:38 +03:00
|
|
|
micMuted: newCall ? newCall.isMicrophoneMuted() : null,
|
|
|
|
vidMuted: newCall ? newCall.isLocalVideoMuted() : null,
|
|
|
|
callState: newCall ? newCall.state : null,
|
|
|
|
controlsVisible: newControlsVisible,
|
2020-10-29 20:56:24 +03:00
|
|
|
});
|
|
|
|
}
|
|
|
|
if (!newCall && getFullScreenElement()) {
|
|
|
|
exitFullscreen();
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2020-07-07 00:42:46 +03:00
|
|
|
}
|
2020-07-07 17:40:05 +03:00
|
|
|
};
|
2020-07-07 00:42:46 +03:00
|
|
|
|
2020-10-29 20:56:24 +03:00
|
|
|
private getCall(): MatrixCall {
|
2020-10-09 20:56:07 +03:00
|
|
|
let call: MatrixCall;
|
2020-07-07 00:42:46 +03:00
|
|
|
|
|
|
|
if (this.props.room) {
|
|
|
|
const roomId = this.props.room.roomId;
|
2020-09-24 18:16:20 +03:00
|
|
|
call = CallHandler.sharedInstance().getCallForRoom(roomId);
|
2020-07-07 00:42:46 +03:00
|
|
|
} else {
|
2020-09-24 18:16:20 +03:00
|
|
|
call = CallHandler.sharedInstance().getAnyActiveCall();
|
2020-07-07 00:42:46 +03:00
|
|
|
// Ignore calls if we can't get the room associated with them.
|
|
|
|
// I think the underlying problem is that the js-sdk sends events
|
|
|
|
// for calls before it has made the rooms available in the store,
|
|
|
|
// although this isn't confirmed.
|
|
|
|
if (MatrixClientPeg.get().getRoom(call.roomId) === null) {
|
|
|
|
call = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-12 21:09:56 +03:00
|
|
|
if (call && [CallState.Ended, CallState.Ringing].includes(call.state)) return null;
|
2020-10-29 20:56:24 +03:00
|
|
|
return call;
|
|
|
|
}
|
2020-09-24 18:16:20 +03:00
|
|
|
|
2020-10-29 20:56:24 +03:00
|
|
|
private updateCallListeners(oldCall: MatrixCall, newCall: MatrixCall) {
|
|
|
|
if (oldCall === newCall) return;
|
2020-07-07 00:42:46 +03:00
|
|
|
|
2020-10-29 20:56:24 +03:00
|
|
|
if (oldCall) oldCall.removeListener(CallEvent.HoldUnhold, this.onCallHoldUnhold);
|
|
|
|
if (newCall) newCall.on(CallEvent.HoldUnhold, this.onCallHoldUnhold);
|
2020-07-07 00:42:46 +03:00
|
|
|
}
|
|
|
|
|
2020-10-29 20:56:24 +03:00
|
|
|
private onCallHoldUnhold = () => {
|
|
|
|
this.setState({
|
|
|
|
isLocalOnHold: this.state.call ? this.state.call.isLocalOnHold() : null,
|
|
|
|
});
|
|
|
|
};
|
2020-07-07 00:42:46 +03:00
|
|
|
|
2020-11-12 21:09:56 +03:00
|
|
|
private onFullscreenClick = () => {
|
|
|
|
dis.dispatch({
|
|
|
|
action: 'video_fullscreen',
|
|
|
|
fullscreen: true,
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2020-11-19 19:36:23 +03:00
|
|
|
private onExpandClick = () => {
|
|
|
|
dis.dispatch({
|
|
|
|
action: 'view_room',
|
|
|
|
room_id: this.state.call.roomId,
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2020-11-19 18:15:31 +03:00
|
|
|
private onControlsHideTimer = () => {
|
2020-11-18 17:22:38 +03:00
|
|
|
this.controlsHideTimer = null;
|
|
|
|
this.setState({
|
|
|
|
controlsVisible: false,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-11-19 18:15:31 +03:00
|
|
|
private onMouseMove = () => {
|
|
|
|
this.showControls();
|
|
|
|
}
|
|
|
|
|
|
|
|
private showControls() {
|
2020-11-18 17:22:38 +03:00
|
|
|
if (!this.state.controlsVisible) {
|
|
|
|
this.setState({
|
|
|
|
controlsVisible: true,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
if (this.controlsHideTimer !== null) {
|
|
|
|
clearTimeout(this.controlsHideTimer);
|
|
|
|
}
|
|
|
|
this.controlsHideTimer = window.setTimeout(this.onControlsHideTimer, CONTROLS_HIDE_DELAY);
|
|
|
|
}
|
|
|
|
|
2020-11-19 18:15:31 +03:00
|
|
|
private onMicMuteClick = () => {
|
|
|
|
if (!this.state.call) return;
|
|
|
|
|
2020-11-18 17:22:38 +03:00
|
|
|
const newVal = !this.state.micMuted;
|
|
|
|
|
|
|
|
this.state.call.setMicrophoneMuted(newVal);
|
|
|
|
this.setState({micMuted: newVal});
|
|
|
|
}
|
|
|
|
|
2020-11-19 18:15:31 +03:00
|
|
|
private onVidMuteClick = () => {
|
|
|
|
if (!this.state.call) return;
|
|
|
|
|
2020-11-18 17:22:38 +03:00
|
|
|
const newVal = !this.state.vidMuted;
|
|
|
|
|
|
|
|
this.state.call.setLocalVideoMuted(newVal);
|
|
|
|
this.setState({vidMuted: newVal});
|
|
|
|
}
|
|
|
|
|
2020-11-19 18:15:31 +03:00
|
|
|
// we register global shortcuts here, they *must not conflict* with local shortcuts elsewhere or both will fire
|
|
|
|
// Note that this assumes we always have a callview on screen at any given time
|
|
|
|
// CallHandler would probably be a better place for this
|
|
|
|
private onNativeKeyDown = ev => {
|
|
|
|
let handled = false;
|
|
|
|
const ctrlCmdOnly = isOnlyCtrlOrCmdKeyEvent(ev);
|
|
|
|
|
|
|
|
switch (ev.key) {
|
|
|
|
case Key.D:
|
|
|
|
if (ctrlCmdOnly) {
|
|
|
|
this.onMicMuteClick();
|
|
|
|
// show the controls to give feedback
|
|
|
|
this.showControls();
|
|
|
|
handled = true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Key.E:
|
|
|
|
if (ctrlCmdOnly) {
|
|
|
|
this.onVidMuteClick();
|
|
|
|
// show the controls to give feedback
|
|
|
|
this.showControls();
|
|
|
|
handled = true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (handled) {
|
|
|
|
ev.stopPropagation();
|
|
|
|
ev.preventDefault();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
private onRoomAvatarClick = () => {
|
2020-11-18 17:22:38 +03:00
|
|
|
dis.dispatch({
|
|
|
|
action: 'view_room',
|
|
|
|
room_id: this.state.call.roomId,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-07-07 00:42:46 +03:00
|
|
|
public render() {
|
2020-11-12 21:09:56 +03:00
|
|
|
if (!this.state.call) return null;
|
2020-10-29 20:56:24 +03:00
|
|
|
|
2020-11-12 21:09:56 +03:00
|
|
|
const client = MatrixClientPeg.get();
|
|
|
|
const callRoom = client.getRoom(this.state.call.roomId);
|
|
|
|
|
2020-11-18 17:22:38 +03:00
|
|
|
let callControls;
|
|
|
|
if (this.props.room) {
|
|
|
|
const micClasses = classNames({
|
|
|
|
mx_CallView_callControls_button: true,
|
|
|
|
mx_CallView_callControls_button_micOn: !this.state.micMuted,
|
|
|
|
mx_CallView_callControls_button_micOff: this.state.micMuted,
|
|
|
|
});
|
|
|
|
|
|
|
|
const vidClasses = classNames({
|
|
|
|
mx_CallView_callControls_button: true,
|
|
|
|
mx_CallView_callControls_button_vidOn: !this.state.vidMuted,
|
|
|
|
mx_CallView_callControls_button_vidOff: this.state.vidMuted,
|
|
|
|
});
|
|
|
|
|
|
|
|
// Put the other states of the mic/video icons in the document to make sure they're cached
|
|
|
|
// (otherwise the icon disappears briefly when toggled)
|
|
|
|
const micCacheClasses = classNames({
|
|
|
|
mx_CallView_callControls_button: true,
|
|
|
|
mx_CallView_callControls_button_micOn: this.state.micMuted,
|
|
|
|
mx_CallView_callControls_button_micOff: !this.state.micMuted,
|
|
|
|
mx_CallView_callControls_button_invisible: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
const vidCacheClasses = classNames({
|
|
|
|
mx_CallView_callControls_button: true,
|
|
|
|
mx_CallView_callControls_button_vidOn: this.state.micMuted,
|
|
|
|
mx_CallView_callControls_button_vidOff: !this.state.micMuted,
|
|
|
|
mx_CallView_callControls_button_invisible: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
const callControlsClasses = classNames({
|
|
|
|
mx_CallView_callControls: true,
|
|
|
|
mx_CallView_callControls_hidden: !this.state.controlsVisible,
|
|
|
|
});
|
|
|
|
|
2020-11-19 18:15:31 +03:00
|
|
|
const vidMuteButton = this.state.call.type === CallType.Video ? <div
|
|
|
|
className={vidClasses}
|
|
|
|
onClick={this.onVidMuteClick}
|
|
|
|
/> : null;
|
|
|
|
|
2020-11-18 17:22:38 +03:00
|
|
|
callControls = <div className={callControlsClasses}>
|
|
|
|
<div
|
|
|
|
className={micClasses}
|
|
|
|
onClick={this.onMicMuteClick}
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
className="mx_CallView_callControls_button mx_CallView_callControls_button_hangup"
|
|
|
|
onClick={() => {
|
|
|
|
dis.dispatch({
|
|
|
|
action: 'hangup',
|
|
|
|
room_id: this.state.call.roomId,
|
|
|
|
});
|
|
|
|
}}
|
|
|
|
/>
|
2020-11-19 18:15:31 +03:00
|
|
|
{vidMuteButton}
|
|
|
|
<div className={micCacheClasses} />
|
|
|
|
<div className={vidCacheClasses} />
|
2020-11-18 17:22:38 +03:00
|
|
|
</div>;
|
|
|
|
}
|
2020-11-12 21:09:56 +03:00
|
|
|
|
|
|
|
// The 'content' for the call, ie. the videos for a video call and profile picture
|
|
|
|
// for voice calls (fills the bg)
|
|
|
|
let contentView: React.ReactNode;
|
|
|
|
|
|
|
|
if (this.state.call.type === CallType.Video) {
|
|
|
|
// if we're fullscreen, we don't want to set a maxHeight on the video element.
|
|
|
|
const maxVideoHeight = getFullScreenElement() ? null : this.props.maxVideoHeight;
|
2020-11-19 19:36:23 +03:00
|
|
|
contentView = <div className="mx_CallView_video" ref={this.contentRef} onMouseMove={this.onMouseMove}>
|
2020-11-12 21:09:56 +03:00
|
|
|
<VideoFeed type={VideoFeedType.Remote} call={this.state.call} onResize={this.props.onResize}
|
|
|
|
maxHeight={maxVideoHeight}
|
|
|
|
/>
|
|
|
|
<VideoFeed type={VideoFeedType.Local} call={this.state.call} />
|
2020-11-18 17:22:38 +03:00
|
|
|
{callControls}
|
2020-11-12 21:09:56 +03:00
|
|
|
</div>;
|
|
|
|
} else {
|
|
|
|
const avatarSize = this.props.room ? 200 : 75;
|
2020-11-18 17:22:38 +03:00
|
|
|
contentView = <div className="mx_CallView_voice" onMouseMove={this.onMouseMove}>
|
2020-11-12 21:09:56 +03:00
|
|
|
<RoomAvatar
|
|
|
|
room={callRoom}
|
|
|
|
height={avatarSize}
|
|
|
|
width={avatarSize}
|
|
|
|
/>
|
2020-11-18 17:22:38 +03:00
|
|
|
{callControls}
|
2020-11-12 21:09:56 +03:00
|
|
|
</div>;
|
|
|
|
}
|
|
|
|
|
|
|
|
const callTypeText = this.state.call.type === CallType.Video ? _t("Video Call") : _t("Voice Call");
|
|
|
|
let myClassName;
|
|
|
|
|
|
|
|
let fullScreenButton;
|
2020-11-19 19:36:23 +03:00
|
|
|
if (this.state.call.type === CallType.Video && this.props.room) {
|
|
|
|
fullScreenButton = <div className="mx_CallView_header_button mx_CallView_header_button_fullscreen"
|
2020-11-12 21:09:56 +03:00
|
|
|
onClick={this.onFullscreenClick} title={_t("Fill screen")}
|
|
|
|
/>;
|
|
|
|
}
|
|
|
|
|
2020-11-19 19:36:23 +03:00
|
|
|
let expandButton;
|
|
|
|
if (!this.props.room) {
|
|
|
|
expandButton = <div className="mx_CallView_header_button mx_CallView_header_button_expand"
|
|
|
|
onClick={this.onExpandClick} title={_t("Return to call")}
|
|
|
|
/>;
|
|
|
|
}
|
|
|
|
|
2020-11-12 21:09:56 +03:00
|
|
|
const headerControls = <div className="mx_CallView_header_controls">
|
|
|
|
{fullScreenButton}
|
2020-11-19 19:36:23 +03:00
|
|
|
{expandButton}
|
2020-11-12 21:09:56 +03:00
|
|
|
</div>;
|
|
|
|
|
|
|
|
let header: React.ReactNode;
|
|
|
|
if (this.props.room) {
|
|
|
|
header = <div className="mx_CallView_header">
|
|
|
|
<div className="mx_CallView_header_phoneIcon"></div>
|
|
|
|
<span className="mx_CallView_header_callType">{callTypeText}</span>
|
|
|
|
{headerControls}
|
|
|
|
</div>;
|
|
|
|
myClassName = 'mx_CallView_large';
|
|
|
|
} else {
|
|
|
|
header = <div className="mx_CallView_header">
|
2020-11-18 17:22:38 +03:00
|
|
|
<AccessibleButton onClick={this.onRoomAvatarClick}>
|
|
|
|
<RoomAvatar room={callRoom} height={32} width={32} />
|
|
|
|
</AccessibleButton>
|
2020-11-12 21:09:56 +03:00
|
|
|
<div>
|
|
|
|
<div className="mx_CallView_header_roomName">{callRoom.name}</div>
|
|
|
|
<div className="mx_CallView_header_callTypeSmall">{callTypeText}</div>
|
|
|
|
</div>
|
|
|
|
{headerControls}
|
|
|
|
</div>;
|
|
|
|
myClassName = 'mx_CallView_pip';
|
|
|
|
}
|
2020-07-07 00:42:46 +03:00
|
|
|
|
2020-11-12 21:09:56 +03:00
|
|
|
return <div className={"mx_CallView " + myClassName}>
|
|
|
|
{header}
|
|
|
|
{contentView}
|
2020-07-07 00:42:46 +03:00
|
|
|
</div>;
|
|
|
|
}
|
|
|
|
}
|