You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Show screensharign button only if connected
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -506,10 +506,14 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||
/> : null;
|
||||
|
||||
let screensharingButton;
|
||||
// Screensharing is possible, if we can send a second stream and identify
|
||||
// it using SDPStreamMetadata or if we can replace the already existing
|
||||
// usermedia track by a screensharing track
|
||||
if (this.props.call.opponentSupportsSDPStreamMetadata() || this.props.call.type === CallType.Video) {
|
||||
// Screensharing is possible, if we can send a second stream and
|
||||
// identify it using SDPStreamMetadata or if we can replace the already
|
||||
// existing usermedia track by a screensharing track. We also need to be
|
||||
// connected to know the state of the other side
|
||||
if (
|
||||
(this.props.call.opponentSupportsSDPStreamMetadata() || this.props.call.type === CallType.Video) &&
|
||||
this.props.call.state === CallState.Connected
|
||||
) {
|
||||
screensharingButton = (
|
||||
<AccessibleButton
|
||||
className={screensharingClasses}
|
||||
|
||||
Reference in New Issue
Block a user