finish the interface of live

This commit is contained in:
zhongchao
2021-04-06 13:58:14 +08:00
parent 1ebe232114
commit f60490f19d
7 changed files with 28 additions and 71 deletions

View File

@@ -67,13 +67,11 @@ public class MoGoAiCloudTrafficLive {
* 查看指定路口摄像头直播
*
* @param cameraId 设备id
* @param lat 纬度
* @param lon 经度
* @param callBack {@link ITrafficIntersectionLiveCallBack}直播回调
*/
public static void viewDesignativeIntersectionLive(int cameraId, double lat, double lon, ITrafficIntersectionLiveCallBack callBack) {
public static void viewDesignativeIntersectionLive(String cameraId, ITrafficIntersectionLiveCallBack callBack) {
try {
TrafficLiveCurrentManager.getInstance().viewDesignativeIntersectionLive(cameraId, lat, lon, callBack);
TrafficLiveCurrentManager.getInstance().viewDesignativeIntersectionLive(cameraId, callBack);
} catch (Exception e) {
Logger.e(TAG, " viewDesignativeIntersectionLive error : " + e);
callBack.onError(e != null ? e.getMessage() : "check input param");

View File

@@ -155,14 +155,11 @@ public class TrafficLiveCurrentManager
});
}
public void viewDesignativeIntersectionLive(int cameraId, double lat, double lon, ITrafficIntersectionLiveCallBack callBack) throws Exception {
if (lat == 0.0 || lon == 0.0) {
throw new Exception("param lat and lon can not be 0.0f");
public void viewDesignativeIntersectionLive(String cameraId, ITrafficIntersectionLiveCallBack callBack) throws Exception {
if (TextUtils.isEmpty(cameraId)) {
throw new Exception("param cameraId can not be null");
}
if (cameraId < 0) {
throw new Exception("param bearing can not less than 0");
}
requestLiveManager.requestDesignativeIntersectionLive(cameraId, lat, lon, new IRequestLiveListener() {
requestLiveManager.requestDesignativeIntersectionLive(cameraId, new IRequestLiveListener() {
@Override
public void onSuccess(String liveUrl) {
callBack.liveUrlResult(liveUrl);