Преглед изворни кода

rename method

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe пре 3 година
родитељ
комит
49fd2640bf

+ 2 - 2
app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java

@@ -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();