Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ac13
GSYVideoPlayer
提交
e253daca
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 搜索 >>
提交
e253daca
编写于
7月 31, 2020
作者:
G
guoshuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加 GSYStateUiListener
上级
0782cc5c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
0 deletion
+41
-0
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java
...m/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java
+16
-0
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/listener/GSYStateUiListener.java
...com/shuyu/gsyvideoplayer/listener/GSYStateUiListener.java
+8
-0
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYVideoControlView.java
.../shuyu/gsyvideoplayer/video/base/GSYVideoControlView.java
+17
-0
未找到文件。
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/builder/GSYVideoOptionBuilder.java
浏览文件 @
e253daca
...
...
@@ -3,6 +3,7 @@ package com.shuyu.gsyvideoplayer.builder;
import
android.graphics.drawable.Drawable
;
import
android.view.View
;
import
com.shuyu.gsyvideoplayer.listener.GSYStateUiListener
;
import
com.shuyu.gsyvideoplayer.listener.GSYVideoProgressListener
;
import
com.shuyu.gsyvideoplayer.render.view.GSYVideoGLView
;
import
com.shuyu.gsyvideoplayer.render.effect.NoEffect
;
...
...
@@ -160,6 +161,9 @@ public class GSYVideoOptionBuilder {
//滑动dialog进度条样式
protected
Drawable
mDialogProgressBarDrawable
;
///状态监听
protected
GSYStateUiListener
mGSYStateUiListener
;
//滤镜
protected
GSYVideoGLView
.
ShaderInterface
mEffectFilter
=
new
NoEffect
();
...
...
@@ -537,6 +541,7 @@ public class GSYVideoOptionBuilder {
/**
* 是否需要覆盖拓展类型,目前只针对exoPlayer内核模式有效
*
* @param overrideExtension 比如传入 m3u8,mp4,avi 等类型
*/
public
GSYVideoOptionBuilder
setOverrideExtension
(
String
overrideExtension
)
{
...
...
@@ -575,6 +580,14 @@ public class GSYVideoOptionBuilder {
return
this
;
}
/***
* 状态监听
*/
public
GSYVideoOptionBuilder
setGSYStateUiListener
(
GSYStateUiListener
gsyStateUiListener
)
{
this
.
mGSYStateUiListener
=
gsyStateUiListener
;
return
this
;
}
public
void
build
(
StandardGSYVideoPlayer
gsyVideoPlayer
)
{
if
(
mBottomShowProgressDrawable
!=
null
&&
mBottomShowProgressThumbDrawable
!=
null
)
{
gsyVideoPlayer
.
setBottomShowProgressBarDrawable
(
mBottomShowProgressDrawable
,
mBottomShowProgressThumbDrawable
);
...
...
@@ -628,6 +641,9 @@ public class GSYVideoOptionBuilder {
if
(
mGSYVideoProgressListener
!=
null
)
{
gsyVideoPlayer
.
setGSYVideoProgressListener
(
mGSYVideoProgressListener
);
}
if
(
mGSYStateUiListener
!=
null
)
{
gsyVideoPlayer
.
setGSYStateUiListener
(
mGSYStateUiListener
);
}
gsyVideoPlayer
.
setOverrideExtension
(
mOverrideExtension
);
gsyVideoPlayer
.
setAutoFullWithSize
(
mAutoFullWithSize
);
gsyVideoPlayer
.
setRotateViewAuto
(
mRotateViewAuto
);
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/listener/GSYStateUiListener.java
0 → 100644
浏览文件 @
e253daca
package
com.shuyu.gsyvideoplayer.listener
;
/**
* 状态变化监听
*/
public
interface
GSYStateUiListener
{
void
onStateChanged
(
int
state
);
}
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYVideoControlView.java
浏览文件 @
e253daca
...
...
@@ -25,6 +25,7 @@ import android.widget.SeekBar;
import
android.widget.TextView
;
import
com.shuyu.gsyvideoplayer.R
;
import
com.shuyu.gsyvideoplayer.listener.GSYStateUiListener
;
import
com.shuyu.gsyvideoplayer.listener.GSYVideoProgressListener
;
import
com.shuyu.gsyvideoplayer.listener.LockClickListener
;
import
com.shuyu.gsyvideoplayer.utils.CommonUtil
;
...
...
@@ -173,6 +174,8 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
//点击锁屏的回调
protected
LockClickListener
mLockClickListener
;
protected
GSYStateUiListener
mGsyStateUiListener
;
protected
GSYVideoProgressListener
mGSYVideoProgressListener
;
public
GSYVideoControlView
(
@NonNull
Context
context
)
{
...
...
@@ -361,6 +364,9 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
break
;
}
resolveUIState
(
state
);
if
(
mGsyStateUiListener
!=
null
)
{
mGsyStateUiListener
.
onStateChanged
(
state
);
}
}
...
...
@@ -1374,4 +1380,15 @@ public abstract class GSYVideoControlView extends GSYVideoView implements View.O
public
void
setShowDragProgressTextOnSeekBar
(
boolean
showDragProgressTextOnSeekBar
)
{
isShowDragProgressTextOnSeekBar
=
showDragProgressTextOnSeekBar
;
}
/***
* 状态监听
*/
public
GSYStateUiListener
getGSYStateUiListener
()
{
return
mGsyStateUiListener
;
}
public
void
setGSYStateUiListener
(
GSYStateUiListener
gsyStateUiListener
)
{
this
.
mGsyStateUiListener
=
gsyStateUiListener
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录