优化了点播道路事件的视频,关闭的时候暂停播放
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
package com.mogo.module.v2x.listener;
|
||||
|
||||
public interface VideoAdapterCallBack {
|
||||
/*
|
||||
* 道路视频播放
|
||||
* */
|
||||
void videoPlayWithVideoUrl(String videoUrl);
|
||||
|
||||
void closeVideoWindow();
|
||||
}
|
||||
@@ -131,7 +131,7 @@ public class V2XRoadVideoCarScenario extends AbsV2XScenario<V2XEventShowEntity>
|
||||
|
||||
@Override
|
||||
public void beforeViewRemoveAnim(View view) {
|
||||
|
||||
Log.d(TAG, "beforeViewRemoveAnim");
|
||||
closeWindow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user