rename method

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-03-30 12:08:40 +02:00
parent 346089cecf
commit 49fd2640bf
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -258,7 +258,7 @@ public class PeerConnectionWrapper {
return isMCUPublisher;
}
private boolean isAudioCallOnly() {
private boolean shouldReceiveVideo() {
for (MediaConstraints.KeyValuePair keyValuePair : mediaConstraints.mandatory) {
if ("OfferToReceiveVideo".equals(keyValuePair.getKey())) {
return !Boolean.parseBoolean(keyValuePair.getValue());
@ -456,7 +456,7 @@ public class PeerConnectionWrapper {
if (peerConnection != null) {
if (peerConnection.getLocalDescription() == null) {
if (isAudioCallOnly()) {
if (shouldReceiveVideo()) {
for (RtpTransceiver t : peerConnection.getTransceivers()) {
if (t.getMediaType().equals(MediaStreamTrack.MediaType.MEDIA_TYPE_VIDEO)) {
t.stop();