diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/VideoAdapterCallBack.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/VideoAdapterCallBack.java deleted file mode 100644 index 063195cba8..0000000000 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/VideoAdapterCallBack.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.mogo.module.v2x.listener; - -public interface VideoAdapterCallBack { - /* - * 道路视频播放 - * */ - void videoPlayWithVideoUrl(String videoUrl); - - void closeVideoWindow(); -} diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoCarScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoCarScenario.java index 6c0c5231b0..26b82cb32d 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoCarScenario.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoCarScenario.java @@ -131,7 +131,7 @@ public class V2XRoadVideoCarScenario extends AbsV2XScenario @Override public void beforeViewRemoveAnim(View view) { - Log.d(TAG, "beforeViewRemoveAnim"); + closeWindow(); } } diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java index 8fcdfb76f9..d2c98d978d 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/road/V2XRoadVideoWindow.java @@ -16,7 +16,6 @@ import com.mogo.module.common.entity.V2XRoadEventEntity; import com.mogo.module.v2x.R; import com.mogo.module.v2x.V2XServiceManager; import com.mogo.module.v2x.listener.V2XWindowStatusListener; -import com.mogo.module.v2x.listener.VideoAdapterCallBack; import com.mogo.module.v2x.scenario.view.IV2XWindow; import com.mogo.module.v2x.view.SimpleCoverVideoPlayer; import com.mogo.utils.BitmapHelper; @@ -31,10 +30,10 @@ import static com.mogo.module.v2x.VideoInitKt.initVideo; import static com.shuyu.gsyvideoplayer.utils.GSYVideoType.SCREEN_MATCH_FULL; /** - https://github.com/CarGuo/GSYVideoPlayer/tree/master/doc SimpleCoverVideoPlayer文档 -*/ + * https://github.com/CarGuo/GSYVideoPlayer/tree/master/doc SimpleCoverVideoPlayer文档 + */ public class V2XRoadVideoWindow extends RelativeLayout implements - IV2XWindow, IDestroyable, VideoAdapterCallBack { + IV2XWindow, IDestroyable { private static final String TAG = "V2XRoadVideoWindow"; private V2XWindowStatusListener mV2XWindowStatusListener; @@ -172,12 +171,12 @@ public class V2XRoadVideoWindow extends RelativeLayout implements @Override public void onClickStop(String url, Object... objects) { - Log.d(TAG,"onClickStop"); + Log.d(TAG, "onClickStop"); } @Override public void onStartPrepared(String url, Object... objects) { - Log.d(TAG,"onStartPrepared"); + Log.d(TAG, "onStartPrepared"); } @Override @@ -261,13 +260,19 @@ public class V2XRoadVideoWindow extends RelativeLayout implements @Override public void close() { - simpleCoverVideoPlayer.onVideoPause(); + pushVideo(); //移除窗体 V2XServiceManager .getMogoTopViewManager() .removeViewNoLinkage(this); } + void pushVideo() { + if (simpleCoverVideoPlayer != null) { + simpleCoverVideoPlayer.onVideoPause(); + } + } + @Override public View getView() { return this; @@ -282,14 +287,4 @@ public class V2XRoadVideoWindow extends RelativeLayout implements public void destroy() { } - - @Override - public void videoPlayWithVideoUrl(String videoUrl) { - - } - - @Override - public void closeVideoWindow() { - - } }