Skip to content

Commit 37b3c8d

Browse files
Update the Sample app to provide consent if required for recording and transcription (#246)
1 parent 5232e7b commit 37b3c8d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

Project/src/MakeCall/CallCard.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,20 @@ export default class CallCard extends React.Component {
10521052
console.log(`meetingAudioConferenceDetails MessageBarText = ${messageBarText}`)
10531053
this.setState({ callMessage: messageBarText })
10541054
},
1055+
consentToBeingRecorded: async () => {
1056+
try {
1057+
this.recordingFeature.consentToBeingRecordedAndTranscribed();
1058+
} catch(e) {
1059+
console.error(e);
1060+
}
1061+
},
1062+
consentToBringTranscribed: async () => {
1063+
try {
1064+
this.transcriptionFeature.consentToBeingRecordedAndTranscribed();
1065+
} catch(e) {
1066+
console.error(e);
1067+
}
1068+
},
10551069
}
10561070
}
10571071

@@ -1107,6 +1121,31 @@ export default class CallCard extends React.Component {
11071121
onClick: (e) => menuCallBacks.stopSpotlight(this.identifier, e)
11081122
});
11091123

1124+
this.recordingFeature.isConsentRequired && this.state.isRecordingActive &&
1125+
menuItems.push({
1126+
key: 'Provide consent to be Recorded',
1127+
text: 'Provide consent to be Recorded',
1128+
iconProps: { iconName: 'ReminderPerson'},
1129+
onClick: (e) => menuCallBacks.consentToBeingRecorded(e)
1130+
});
1131+
1132+
this.transcriptionFeature.isConsentRequired && this.state.isTranscriptionActive && menuItems.push({
1133+
key: 'Provide consent to be Transcribed',
1134+
text: 'Provide consent to be Transcribed',
1135+
iconProps: { iconName: 'ReminderPerson'},
1136+
onClick: (e) => menuCallBacks.consentToBeingTranscribed(this.identifier, e)
1137+
});
1138+
1139+
// Proactively provide consent for recording and transcription in the call if it is required
1140+
!this.state.isRecordingActive && !this.state.isTranscriptionActive &&
1141+
this.recordingFeature.isConsentRequired && this.transcriptionFeature.isConsentRequired &&
1142+
menuItems.push({
1143+
key: 'Provide consent to being Recorded and Transcribed',
1144+
text: 'Provide consent to being Recorded and Transcribed',
1145+
iconProps: { iconName: 'ReminderPerson'},
1146+
onClick: (e) => menuCallBacks.consentToBeingRecorded(e)
1147+
});
1148+
11101149
return menuItems.filter(item => item != 0)
11111150
}
11121151

0 commit comments

Comments
 (0)