Stop showing video in group calls when it isn't being forwarded.

This commit is contained in:
Rashad Sookram
2022-04-29 11:00:09 -04:00
committed by Greyson Parrelli
parent 2f1b05f882
commit f7b9942f11
8 changed files with 11 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ public class CallParticipantView extends ConstraintLayout {
} else {
infoOverlay.setVisibility(View.GONE);
boolean hasContentToRender = participant.isVideoEnabled() || participant.isScreenSharing();
boolean hasContentToRender = (participant.isVideoEnabled() || participant.isScreenSharing()) && participant.isForwardingVideo();
rendererFrame.setVisibility(hasContentToRender ? View.VISIBLE : View.GONE);
renderer.setVisibility(hasContentToRender ? View.VISIBLE : View.GONE);

View File

@@ -13,6 +13,7 @@ data class CallParticipant constructor(
val identityKey: IdentityKey? = null,
val videoSink: BroadcastVideoSink = BroadcastVideoSink(),
val cameraState: CameraState = CameraState.UNKNOWN,
val isForwardingVideo: Boolean = true,
val isVideoEnabled: Boolean = false,
val isMicrophoneEnabled: Boolean = false,
val lastSpoke: Long = 0,
@@ -126,6 +127,7 @@ data class CallParticipant constructor(
recipient: Recipient,
identityKey: IdentityKey?,
renderer: BroadcastVideoSink,
isForwardingVideo: Boolean,
audioEnabled: Boolean,
videoEnabled: Boolean,
lastSpoke: Long,
@@ -139,6 +141,7 @@ data class CallParticipant constructor(
recipient = recipient,
identityKey = identityKey,
videoSink = renderer,
isForwardingVideo = isForwardingVideo,
isVideoEnabled = videoEnabled,
isMicrophoneEnabled = audioEnabled,
lastSpoke = lastSpoke,

View File

@@ -48,6 +48,7 @@ public class BeginCallActionProcessorDelegate extends WebRtcActionProcessor {
true,
currentState.getLocalDeviceState().getOrientation().getDegrees()),
true,
true,
false,
0,
true,
@@ -102,6 +103,7 @@ public class BeginCallActionProcessorDelegate extends WebRtcActionProcessor {
true,
currentState.getLocalDeviceState().getOrientation().getDegrees()),
true,
true,
false,
0,
true,

View File

@@ -105,6 +105,7 @@ public class GroupActionProcessor extends DeviceAwareActionProcessor {
recipient,
null,
videoSink,
device.getForwardingVideo() == null || device.getForwardingVideo(),
Boolean.FALSE.equals(device.getAudioMuted()),
Boolean.FALSE.equals(device.getVideoMuted()),
device.getSpeakerTime(),

View File

@@ -130,6 +130,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
new BroadcastVideoSink(),
true,
true,
true,
0,
false,
0,

View File

@@ -154,6 +154,7 @@ public final class IncomingGroupCallActionProcessor extends DeviceAwareActionPro
true,
currentState.getLocalDeviceState().getOrientation().getDegrees()),
true,
true,
false,
0,
true,