use of com.fanap.podchat.chat.MainThreadExecutor in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method onCallParticipantStoppedScreenSharing.
@Override
public void onCallParticipantStoppedScreenSharing(ChatResponse<ScreenShareResult> response) {
if (cpvManager != null) {
MainThreadExecutor exec = new MainThreadExecutor();
exec.execute(() -> cpvManager.releaseScreenShareView());
} else
view.onCallParticipantStoppedScreenSharing();
}
use of com.fanap.podchat.chat.MainThreadExecutor in project pod-chat-android-sdk by FanapSoft.
the class CallPresenter method onCallParticipantStartedVideo.
@Override
public void onCallParticipantStartedVideo(ChatResponse<JoinCallParticipantResult> response) {
try {
if (cpvManager != null) {
CallParticipantVO callParticipant = response.getResult().getJoinedParticipants().get(0);
new MainThreadExecutor().execute(() -> {
try {
Objects.requireNonNull(cpvManager.getPartnerAssignedView(callParticipant.getUserId())).setVisibility(View.VISIBLE);
cpvManager.showPartnerName(callParticipant.getUserId(), callParticipant.getParticipantVO().getName());
} catch (Exception e) {
e.printStackTrace();
}
});
}
view.showMessage(response.getResult().getJoinedParticipants().get(0).getParticipantVO().getName() + " الان تصویر داره!");
} catch (Exception e) {
view.onError(e.getMessage());
}
}
Aggregations