Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
GSYVideoPlayer
提交
d8cf0d79
G
GSYVideoPlayer
项目概览
NotesChapter
/
GSYVideoPlayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
GSYVideoPlayer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d8cf0d79
编写于
5月 29, 2018
作者:
G
guoshuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
测试封面
上级
d36eb6bc
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
17 addition
and
65 deletion
+17
-65
app/src/main/java/com/example/gsyvideoplayer/video/SampleCoverVideo.java
...va/com/example/gsyvideoplayer/video/SampleCoverVideo.java
+17
-65
未找到文件。
app/src/main/java/com/example/gsyvideoplayer/video/SampleCoverVideo.java
浏览文件 @
d8cf0d79
...
@@ -3,20 +3,16 @@ package com.example.gsyvideoplayer.video;
...
@@ -3,20 +3,16 @@ package com.example.gsyvideoplayer.video;
import
android.content.Context
;
import
android.content.Context
;
import
android.graphics.Point
;
import
android.graphics.Point
;
import
android.util.AttributeSet
;
import
android.util.AttributeSet
;
import
android.view.Surface
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.DecodeFormat
;
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.bumptech.glide.request.RequestOptions
;
import
com.example.gsyvideoplayer.R
;
import
com.example.gsyvideoplayer.R
;
import
com.shuyu.gsyvideoplayer.utils.Debuger
;
import
com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
;
import
com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
;
import
com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer
;
import
com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer
;
import
moe.codeest.enviews.ENDownloadView
;
/**
/**
* 带封面
* 带封面
* Created by guoshuyu on 2017/9/3.
* Created by guoshuyu on 2017/9/3.
...
@@ -84,78 +80,34 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
...
@@ -84,78 +80,34 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
@Override
@Override
public
GSYBaseVideoPlayer
showSmallVideo
(
Point
size
,
boolean
actionBar
,
boolean
statusBar
)
{
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
.
setVisibility
(
GONE
);
sampleCoverVideo
.
mStartButton
=
null
;
sampleCoverVideo
.
mStartButton
=
null
;
return
sampleCoverVideo
;
return
sampleCoverVideo
;
}
}
/**下方两个重载方法,在播放开始前不屏蔽封面*/
/**
* 下方两个重载方法,在播放开始不显示底部进度
*/
@Override
@Override
protected
void
changeUiToPreparingShow
()
{
public
void
onSurfaceUpdated
(
Surface
surface
)
{
super
.
changeUiToPreparingShow
();
super
.
onSurfaceUpdated
(
surface
);
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
)
{
if
(
mThumbImageViewLayout
!=
null
&&
mThumbImageViewLayout
.
getVisibility
()
==
VISIBLE
)
{
postDelayed
(
new
Runnable
()
{
mThumbImageViewLayout
.
setVisibility
(
INVISIBLE
);
@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
@Override
protected
void
changeUiToPlayingBufferingShow
()
{
protected
void
setViewShowState
(
View
view
,
int
visibility
)
{
if
(
view
==
mThumbImageViewLayout
&&
visibility
!=
VISIBLE
)
{
setViewShowState
(
mTopContainer
,
VISIBLE
);
return
;
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
);
super
.
setViewShowState
(
view
,
visibility
);
}
}
setViewShowState
(
mBottomProgressBar
,
INVISIBLE
);
setViewShowState
(
mLockScreen
,
GONE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
/**下方两个重载方法,在播放开始不显示底部进度*/
ENDownloadView
enDownloadView
=
(
ENDownloadView
)
mLoadingProgressBar
;
@Override
if
(
enDownloadView
.
getCurrentState
()
==
ENDownloadView
.
STATE_PRE
)
{
protected
void
changeUiToPreparingShow
()
{
((
ENDownloadView
)
mLoadingProgressBar
).
start
();
super
.
changeUiToPreparingShow
();
}
setViewShowState
(
mBottomContainer
,
INVISIBLE
);
}
}
}
@Override
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录