Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to support transfer #247

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
3 changes: 1 addition & 2 deletions Project/src/MakeCall/AudioEffects/AudioEffectsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const LoadingSpinner = () => {
export default class AudioEffectsContainer extends React.Component {
constructor(props) {
super(props);
this.call = props.call;
this.deviceManager = props.deviceManager;
this.localAudioStreamFeatureApi = null;
this.localAudioStream = null;
Expand Down Expand Up @@ -68,7 +67,7 @@ export default class AudioEffectsContainer extends React.Component {
}

initLocalAudioStreamFeatureApi() {
const localAudioStream = this.call.localAudioStreams.find(a => {
const localAudioStream = this.props.call.localAudioStreams.find(a => {
return a.mediaStreamType === 'Audio';
});

Expand Down
327 changes: 207 additions & 120 deletions Project/src/MakeCall/CallCard.js

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions Project/src/MakeCall/CallSurvey.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { TextField } from 'office-ui-fabric-react';
export default class CallSurvey extends React.Component {
constructor(props) {
super(props);
this.call = props.call;
this.state = {
overallIssue: '',
overallRating: 0,
Expand Down Expand Up @@ -85,7 +84,7 @@ export default class CallSurvey extends React.Component {
if (this.state.screenShareRating !== 0) rating.screenshareRating = { score: this.state.screenShareRating };
if (this.state.screenShareIssue) rating.screenshareRating.issues = [this.state.screenShareIssue];

this.call.feature(Features.CallSurvey).submitSurvey(rating).then((res) => {
this.props.call.feature(Features.CallSurvey).submitSurvey(rating).then((res) => {
if (this.appInsights && this.state.improvementSuggestion !== '') {
this.appInsights.trackEvent({
name: "CallSurvey", properties: {
Expand Down
20 changes: 16 additions & 4 deletions Project/src/MakeCall/IncomingCallCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,37 @@ export default class IncomingCallCard extends React.Component {
<div className="ms-Grid-row text-center">
<span className="incoming-call-button"
title={'Answer call with microphone unmuted and video off'}
onClick={async () => this.incomingCall.accept(await this.acceptCallMicrophoneUnmutedVideoOff())}>
onClick={async () => {
this.incomingCall.accept(await this.acceptCallMicrophoneUnmutedVideoOff());
this.props.onReject();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we calling onReject here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took this part from another PR that had some initial scaffolding, I'm not sure why. It seems to work as intended. Will ask original author

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reject here is a hack, we shall fix it properly by cleaning up old call/state and adding the new one

}}>
<Icon iconName="Microphone"/>
<Icon iconName="VideoOff"/>
</span>
<span className="incoming-call-button"
title={'Answer call with microphone unmuted and video on'}
onClick={async () => this.incomingCall.accept(await this.acceptCallMicrophoneUnmutedVideoOn())}>
onClick={async () => {
this.incomingCall.accept(await this.acceptCallMicrophoneUnmutedVideoOn());
this.props.onReject();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

}}>
<Icon iconName="Microphone"/>
<Icon iconName="Video"/>
</span>
<span className="incoming-call-button"
title={'Answer call with microphone muted and video on'}
onClick={async () => this.incomingCall.accept(await this.acceptCallMicrophoneMutedVideoOn())}>
onClick={async () => {
this.incomingCall.accept(await this.acceptCallMicrophoneMutedVideoOn());
this.props.onReject();
}}>
<Icon iconName="MicOff"/>
<Icon iconName="Video"/>
</span>
<span className="incoming-call-button"
title={'Answer call with microphone muted and video off'}
onClick={async () => this.incomingCall.accept(await this.acceptCallMicrophoneMutedVideoOff())}>
onClick={async () => {
this.incomingCall.accept(await this.acceptCallMicrophoneMutedVideoOff());
this.props.onReject();
}}>
<Icon iconName="MicOff"/>
<Icon iconName="VideoOff"/>
</span>
Expand Down
3 changes: 1 addition & 2 deletions Project/src/MakeCall/Lobby.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { Features } from '@azure/communication-calling';
export default class Lobby extends React.Component {
constructor(props) {
super(props);
this.call = props.call;
this.lobby = this.call.lobby;
this.lobby = this.props.call.lobby;
this.capabilitiesFeature = props.capabilitiesFeature;
this.capabilities = this.capabilitiesFeature.capabilities;
this.state = {
Expand Down
Loading
Loading