changed the roadcross live from server
This commit is contained in:
@@ -10,6 +10,9 @@ import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XDemoManager;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.module.v2x.entity.net.V2XDemoUserInfoRes;
|
||||
import com.mogo.module.v2x.entity.net.V2XLiveCrossRoad;
|
||||
import com.mogo.module.v2x.network.V2XRefreshCallback;
|
||||
import com.mogo.module.v2x.network.V2XRefreshModel;
|
||||
import com.mogo.module.v2x.utils.ToastUtils;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
@@ -109,28 +112,28 @@ public class V2XVoiceCallLiveBiz {
|
||||
}
|
||||
|
||||
public void getOpenRoadCameraLive() {
|
||||
String liveUrl = "rtmp://154.8.189.110:19350/live/10_1";
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity = buildCallLiveParams(null, liveUrl);
|
||||
V2XVoiceCallLiveScenario.getInstance().setV2XWindow(new V2XVoiceCrossRoadLiveWindow());
|
||||
V2XVoiceCallLiveScenario.getInstance().init(v2XMessageEntity);
|
||||
// V2XRefreshModel.getInstance(mContext).queryCrossRoadsLive(new V2XRefreshCallback<V2XLiveCrossRoad>() {
|
||||
// @Override
|
||||
// public void onSuccess(V2XLiveCrossRoad result) {
|
||||
// if (result != null && result.getResult().getUrl() != null) {
|
||||
// String liveUrl = result.getResult().getUrl();
|
||||
// V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity = buildCallLiveParams(null, liveUrl);
|
||||
// V2XVoiceCallLiveScenario.getInstance().setV2XWindow(new V2XVoiceCrossRoadLiveWindow());
|
||||
// V2XVoiceCallLiveScenario.getInstance().init(v2XMessageEntity);
|
||||
// } else {
|
||||
// Logger.d(MODULE_NAME, "getOpenRoadCameraLive 路口实况直播地址为空");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFail(String msg) {
|
||||
// Logger.d(MODULE_NAME, "getOpenRoadCameraLive : " + msg);
|
||||
// }
|
||||
// });
|
||||
// String liveUrl = "rtmp://154.8.189.110:19350/live/10_1";
|
||||
// V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity = buildCallLiveParams(null, liveUrl);
|
||||
// V2XVoiceCallLiveScenario.getInstance().setV2XWindow(new V2XVoiceCrossRoadLiveWindow());
|
||||
// V2XVoiceCallLiveScenario.getInstance().init(v2XMessageEntity);
|
||||
V2XRefreshModel.getInstance(mContext).queryCrossRoadsLive(new V2XRefreshCallback<V2XLiveCrossRoad>() {
|
||||
@Override
|
||||
public void onSuccess(V2XLiveCrossRoad result) {
|
||||
if (result != null && result.getResult().getUrl() != null) {
|
||||
String liveUrl = result.getResult().getUrl();
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity = buildCallLiveParams(null, liveUrl);
|
||||
V2XVoiceCallLiveScenario.getInstance().setV2XWindow(new V2XVoiceCrossRoadLiveWindow());
|
||||
V2XVoiceCallLiveScenario.getInstance().init(v2XMessageEntity);
|
||||
} else {
|
||||
Logger.d(MODULE_NAME, "getOpenRoadCameraLive 路口实况直播地址为空");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(String msg) {
|
||||
Logger.d(MODULE_NAME, "getOpenRoadCameraLive : " + msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private V2XMessageEntity<V2XPushMessageEntity> buildCallLiveParams(String sn, String liveUrl) {
|
||||
|
||||
Reference in New Issue
Block a user