Implemented request offer

This commit is contained in:
Mario Danic 2018-10-15 21:12:27 +02:00
parent b0e85e7d4f
commit c69472cc39
2 changed files with 13 additions and 1 deletions

View file

@ -1458,7 +1458,11 @@ public class CallController extends BaseController {
}
for (String sessionId : newSessions) {
alwaysGetPeerConnectionWrapperForSessionId(sessionId);
if (!hasMCU) {
alwaysGetPeerConnectionWrapperForSessionId(sessionId);
} else {
webSocketClient.requestOfferForSessionIdWithType(sessionId, "video");
}
}
for (String sessionId : oldSesssions) {

View file

@ -224,4 +224,12 @@ public class MagicWebSocketInstance extends WebSocketListener {
concurrentHashMapQueue.remove(id);
return copyJob;
}
public void requestOfferForSessionIdWithType(String sessionId, String roomType) {
try {
webSocket.send(LoganSquare.serialize(webSocketConnectionHelper.getAssembledRequestOfferModel(sessionId, roomType)));
} catch (IOException e) {
Log.e(TAG, "Failed to offer request");
}
}
}