Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
GSYVideoPlayer
提交
4397cf18
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,体验更适合开发者的 AI 搜索 >>
提交
4397cf18
编写于
1月 17, 2020
作者:
G
guoshuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add isShowDragProgressTextOnSeekBar
上级
93bb8bc7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
30 addition
and
4 deletion
+30
-4
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java
...m/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java
+8
-0
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYVideoControlView.java
.../shuyu/gsyvideoplayer/video/base/GSYVideoControlView.java
+22
-4
未找到文件。
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java
浏览文件 @
4397cf18
...
...
@@ -113,6 +113,9 @@ public class GSYVideoOptionBuilder {
//是否需要在利用window实现全屏幕的时候隐藏statusbar
protected
boolean
mStatusBar
=
false
;
//拖动进度条时,是否在 seekbar 开始部位显示拖动进度
protected
boolean
isShowDragProgressTextOnSeekBar
=
false
;
//播放的tag,防止错误,因为普通的url也可能重复
protected
String
mPlayTag
=
""
;
...
...
@@ -547,6 +550,10 @@ public class GSYVideoOptionBuilder {
return
this
;
}
public
GSYVideoOptionBuilder
setShowDragProgressTextOnSeekBar
(
boolean
isShowDragProgressTextOnSeekBar
)
{
this
.
isShowDragProgressTextOnSeekBar
=
isShowDragProgressTextOnSeekBar
;
return
this
;
}
/**
* 在播放前才真正执行setup
...
...
@@ -635,6 +642,7 @@ public class GSYVideoOptionBuilder {
gsyVideoPlayer
.
setStartAfterPrepared
(
mStartAfterPrepared
);
gsyVideoPlayer
.
setReleaseWhenLossAudio
(
mReleaseWhenLossAudio
);
gsyVideoPlayer
.
setFullHideActionBar
(
mActionBar
);
gsyVideoPlayer
.
setShowDragProgressTextOnSeekBar
(
isShowDragProgressTextOnSeekBar
);
gsyVideoPlayer
.
setFullHideStatusBar
(
mStatusBar
);
if
(
mEnlargeImageRes
>
0
)
{
gsyVideoPlayer
.
setEnlargeImageRes
(
mEnlargeImageRes
);
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYVideoControlView.java
浏览文件 @
4397cf18
...
...
@@ -132,6 +132,7 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
protected
boolean
mPostProgress
=
false
;
protected
boolean
mPostDismiss
=
false
;
protected
boolean
isShowDragProgressTextOnSeekBar
=
false
;
//播放按键
protected
View
mStartButton
;
...
...
@@ -570,10 +571,7 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
@Override
public
void
onProgressChanged
(
SeekBar
seekBar
,
int
progress
,
boolean
fromUser
)
{
if
(
fromUser
)
{
int
duration
=
getDuration
();
mCurrentTimeTextView
.
setText
(
CommonUtil
.
stringForTime
(
progress
*
duration
/
100
));
}
showDragProgressTextOnSeekBar
(
fromUser
,
progress
);
}
@Override
...
...
@@ -667,6 +665,14 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
mFirstTouch
=
true
;
}
protected
void
showDragProgressTextOnSeekBar
(
boolean
fromUser
,
int
progress
)
{
if
(
fromUser
&&
isShowDragProgressTextOnSeekBar
)
{
int
duration
=
getDuration
();
if
(
mCurrentTimeTextView
!=
null
)
mCurrentTimeTextView
.
setText
(
CommonUtil
.
stringForTime
(
progress
*
duration
/
100
));
}
}
protected
void
touchSurfaceMove
(
float
deltaX
,
float
deltaY
,
float
y
)
{
int
curWidth
=
0
;
int
curHeight
=
0
;
...
...
@@ -1344,4 +1350,16 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
public
void
setGSYVideoProgressListener
(
GSYVideoProgressListener
videoProgressListener
)
{
this
.
mGSYVideoProgressListener
=
videoProgressListener
;
}
public
boolean
isShowDragProgressTextOnSeekBar
()
{
return
isShowDragProgressTextOnSeekBar
;
}
/**
* 拖动进度条时,是否在 seekbar 开始部位显示拖动进度
* 默认 false
*/
public
void
setShowDragProgressTextOnSeekBar
(
boolean
showDragProgressTextOnSeekBar
)
{
isShowDragProgressTextOnSeekBar
=
showDragProgressTextOnSeekBar
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录