You can upgrade an audio call to a video call by calling the enableVideo(true) method of the StringeeCall object:
mStringeeCall.enableVideo(true);
Stringee also provides APIs to make it easy to send an upgrade request from a client to another. Follow the instructions below to implement a full upgrade flow:
stringeeCallA.enableVideo(true);
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("type", "cameraRequest");
} catch (JSONException e) {
e.printStackTrace();
}
stringeeCallA.sendCallInfo(jsonObject);
@Override
public void onCallInfo(StringeeCall stringeeCall, final JSONObject jsonObject) {
}
public void onCallInfo(StringeeCall stringeeCall, final JSONObject jsonObject) {
try {
String type = jsonObject.getString("type");
if (type.equals("cameraRequest")) {
stringeeCallB.enableVideo(true);
}
} catch (JSONException e) {
e.printStackTrace();
}
}