Merge pull request #1951 from nextcloud/fix-typo-in-name-of-method-to-check-if-video-should-not-be-received

Fix typo in name of method to check if video should not be received
This commit is contained in:
Marcel Hibbe 2022-05-02 17:14:34 +02:00 committed by GitHub
commit 7c89b15edb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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