sdk add conference rtp forward api
This commit is contained in:
@@ -45,4 +45,15 @@ public class ConferenceAdmin {
|
||||
PojoConferenceRoomId conferenceRoomId = new PojoConferenceRoomId(roomId, advance);
|
||||
return AdminHttpUtils.httpJsonPost(path, conferenceRoomId, Void.class);
|
||||
}
|
||||
|
||||
public static IMResult<Void> rtpForward(String roomId, String userId, String rtpHost, int rtpPort) throws Exception {
|
||||
String path = APIPath.Conference_Rtp_Forward;
|
||||
PojoConferenceRtpForwardReq req = new PojoConferenceRtpForwardReq();
|
||||
req.roomId = roomId;
|
||||
req.publisherId = userId;
|
||||
req.host = rtpHost;
|
||||
req.audioPort = rtpPort;
|
||||
req.videoPort = rtpPort;
|
||||
return AdminHttpUtils.httpJsonPost(path, req, Void.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1708,5 +1708,12 @@ public class Main {
|
||||
System.out.println("list participants success");
|
||||
}
|
||||
}
|
||||
|
||||
IMResult<Void> rtpForwardResult = ConferenceAdmin.rtpForward("5156250396", "lhgqmws2k", "192.168.1.81", 8000);
|
||||
if(rtpForwardResult == null || rtpForwardResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
|
||||
System.out.println("rtp forward failure");
|
||||
} else {
|
||||
System.out.println("rtp forward success");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user