Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_26386469
GSYVideoPlayer
提交
ebe73dc5
G
GSYVideoPlayer
项目概览
qq_26386469
/
GSYVideoPlayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
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,发现更多精彩内容 >>
提交
ebe73dc5
编写于
12月 16, 2016
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.4.6 修改了出现除以0的的问题,全屏时候调整UI样式无效的情况
上级
8eb333b2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
3 deletion
+41
-3
app/src/main/java/com/example/gsyvideoplayer/DetailPlayer.java
...rc/main/java/com/example/gsyvideoplayer/DetailPlayer.java
+10
-1
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/CustomGSYVideoPlayer.java
.../com/shuyu/gsyvideoplayer/video/CustomGSYVideoPlayer.java
+1
-1
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
...om/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
+30
-1
未找到文件。
app/src/main/java/com/example/gsyvideoplayer/DetailPlayer.java
浏览文件 @
ebe73dc5
...
...
@@ -43,7 +43,9 @@ public class DetailPlayer extends AppCompatActivity {
ButterKnife
.
bind
(
this
);
String
url
=
"http://baobab.wdjcdn.com/14564977406580.mp4"
;
detailPlayer
.
setUp
(
url
,
true
,
null
,
"测试视频"
);
//String url = "https://s3.cn-north-1.amazonaws.com.cn/talkpal/lecture/video/472/v.mp4";
//String url = "https://d131x7vzzf85jg.cloudfront.net/upload/documents/paper/b2/61/00/00/20160420_115018_b544.mp4";
detailPlayer
.
setUp
(
url
,
false
,
null
,
"测试视频"
);
//增加封面
ImageView
imageView
=
new
ImageView
(
this
);
...
...
@@ -102,6 +104,13 @@ public class DetailPlayer extends AppCompatActivity {
}
});
detailPlayer
.
setBottomProgressBarDrawable
(
getResources
().
getDrawable
(
R
.
drawable
.
video_new_progress
));
detailPlayer
.
setDialogVolumeProgressBar
(
getResources
().
getDrawable
(
R
.
drawable
.
video_new_volume_progress_bg
));
detailPlayer
.
setDialogProgressBar
(
getResources
().
getDrawable
(
R
.
drawable
.
video_new_progress
));
detailPlayer
.
setBottomShowProgressBarDrawable
(
getResources
().
getDrawable
(
R
.
drawable
.
video_new_seekbar_progress
),
getResources
().
getDrawable
(
R
.
drawable
.
video_new_seekbar_thumb
));
detailPlayer
.
setDialogProgressColor
(
getResources
().
getColor
(
R
.
color
.
colorAccent
),
-
11
);
}
@Override
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/CustomGSYVideoPlayer.java
浏览文件 @
ebe73dc5
...
...
@@ -109,7 +109,7 @@ public class CustomGSYVideoPlayer extends StandardGSYVideoPlayer {
//设置帧预览图的显示位置
mPreviewLayout
.
setLayoutParams
(
layoutParams
);
if
(
GSYPreViewManager
.
instance
().
getMediaPlayer
()
!=
null
&&
mHadPlay
&&
(
m
CacheFile
||
m
OpenPreView
)
&&
mHadPlay
&&
(
mOpenPreView
)
&&
GSYPreViewManager
.
instance
().
isSeekToComplete
())
{
GSYPreViewManager
.
instance
().
setSeekToComplete
(
false
);
int
time
=
progress
*
getDuration
()
/
100
;
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
浏览文件 @
ebe73dc5
...
...
@@ -628,7 +628,8 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mDialogSeekTime
.
setText
(
seekTime
);
mDialogTotalTime
.
setText
(
" / "
+
totalTime
);
mDialogProgressBar
.
setProgress
(
seekTimePosition
*
100
/
totalTimeDuration
);
if
(
totalTimeDuration
>
0
)
mDialogProgressBar
.
setProgress
(
seekTimePosition
*
100
/
totalTimeDuration
);
if
(
deltaX
>
0
)
{
mDialogIcon
.
setBackgroundResource
(
R
.
drawable
.
video_forward_icon
);
}
else
{
...
...
@@ -741,6 +742,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
StandardGSYVideoPlayer
gsyVideoPlayer
=
(
StandardGSYVideoPlayer
)
gsyBaseVideoPlayer
;
gsyVideoPlayer
.
setStandardVideoAllCallBack
(
mStandardVideoAllCallBack
);
gsyVideoPlayer
.
setNeedLockFull
(
isNeedLockFull
());
initFullUI
(
gsyVideoPlayer
);
}
return
gsyBaseVideoPlayer
;
}
...
...
@@ -763,6 +765,33 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
setStateAndUi
(
CURRENT_STATE_NORMAL
);
}
/**
* 全屏的UI逻辑
*/
private
void
initFullUI
(
StandardGSYVideoPlayer
standardGSYVideoPlayer
)
{
if
(
mBottomProgressDrawable
!=
null
)
{
standardGSYVideoPlayer
.
setBottomProgressBarDrawable
(
mBottomProgressDrawable
);
}
if
(
mBottomShowProgressDrawable
!=
null
&&
mBottomShowProgressThumbDrawable
!=
null
)
{
standardGSYVideoPlayer
.
setBottomShowProgressBarDrawable
(
mBottomShowProgressDrawable
,
mBottomShowProgressThumbDrawable
);
}
if
(
mVolumeProgressDrawable
!=
null
)
{
standardGSYVideoPlayer
.
setDialogVolumeProgressBar
(
mVolumeProgressDrawable
);
}
if
(
mDialogProgressBarDrawable
!=
null
)
{
standardGSYVideoPlayer
.
setDialogProgressBar
(
mDialogProgressBarDrawable
);
}
if
(
mDialogProgressHighLightColor
>=
0
&&
mDialogProgressNormalColor
>=
0
)
{
standardGSYVideoPlayer
.
setDialogProgressColor
(
mDialogProgressHighLightColor
,
mDialogProgressNormalColor
);
}
}
private
void
startDismissControlViewTimer
()
{
cancelDismissControlViewTimer
();
DISSMISS_CONTROL_VIEW_TIMER
=
new
Timer
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录