opt
This commit is contained in:
@@ -10,6 +10,7 @@ import com.mogo.service.IMogoServiceApis
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
/**
|
||||
@@ -36,6 +37,7 @@ class NoticeNormalBroadcastReceiver : BroadcastReceiver() {
|
||||
"https://dataservice-1255510688.cos.ap-beijing.myqcloud.com/carImg/yycp_NoticeDETAIL_location.png",
|
||||
"https://vd2.bdstatic.com/mda-mk1347dzxdmcre0y/sc/cae_h264/1635819498112313003/mda-mk1347dzxdmcre0y.mp4?v_from_s=hkapp-haokan-tucheng&auth_key=1635837585-0-0-5295f6658c7711ba7b4d3ef478a7fbaa&bcevod_channel=searchbox_feed&pd=1&pt=3&abtest=",
|
||||
2)
|
||||
SharedPrefs.getInstance(context).putInt("videoType", 1)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
@@ -34,6 +35,7 @@ public class NoticeBannerView extends ConstraintLayout {
|
||||
public NoticeBannerView(@NonNull Context context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
SharedPrefs.getInstance(context).putInt("videoType", 2); //小的视频播放ui
|
||||
LayoutInflater.from(context).inflate(R.layout.notice_push_top_banner, this);
|
||||
initView();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.getApis
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.gone
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.visible
|
||||
import com.mogo.eagle.core.utilcode.util.SharedPrefs
|
||||
import com.mogo.service.windowview.IMogoTopViewManager
|
||||
import com.mogo.service.windowview.IMogoTopViewStatusListener
|
||||
import com.mogo.utils.glide.GlideApp
|
||||
@@ -65,6 +66,9 @@ class NoticeFloatView constructor(
|
||||
}
|
||||
pushCheckDialog!!.showCheckDialog(it)
|
||||
}
|
||||
|
||||
//弹框消失
|
||||
hide()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +126,7 @@ class NoticeFloatView constructor(
|
||||
|
||||
init {
|
||||
inflateView(R.layout.notice_push_top_banner)
|
||||
SharedPrefs.getInstance(context).putInt("videoType", 1) //大的播放器
|
||||
}
|
||||
|
||||
private var topViewStatusListener = object : IMogoTopViewStatusListener {
|
||||
|
||||
@@ -17,11 +17,13 @@ import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
|
||||
import com.mogo.eagle.core.function.api.notice.NoticeNetCallBack;
|
||||
import com.mogo.eagle.core.function.call.notice.CallerNoticeManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.widget.media.video.NoticeSimpleSmallVideoPlayer;
|
||||
import com.mogo.eagle.core.widget.media.video.NoticeSimpleVideoPlayer;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.dialog.BaseFloatDialog;
|
||||
import com.mogo.service.imageloader.MogoImageView;
|
||||
import com.mogo.utils.BitmapHelper;
|
||||
import com.shuyu.gsyvideoplayer.GSYVideoManager;
|
||||
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder;
|
||||
import com.shuyu.gsyvideoplayer.listener.VideoAllCallBack;
|
||||
import com.shuyu.gsyvideoplayer.video.base.GSYVideoView;
|
||||
@@ -130,6 +132,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
});
|
||||
close = findViewById(R.id.notice_traffic_dialog_close);
|
||||
close.setOnClickListener(v -> {
|
||||
releasePlayer();
|
||||
dismiss();
|
||||
});
|
||||
if (mPushData.getType() == 1) {
|
||||
@@ -324,6 +327,14 @@ public class NoticeTrafficDialog extends BaseFloatDialog {
|
||||
|
||||
}
|
||||
|
||||
private void releasePlayer() {
|
||||
try {
|
||||
GSYVideoManager.releaseAllVideos();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
super.dismiss();
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
android:background="@drawable/notice_connect"
|
||||
android:gravity="center"
|
||||
android:text="连接"
|
||||
android:visibility="gone"
|
||||
android:textColor="#FFF"
|
||||
android:textSize="@dimen/dp_42"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/video_player"
|
||||
|
||||
Reference in New Issue
Block a user