Skip to content

Commit

Permalink
会议互动者已满时,提示是否以观众模式入会
Browse files Browse the repository at this point in the history
  • Loading branch information
imndx committed Mar 7, 2023
1 parent e878d7d commit df9c6ee
Showing 1 changed file with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,25 @@ public void didCallEndWithReason(AVEngineKit.CallEndReason callEndReason) {
finish();
}
} else if (callEndReason == AVEngineKit.CallEndReason.RoomParticipantsFull) {
AVEngineKit.CallSession newSession = AVEngineKit.Instance().joinConference(callId, audioOnly, pin, host, title, desc, audience, advanced, false, false, this);
if (newSession == null) {
Toast.makeText(this, "加入会议失败", Toast.LENGTH_SHORT).show();
finish();
} else {
newSession.setCallback(ConferenceActivity.this);
}
new MaterialDialog.Builder(this)
.content("互动者已满,是否已观众模式加入会议")
.negativeText("否")
.positiveText("是")
.onPositive((dialog, which) -> {
finish();
new Handler().postDelayed(() -> {
AVEngineKit.CallSession newSession = AVEngineKit.Instance().joinConference(callId, audioOnly, pin, host, title, desc, true, advanced, false, false, this);
if (newSession == null) {
Toast.makeText(this, "加入会议失败", Toast.LENGTH_SHORT).show();
finish();
} else {
Intent intent = new Intent(getApplicationContext(), ConferenceActivity.class);
startActivity(intent);
}
}, 800);
})
.onNegative((dialog, which) -> finish())
.show();
} else if (!isFinishing()) {
ConferenceManager.getManager().addHistory(conferenceInfo, System.currentTimeMillis() - session.getStartTime());
finish();
Expand Down

0 comments on commit df9c6ee

Please sign in to comment.