requestForTranscriptionState method
void
requestForTranscriptionState()
Implementation
void requestForTranscriptionState() {
if (_isRequestedForTranscription) return;
_isRequestedForTranscription = true;
if (meetingDetails.meetingBasicDetails?.transcriptionDetail != null) {
if (meetingDetails
.meetingBasicDetails?.transcriptionDetail?.transcriptionEnable ==
true) {
var data = meetingDetails.meetingBasicDetails?.transcriptionDetail;
isTranscriptionLanguageSelected = true;
transcriptionLanguageData = TranscriptionActionModel(
showIcon: data?.transcriptionEnable,
isLanguageSelected: data?.transcriptionEnable,
langCode: data?.transcriptionLangIso,
sourceLang: data?.transcriptionLangIso);
return;
}
}
// Skip the first participant (alias "you") and check the others
for (int i = 1; i < _participantTracks.length; i++) {
var participantTrack = _participantTracks[i];
var participant = participantTrack.participant;
if (!Utils.isHost(participant.metadata) &&
!Utils.isCoHost(participant.metadata)) {
// Send the action with the participant's ID (assuming `identity` is the ID)
sendPrivateAction(
ActionModel(action: MeetingActions.requestLiveCaptionDrawerState),
participant.identity, // Using participant's identity (ID)
);
break; // Exit after sending the action to the first valid participant
}
}
}