Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ac13
GSYVideoPlayer
提交
40e3de95
G
GSYVideoPlayer
项目概览
ac13
/
GSYVideoPlayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
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 搜索 >>
提交
40e3de95
编写于
1月 19, 2017
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v1.5.8
* 修改了锁定屏幕触摸功能再播放结束后的问题。
上级
544c388c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
50 addition
and
21 deletion
+50
-21
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
...om/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
+50
-21
未找到文件。
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
浏览文件 @
40e3de95
...
...
@@ -155,18 +155,11 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mLockScreen
.
setOnClickListener
(
new
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
if
(
mLockCurScreen
)
{
mLockScreen
.
setImageResource
(
R
.
drawable
.
unlock
);
mLockCurScreen
=
false
;
if
(
mOrientationUtils
!=
null
)
mOrientationUtils
.
setEnable
(
mRotateViewAuto
);
}
else
{
mLockScreen
.
setImageResource
(
R
.
drawable
.
lock
);
mLockCurScreen
=
true
;
if
(
mOrientationUtils
!=
null
)
mOrientationUtils
.
setEnable
(
false
);
hideAllWidget
();
if
(
mCurrentState
==
CURRENT_STATE_AUTO_COMPLETE
||
mCurrentState
==
CURRENT_STATE_ERROR
)
{
return
;
}
lockTouchLogic
();
if
(
mLockClickListener
!=
null
)
{
mLockClickListener
.
onClick
(
v
,
mLockCurScreen
);
}
...
...
@@ -423,7 +416,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
VISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
}
mThumbImageViewLayout
.
setVisibility
(
View
.
VISIBLE
);
mCoverImageView
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -439,7 +432,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
INVISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
VISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
ENDownloadView
enDownloadView
=
(
ENDownloadView
)
mLoadingProgressBar
;
ENDownloadView
enDownloadView
=
(
ENDownloadView
)
mLoadingProgressBar
;
if
(
enDownloadView
.
getCurrentState
()
==
ENDownloadView
.
STATE_PRE
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
start
();
}
...
...
@@ -468,7 +461,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
VISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
}
mThumbImageViewLayout
.
setVisibility
(
View
.
INVISIBLE
);
mCoverImageView
.
setVisibility
(
View
.
INVISIBLE
);
...
...
@@ -490,7 +483,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
VISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
}
mThumbImageViewLayout
.
setVisibility
(
View
.
INVISIBLE
);
//mCoverImageView.setVisibility(View.INVISIBLE);
...
...
@@ -514,7 +507,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
INVISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
VISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
ENDownloadView
enDownloadView
=
(
ENDownloadView
)
mLoadingProgressBar
;
ENDownloadView
enDownloadView
=
(
ENDownloadView
)
mLoadingProgressBar
;
if
(
enDownloadView
.
getCurrentState
()
==
ENDownloadView
.
STATE_PRE
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
start
();
}
...
...
@@ -532,7 +525,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
INVISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
VISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
ENDownloadView
enDownloadView
=
(
ENDownloadView
)
mLoadingProgressBar
;
ENDownloadView
enDownloadView
=
(
ENDownloadView
)
mLoadingProgressBar
;
if
(
enDownloadView
.
getCurrentState
()
==
ENDownloadView
.
STATE_PRE
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
start
();
}
...
...
@@ -551,7 +544,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
INVISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
}
mThumbImageViewLayout
.
setVisibility
(
View
.
INVISIBLE
);
mCoverImageView
.
setVisibility
(
View
.
INVISIBLE
);
...
...
@@ -566,7 +559,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
VISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
}
mThumbImageViewLayout
.
setVisibility
(
View
.
VISIBLE
);
mCoverImageView
.
setVisibility
(
View
.
INVISIBLE
);
...
...
@@ -582,7 +575,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
VISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
}
mThumbImageViewLayout
.
setVisibility
(
View
.
VISIBLE
);
mCoverImageView
.
setVisibility
(
View
.
INVISIBLE
);
...
...
@@ -598,7 +591,7 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mStartButton
.
setVisibility
(
View
.
VISIBLE
);
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
if
(
mLoadingProgressBar
instanceof
ENDownloadView
)
{
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
((
ENDownloadView
)
mLoadingProgressBar
).
reset
();
}
mThumbImageViewLayout
.
setVisibility
(
View
.
INVISIBLE
);
mCoverImageView
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -785,6 +778,24 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
}
@Override
public
void
onAutoCompletion
()
{
super
.
onAutoCompletion
();
if
(
mLockCurScreen
)
{
lockTouchLogic
();
mLockScreen
.
setVisibility
(
GONE
);
}
}
@Override
public
void
onError
(
int
what
,
int
extra
)
{
super
.
onError
(
what
,
extra
);
if
(
mLockCurScreen
)
{
lockTouchLogic
();
mLockScreen
.
setVisibility
(
GONE
);
}
}
@Override
public
GSYBaseVideoPlayer
startWindowFullscreen
(
Context
context
,
boolean
actionBar
,
boolean
statusBar
)
{
GSYBaseVideoPlayer
gsyBaseVideoPlayer
=
super
.
startWindowFullscreen
(
context
,
actionBar
,
statusBar
);
...
...
@@ -810,6 +821,24 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
return
gsyBaseVideoPlayer
;
}
/**
* 处理锁屏屏幕触摸逻辑
*/
private
void
lockTouchLogic
()
{
if
(
mLockCurScreen
)
{
mLockScreen
.
setImageResource
(
R
.
drawable
.
unlock
);
mLockCurScreen
=
false
;
if
(
mOrientationUtils
!=
null
)
mOrientationUtils
.
setEnable
(
mRotateViewAuto
);
}
else
{
mLockScreen
.
setImageResource
(
R
.
drawable
.
lock
);
mLockCurScreen
=
true
;
if
(
mOrientationUtils
!=
null
)
mOrientationUtils
.
setEnable
(
false
);
hideAllWidget
();
}
}
/**
* 初始化为正常状态
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录