Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ac13
GSYVideoPlayer
提交
53d9406b
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 搜索 >>
提交
53d9406b
编写于
3月 21, 2017
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改超时接口,增加注释 (2017-03-21)
上级
8bd4d5ad
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
6 deletion
+17
-6
README.md
README.md
+2
-2
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
...c/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
+15
-4
未找到文件。
README.md
浏览文件 @
53d9406b
...
...
@@ -41,7 +41,7 @@
```
#### 直接在module下的build.gradle添加
```
compile 'com.shuyu:GSYVideoPlayer:1.6.
0
'
compile 'com.shuyu:GSYVideoPlayer:1.6.
1
'
```
...
...
@@ -62,7 +62,7 @@ allprojects {
```
dependencies {
compile 'com.github.CarGuo:GSYVideoPlayer:v1.6.
0
'
compile 'com.github.CarGuo:GSYVideoPlayer:v1.6.
1
'
}
```
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
浏览文件 @
53d9406b
...
...
@@ -382,6 +382,9 @@ public class GSYVideoManager implements IMediaPlayer.OnPreparedListener, IMediaP
GSYModel
fb
=
new
GSYModel
(
url
,
mapHeadData
,
loop
,
speed
);
msg
.
obj
=
fb
;
mMediaHandler
.
sendMessage
(
msg
);
if
(
needTimeOutOther
)
{
startTimeOutBuffer
();
}
}
public
void
releaseMediaPlayer
()
{
...
...
@@ -404,6 +407,7 @@ public class GSYVideoManager implements IMediaPlayer.OnPreparedListener, IMediaP
mainThreadHandler
.
post
(
new
Runnable
()
{
@Override
public
void
run
()
{
cancelTimeOutBuffer
();
if
(
listener
!=
null
)
{
listener
().
onPrepared
();
}
...
...
@@ -623,14 +627,21 @@ public class GSYVideoManager implements IMediaPlayer.OnPreparedListener, IMediaP
/**
* 是否需要在buffer缓冲时,增加外部超时判断,目前对于刚开始超时还没效果
*
<p>
*
* 超时后会走onError接口,播放器通过onPlayError回调出
*
<p>
*
* 错误码为 : BUFFER_TIME_OUT_ERROR = -192
* (因为ijk的超时有时候无效)
*
* 由于onError之后执行GSYVideoPlayer的OnError,如果不想触发错误,
* 可以重载onError,在super之前拦截处理。
*
* public void onError(int what, int extra){
* do you want before super and return;
* super.onError(what, extra)
* }
*
* @param timeOut 超时时间,毫秒 默认8000
* @param needTimeOutOther 是否
开始
,默认关闭
* @param needTimeOutOther 是否
需要延时设置
,默认关闭
*/
public
void
setTimeOut
(
int
timeOut
,
boolean
needTimeOutOther
)
{
this
.
timeOut
=
timeOut
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录