Fix typo in name of method to check if video should not be received

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2022-05-02 05:47:06 +02:00 committed by Marcel Hibbe
parent 232bfcf330
commit 3274c1e1fa
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 shouldReceiveVideo() {
private boolean shouldNotReceiveVideo() {
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 (shouldReceiveVideo()) {
if (shouldNotReceiveVideo()) {
for (RtpTransceiver t : peerConnection.getTransceivers()) {
if (t.getMediaType().equals(MediaStreamTrack.MediaType.MEDIA_TYPE_VIDEO)) {
t.stop();