opt
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.module.common.drawer.marker;
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@@ -113,7 +113,7 @@ public class CameraLiveGSYVideoView extends LiveRoundLayout implements IMogoSkin
|
||||
private void playLiveVideo(String liveUrl) {
|
||||
try {
|
||||
if (mLivePlayer != null) {
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_RTMP);
|
||||
mLivePlayer.startPlay(liveUrl, TXLivePlayer.PLAY_TYPE_LIVE_FLV);
|
||||
mLivePlayer.setPlayListener(new ITXLivePlayListener() {
|
||||
@Override
|
||||
public void onPlayEvent(int event, Bundle bundle) {
|
||||
|
||||
@@ -60,27 +60,28 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
}
|
||||
});
|
||||
|
||||
if (!isFirst) {
|
||||
isFirst = true;
|
||||
UiThreadHandler.postDelayed(() -> {
|
||||
mCloudRoadData = new CloudRoadData();
|
||||
mCloudRoadData.setRtmpUrl("rtmp://58.200.131.2:1935/livetv/hunantv");
|
||||
mCloudRoadData.setLat(40.200353);
|
||||
mCloudRoadData.setLon(116.745467);
|
||||
|
||||
// mCloudRoadData.setLat(40.200481);
|
||||
// mCloudRoadData.setLon(116.738473);
|
||||
|
||||
// CameraLiveManager.getInstance().init(mCloudRoadData);
|
||||
addCameraMarker(mCloudRoadData);
|
||||
}, 2_000);
|
||||
}
|
||||
// if (!isFirst) {
|
||||
// isFirst = true;
|
||||
// UiThreadHandler.postDelayed(() -> {
|
||||
// mCloudRoadData = new CloudRoadData();
|
||||
//// mCloudRoadData.setRtmpUrl("rtmp://58.200.131.2:1935/livetv/hunantv");
|
||||
// mCloudRoadData.setRtmpUrl("http://video.zhidaozhixing.com/live/rec_12_22.flv");
|
||||
//
|
||||
// mCloudRoadData.setLat(39.969089);
|
||||
// mCloudRoadData.setLon(116.418009);
|
||||
//
|
||||
//// CameraLiveManager.getInstance().init(mCloudRoadData);
|
||||
// addCameraMarker(mCloudRoadData);
|
||||
// }, 2_000);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void exitVrMode() {
|
||||
Logger.d(TAG, "退出vr模式===");
|
||||
// removeCameraMarker();
|
||||
// isFirst = false;
|
||||
MogoApisHandler.getInstance().getApis().getWebSocketManagerApi(mContext).unregisterOnWebSocketMessageListener(this);
|
||||
}
|
||||
|
||||
@@ -97,8 +98,7 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
.longitude(roadData.getLon());
|
||||
options.anchor(0.5f, 0.5f);
|
||||
|
||||
//icon_space
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_default_user_head, null);
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.icon_space, null);
|
||||
options.icon(bitmap);
|
||||
mMogoMarker = ExtensionServiceManager.getMapService().getMarkerManager(mContext)
|
||||
.addMarker(PushDataType.TYPE_PUSH_CAMERA_DATA, options);
|
||||
@@ -133,13 +133,12 @@ public class CameraLiveNoticeHelper implements IMogoOnWebSocketMessageListener<M
|
||||
*/
|
||||
@Override
|
||||
public void onMsgReceived(MogoSnapshotSetData obj) {
|
||||
Logger.d(TAG, "onMsgReceived cameralive : " + obj);
|
||||
// Logger.d(TAG, "onMsgReceived cameralive : " + obj);
|
||||
if (obj != null) { //如果多个点,如何处理,点击的时候
|
||||
mCloudRoadData = obj.getCamera();
|
||||
if (mCloudRoadData != null) {
|
||||
Log.d(TAG, "onMsgReceived getRtmpUrl = " + mCloudRoadData.getRtmpUrl());
|
||||
Log.d(TAG, "mCurrentlat = " + mCurrentlat + "--mCurrentlon = " + mCurrentlon);
|
||||
Log.d(TAG, "mCloudRoadData.getLat() = " + mCloudRoadData.getLat() + "--mCloudRoadData.getLon() = " + mCloudRoadData.getLon());
|
||||
Log.d(TAG, "mCurrentlat = " + mCurrentlat + "--mCurrentlon = " + mCurrentlon + "---mCloudRoadData.getLat() = " + mCloudRoadData.getLat() + "--mCloudRoadData.getLon() = " + mCloudRoadData.getLon());
|
||||
if (mCurrentlat == mCloudRoadData.getLat() && mCurrentlon == mCloudRoadData.getLon()) {
|
||||
//TODO
|
||||
} else {
|
||||
|
||||
@@ -123,10 +123,10 @@ public class MogoRTKLocation {
|
||||
cloudLocationInfo.setSatelliteTime(location.getTime());
|
||||
cloudLocationInfo.setSystemTime(System.currentTimeMillis());
|
||||
|
||||
Log.e("liyz", "lat = " + location.getLatitude() + ">>>>long = " + location.getLongitude());
|
||||
// Log.e("liyz", "lat = " + location.getLatitude() + ">>>>long = " + location.getLongitude());
|
||||
cacheList.add(cloudLocationInfo);
|
||||
} else {
|
||||
Log.e("liyz", "location == null");
|
||||
Logger.e(TAG, "location == null");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user