Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Project/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ input:disabled {
height: 30px;
animation: spin 1.5s linear infinite;
}
.graybutton {
disabled: true;
}

@keyframes spin {
0% {
Expand Down Expand Up @@ -371,6 +374,12 @@ div.ms-Checkbox>input[type="checkbox"]+label.ms-Checkbox-label>span.ms-Checkbox-
display: inline;
}

.in-call-button.disabled {
cursor: not-allowed !important;
pointer-events: none !important;
color: gray
}

.in-call-button:hover,
.incoming-call-button:hover {
cursor: pointer;
Expand Down
13 changes: 8 additions & 5 deletions Project/src/MakeCall/CallCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,9 @@ export default class CallCard extends React.Component {
if (!this.call.isMuted) {
await this.call.mute();
} else {
await this.call.unmute();
if (this.state.canUnMuteMic) {
await this.call.unmute();
}
}
this.setState({ micMuted: this.call.isMuted });
} catch (e) {
Expand Down Expand Up @@ -1084,8 +1086,8 @@ export default class CallCard extends React.Component {
</div>
<div className="ms-Grid-row">
<div className="text-center">
<span className="in-call-button"
title={`Turn your video ${this.state.videoOn ? 'off' : 'on'}`}
<span className={`in-call-button ${!this.state.canOnVideo ? `disabled` : ``}`}
title={!this.state.canOnVideo ? `No permission to turn on video` : `Turn your video ${this.state.videoOn ? 'off' : 'on'}`}
variant="secondary"
onClick={() => this.handleVideoOnOff()}>
{
Expand All @@ -1097,9 +1099,10 @@ export default class CallCard extends React.Component {
<Icon iconName="VideoOff" />
}
</span>
<span className="in-call-button"
title={`${this.state.micMuted ? 'Unmute' : 'Mute'} your microphone`}
<span className={`in-call-button ${!this.state.canUnMuteMic ? `disabled` : ``}`}
title={!this.state.canUnMuteMic ? `No permission to unmute mic` : `${this.state.micMuted ? 'Unmute' : 'Mute'} your microphone`}
variant="secondary"
disabled="true"
onClick={() => this.handleMicOnOff()}>
{
this.state.canUnMuteMic && !this.state.micMuted &&
Expand Down