提交 1fec5355 编写于 作者: G guoshuyu

测试封面

上级 64a1a268
......@@ -11,9 +11,12 @@ import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.VideoBitmapDecoder;
import com.bumptech.glide.request.RequestOptions;
import com.example.gsyvideoplayer.R;
import com.shuyu.gsyvideoplayer.utils.Debuger;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;
import com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer;
import moe.codeest.enviews.ENDownloadView;
/**
* 带封面
* Created by guoshuyu on 2017/9/3.
......@@ -81,18 +84,78 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
@Override
public GSYBaseVideoPlayer showSmallVideo(Point size, boolean actionBar, boolean statusBar) {
//下面这里替换成你自己的强制转化
SampleCoverVideo sampleCoverVideo = (SampleCoverVideo)super.showSmallVideo(size, actionBar, statusBar);
SampleCoverVideo sampleCoverVideo = (SampleCoverVideo) super.showSmallVideo(size, actionBar, statusBar);
sampleCoverVideo.mStartButton.setVisibility(GONE);
sampleCoverVideo.mStartButton = null;
return sampleCoverVideo;
}
/**下方两个重载方法,在播放开始不显示底部进度*/
/**
* 下方两个重载方法,在播放开始不显示底部进度
*/
@Override
protected void changeUiToPreparingShow() {
super.changeUiToPreparingShow();
setViewShowState(mBottomContainer, INVISIBLE);
setViewShowState(mThumbImageViewLayout, VISIBLE);
}
@Override
protected void changeUiToPrepareingClear() {
super.changeUiToPrepareingClear();
setViewShowState(mThumbImageViewLayout, VISIBLE);
}
@Override
protected void changeUiToPlayingShow() {
Debuger.printfLog("changeUiToPlayingShow");
setViewShowState(mTopContainer, VISIBLE);
setViewShowState(mBottomContainer, VISIBLE);
setViewShowState(mStartButton, VISIBLE);
setViewShowState(mLoadingProgressBar, INVISIBLE);
if (mThumbImageViewLayout != null && mThumbImageViewLayout.getVisibility() == VISIBLE) {
postDelayed(new Runnable() {
@Override
public void run() {
setViewShowState(mThumbImageViewLayout, INVISIBLE);
}
}, 300);
}
setViewShowState(mBottomProgressBar, INVISIBLE);
setViewShowState(mLockScreen, (mIfCurrentIsFullscreen && mNeedLockFull) ? VISIBLE : GONE);
if (mLoadingProgressBar instanceof ENDownloadView) {
((ENDownloadView) mLoadingProgressBar).reset();
}
updateStartImage();
}
@Override
protected void changeUiToPlayingBufferingShow() {
setViewShowState(mTopContainer, VISIBLE);
setViewShowState(mBottomContainer, VISIBLE);
setViewShowState(mStartButton, INVISIBLE);
setViewShowState(mLoadingProgressBar, VISIBLE);
if (mThumbImageViewLayout != null && mThumbImageViewLayout.getVisibility() == VISIBLE) {
postDelayed(new Runnable() {
@Override
public void run() {
setViewShowState(mThumbImageViewLayout, INVISIBLE);
}
}, 300);
}
setViewShowState(mBottomProgressBar, INVISIBLE);
setViewShowState(mLockScreen, GONE);
if (mLoadingProgressBar instanceof ENDownloadView) {
ENDownloadView enDownloadView = (ENDownloadView) mLoadingProgressBar;
if (enDownloadView.getCurrentState() == ENDownloadView.STATE_PRE) {
((ENDownloadView) mLoadingProgressBar).start();
}
}
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册