kopia lustrzana https://github.com/ryukoposting/Signal-Android
Stop showing video in group calls when it isn't being forwarded.
rodzic
2f1b05f882
commit
f7b9942f11
|
@ -147,7 +147,7 @@ public class CallParticipantView extends ConstraintLayout {
|
||||||
} else {
|
} else {
|
||||||
infoOverlay.setVisibility(View.GONE);
|
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);
|
rendererFrame.setVisibility(hasContentToRender ? View.VISIBLE : View.GONE);
|
||||||
renderer.setVisibility(hasContentToRender ? View.VISIBLE : View.GONE);
|
renderer.setVisibility(hasContentToRender ? View.VISIBLE : View.GONE);
|
||||||
|
|
|
@ -13,6 +13,7 @@ data class CallParticipant constructor(
|
||||||
val identityKey: IdentityKey? = null,
|
val identityKey: IdentityKey? = null,
|
||||||
val videoSink: BroadcastVideoSink = BroadcastVideoSink(),
|
val videoSink: BroadcastVideoSink = BroadcastVideoSink(),
|
||||||
val cameraState: CameraState = CameraState.UNKNOWN,
|
val cameraState: CameraState = CameraState.UNKNOWN,
|
||||||
|
val isForwardingVideo: Boolean = true,
|
||||||
val isVideoEnabled: Boolean = false,
|
val isVideoEnabled: Boolean = false,
|
||||||
val isMicrophoneEnabled: Boolean = false,
|
val isMicrophoneEnabled: Boolean = false,
|
||||||
val lastSpoke: Long = 0,
|
val lastSpoke: Long = 0,
|
||||||
|
@ -126,6 +127,7 @@ data class CallParticipant constructor(
|
||||||
recipient: Recipient,
|
recipient: Recipient,
|
||||||
identityKey: IdentityKey?,
|
identityKey: IdentityKey?,
|
||||||
renderer: BroadcastVideoSink,
|
renderer: BroadcastVideoSink,
|
||||||
|
isForwardingVideo: Boolean,
|
||||||
audioEnabled: Boolean,
|
audioEnabled: Boolean,
|
||||||
videoEnabled: Boolean,
|
videoEnabled: Boolean,
|
||||||
lastSpoke: Long,
|
lastSpoke: Long,
|
||||||
|
@ -139,6 +141,7 @@ data class CallParticipant constructor(
|
||||||
recipient = recipient,
|
recipient = recipient,
|
||||||
identityKey = identityKey,
|
identityKey = identityKey,
|
||||||
videoSink = renderer,
|
videoSink = renderer,
|
||||||
|
isForwardingVideo = isForwardingVideo,
|
||||||
isVideoEnabled = videoEnabled,
|
isVideoEnabled = videoEnabled,
|
||||||
isMicrophoneEnabled = audioEnabled,
|
isMicrophoneEnabled = audioEnabled,
|
||||||
lastSpoke = lastSpoke,
|
lastSpoke = lastSpoke,
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class BeginCallActionProcessorDelegate extends WebRtcActionProcessor {
|
||||||
true,
|
true,
|
||||||
currentState.getLocalDeviceState().getOrientation().getDegrees()),
|
currentState.getLocalDeviceState().getOrientation().getDegrees()),
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
false,
|
false,
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
|
@ -102,6 +103,7 @@ public class BeginCallActionProcessorDelegate extends WebRtcActionProcessor {
|
||||||
true,
|
true,
|
||||||
currentState.getLocalDeviceState().getOrientation().getDegrees()),
|
currentState.getLocalDeviceState().getOrientation().getDegrees()),
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
false,
|
false,
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -105,6 +105,7 @@ public class GroupActionProcessor extends DeviceAwareActionProcessor {
|
||||||
recipient,
|
recipient,
|
||||||
null,
|
null,
|
||||||
videoSink,
|
videoSink,
|
||||||
|
device.getForwardingVideo() == null || device.getForwardingVideo(),
|
||||||
Boolean.FALSE.equals(device.getAudioMuted()),
|
Boolean.FALSE.equals(device.getAudioMuted()),
|
||||||
Boolean.FALSE.equals(device.getVideoMuted()),
|
Boolean.FALSE.equals(device.getVideoMuted()),
|
||||||
device.getSpeakerTime(),
|
device.getSpeakerTime(),
|
||||||
|
|
|
@ -130,6 +130,7 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
|
||||||
new BroadcastVideoSink(),
|
new BroadcastVideoSink(),
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
0,
|
0,
|
||||||
false,
|
false,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -154,6 +154,7 @@ public final class IncomingGroupCallActionProcessor extends DeviceAwareActionPro
|
||||||
true,
|
true,
|
||||||
currentState.getLocalDeviceState().getOrientation().getDegrees()),
|
currentState.getLocalDeviceState().getOrientation().getDegrees()),
|
||||||
true,
|
true,
|
||||||
|
true,
|
||||||
false,
|
false,
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class CallParticipantListUpdateTest {
|
||||||
private static CallParticipant createParticipant(long recipientId, long deMuxId, @NonNull CallParticipant.DeviceOrdinal deviceOrdinal) {
|
private static CallParticipant createParticipant(long recipientId, long deMuxId, @NonNull CallParticipant.DeviceOrdinal deviceOrdinal) {
|
||||||
Recipient recipient = new Recipient(RecipientId.from(recipientId), mock(RecipientDetails.class), true);
|
Recipient recipient = new Recipient(RecipientId.from(recipientId), mock(RecipientDetails.class), true);
|
||||||
|
|
||||||
return CallParticipant.createRemote(new CallParticipantId(deMuxId, recipient.getId()), recipient, null, new BroadcastVideoSink(), false, false, -1, false, 0, false, deviceOrdinal);
|
return CallParticipant.createRemote(new CallParticipantId(deMuxId, recipient.getId()), recipient, null, new BroadcastVideoSink(), false, false, false, -1, false, 0, false, deviceOrdinal);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -242,6 +242,7 @@ public class ParticipantCollectionTest {
|
||||||
new BroadcastVideoSink(),
|
new BroadcastVideoSink(),
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
false,
|
||||||
lastSpoke,
|
lastSpoke,
|
||||||
false,
|
false,
|
||||||
added,
|
added,
|
||||||
|
|
Ładowanie…
Reference in New Issue