only show remote video when connected

This commit is contained in:
Daniel Gultsch 2020-04-16 11:02:42 +02:00
parent 0c4f0c074d
commit 21e412ef6f
2 changed files with 8 additions and 3 deletions

View file

@ -531,8 +531,13 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
if (remoteVideoTrack.isPresent()) {
ensureSurfaceViewRendererIsSetup(binding.remoteVideo);
remoteVideoTrack.get().addSink(binding.remoteVideo);
binding.appBarLayout.setVisibility(View.GONE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
if (state == RtpEndUserState.CONNECTED) {
binding.appBarLayout.setVisibility(View.GONE);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
binding.remoteVideo.setVisibility(View.GONE);
}
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
binding.remoteVideo.setVisibility(View.GONE);

View file

@ -196,7 +196,7 @@ public class JingleConnectionManager extends AbstractConnectionManager {
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": encountered unknown media in session proposal. " + propose);
return;
}
if (isBusy()) { //TODO only if no other devices are active
if (isBusy()) {
writeLogMissedIncoming(account, id.with.asBareJid(), id.sessionId, serverMsgId, timestamp);
final int activeDevices = account.countPresences();
Log.d(Config.LOGTAG, "active devices: " + activeDevices);