Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
GSYVideoPlayer
提交
7388f897
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,发现更多精彩内容 >>
提交
7388f897
编写于
7月 30, 2018
作者:
G
guoshuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix demo
上级
b691eb5a
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
53 addition
and
4 deletion
+53
-4
app/src/main/java/com/example/gsyvideoplayer/video/SampleCoverVideo.java
...va/com/example/gsyvideoplayer/video/SampleCoverVideo.java
+53
-4
未找到文件。
app/src/main/java/com/example/gsyvideoplayer/video/SampleCoverVideo.java
浏览文件 @
7388f897
...
@@ -10,9 +10,12 @@ import android.widget.ImageView;
...
@@ -10,9 +10,12 @@ import android.widget.ImageView;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.Glide
;
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.
...
@@ -80,13 +83,15 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
...
@@ -80,13 +83,15 @@ 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
public
void
onSurfaceUpdated
(
Surface
surface
)
{
public
void
onSurfaceUpdated
(
Surface
surface
)
{
super
.
onSurfaceUpdated
(
surface
);
super
.
onSurfaceUpdated
(
surface
);
...
@@ -103,17 +108,61 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
...
@@ -103,17 +108,61 @@ public class SampleCoverVideo extends StandardGSYVideoPlayer {
super
.
setViewShowState
(
view
,
visibility
);
super
.
setViewShowState
(
view
,
visibility
);
}
}
/**下方两个重载方法,在播放开始不显示底部进度*/
/**
* 下方重载方法,在播放开始不显示底部进度和按键
*/
protected
boolean
byStartedClick
;
@Override
protected
void
onClickUiToggle
()
{
if
(
mIfCurrentIsFullscreen
&&
mLockCurScreen
&&
mNeedLockFull
)
{
setViewShowState
(
mLockScreen
,
VISIBLE
);
return
;
}
byStartedClick
=
true
;
super
.
onClickUiToggle
();
}
@Override
protected
void
changeUiToNormal
()
{
super
.
changeUiToNormal
();
byStartedClick
=
false
;
}
@Override
@Override
protected
void
changeUiToPreparingShow
()
{
protected
void
changeUiToPreparingShow
()
{
super
.
changeUiToPreparingShow
();
super
.
changeUiToPreparingShow
();
Debuger
.
printfLog
(
"Sample changeUiToPreparingShow"
);
setViewShowState
(
mBottomContainer
,
INVISIBLE
);
setViewShowState
(
mStartButton
,
INVISIBLE
);
}
@Override
protected
void
changeUiToPlayingBufferingShow
()
{
super
.
changeUiToPlayingBufferingShow
();
Debuger
.
printfLog
(
"Sample changeUiToPlayingBufferingShow"
);
setViewShowState
(
mBottomContainer
,
INVISIBLE
);
setViewShowState
(
mBottomContainer
,
INVISIBLE
);
setViewShowState
(
mStartButton
,
INVISIBLE
);
}
@Override
protected
void
changeUiToPlayingShow
()
{
super
.
changeUiToPlayingShow
();
Debuger
.
printfLog
(
"Sample changeUiToPlayingShow"
);
if
(!
byStartedClick
)
{
setViewShowState
(
mBottomContainer
,
INVISIBLE
);
setViewShowState
(
mStartButton
,
INVISIBLE
);
}
}
}
@Override
@Override
public
void
startAfterPrepared
()
{
public
void
startAfterPrepared
()
{
super
.
startAfterPrepared
();
super
.
startAfterPrepared
();
Debuger
.
printfLog
(
"Sample startAfterPrepared"
);
setViewShowState
(
mBottomContainer
,
INVISIBLE
);
setViewShowState
(
mBottomContainer
,
INVISIBLE
);
setViewShowState
(
mStartButton
,
INVISIBLE
);
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录