code: public static boolean sdpHasVideo(JSONObject sdp) {
          boolean hasVideo = false;
  
          if (null != sdp) {
              try {
                  String sdpString = sdp.getString("sdp");
                  hasVideo = sdpString.contains("m=video");
              } catch (JSONException e) {
                  // Bad SDP?
                  Log.d(TAG, "ERROR: Incoming call appears to have an invalid SDP");
              }
          }
  
          return hasVideo;
      }
docs: Determines if the specified SDP data contains definitions for a video stream
  
  @param sdp  The SDP data to examine
  
  @return True if a video stream definition is present, false otherwise