Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
GSYVideoPlayer
提交
4e708d89
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 搜索 >>
提交
4e708d89
编写于
12月 02, 2016
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.3.7 优化了暂停的时候退后台黑色的问题
上级
2cb1fb31
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
38 addition
and
7 deletion
+38
-7
README.md
README.md
+3
-3
app/src/main/java/com/example/gsyvideoplayer/SampleExtendsPlayer.java
.../java/com/example/gsyvideoplayer/SampleExtendsPlayer.java
+1
-0
gradle.properties
gradle.properties
+1
-1
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java
...rc/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java
+21
-2
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
...om/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
+12
-1
未找到文件。
README.md
浏览文件 @
4e708d89
...
...
@@ -21,13 +21,13 @@
<dependency>
<groupId>com.shuyu</groupId>
<artifactId>gsyVideoPlayer</artifactId>
<version>1.3.
5
</version>
<version>1.3.
7
</version>
<type>pom</type>
</dependency>
```
```
compile 'com.shuyu:gsyVideoPlayer:1.3.
5
'
compile 'com.shuyu:gsyVideoPlayer:1.3.
7
'
```
## 效果,录屏下的屏幕旋转和实际有些出入
...
...
@@ -47,7 +47,7 @@ compile 'com.shuyu:gsyVideoPlayer:1.3.5'
*
<h4>
3、详情模式
</h4>
<img
src=
"https://github.com/CarGuo/GSYVideoPlayer/blob/master/04.gif"
width=
"240px"
height=
"426px"
/>
### 1.3.7 优化了弹出框;优化了暂停的时候
全屏/恢复全屏会是黑色的
问题
### 1.3.7 优化了弹出框;优化了暂停的时候
(全屏/恢复全屏/退到)会是黑色的问题;解决了暂停的时候拖动进度条
问题
### 1.3.6 区分了没有网络和没有wifi的提示;更新了Demo detailPlayer直接旋转全屏,返回正常的详情效果
...
...
app/src/main/java/com/example/gsyvideoplayer/SampleExtendsPlayer.java
浏览文件 @
4e708d89
...
...
@@ -8,6 +8,7 @@ import android.view.View;
import
com.shuyu.gsyvideoplayer.GSYVideoPlayer
;
/**
* Created by shuyu on 2016/11/18.
* 还是建议继承StandardGSYVideoPlayer
*/
public
class
SampleExtendsPlayer
extends
GSYVideoPlayer
{
...
...
gradle.properties
浏览文件 @
4e708d89
...
...
@@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx1536m
BINTRAY_USER
=
BINTRAY_KEY
=
PROJ_GROUP
=
com.shuyu
PROJ_VERSION
=
1.3.
6
PROJ_VERSION
=
1.3.
7
PROJ_NAME
=
gsyVideo
PROJ_WEBSITEURL
=
hhttps://github.com/CarGuo/GSYVideoPlayer
PROJ_ISSUETRACKERURL
=
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java
浏览文件 @
4e708d89
...
...
@@ -30,7 +30,6 @@ import com.shuyu.gsyvideoplayer.utils.StorageUtils;
import
com.shuyu.gsyvideoplayer.video.GSYBaseVideoPlayer
;
import
java.io.File
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Timer
;
import
java.util.TimerTask
;
...
...
@@ -259,6 +258,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
if
(
isCurrentMediaListener
())
{
cancelProgressTimer
();
GSYVideoManager
.
instance
().
releaseMediaPlayer
();
releasePauseCoverAndBitmap
();
}
if
(
mAudioManager
!=
null
)
{
mAudioManager
.
abandonAudioFocus
(
onAudioFocusChangeListener
);
...
...
@@ -666,6 +666,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
&&
!
mFullPauseBitmap
.
isRecycled
())
{
mCoverImageView
.
setImageResource
(
R
.
drawable
.
empty_drawable
);
mCoverImageView
.
setVisibility
(
GONE
);
//如果在这里销毁,可能会draw a recycler bitmap error
mFullPauseBitmap
=
null
;
}
}
catch
(
Exception
e
)
{
...
...
@@ -673,6 +674,24 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
}
}
/**
* 销毁暂停切换显示的bitmap
*/
protected
void
releasePauseCoverAndBitmap
()
{
try
{
if
(
mCurrentState
!=
CURRENT_STATE_PAUSE
&&
mFullPauseBitmap
!=
null
&&
!
mFullPauseBitmap
.
isRecycled
())
{
mCoverImageView
.
setImageResource
(
R
.
drawable
.
empty_drawable
);
mCoverImageView
.
setVisibility
(
GONE
);
mFullPauseBitmap
.
recycle
();
mFullPauseBitmap
=
null
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
protected
void
showProgressDialog
(
float
deltaX
,
String
seekTime
,
int
seekTimePosition
,
String
totalTime
,
int
totalTimeDuration
)
{
...
...
@@ -726,7 +745,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
mVideoAllCallBack
.
onClickSeekbar
(
mUrl
,
mObjects
);
}
}
if
(
GSYVideoManager
.
instance
().
getMediaPlayer
()
!=
null
&&
GSYVideoManager
.
instance
().
getMediaPlayer
().
isPlaying
()
)
{
if
(
GSYVideoManager
.
instance
().
getMediaPlayer
()
!=
null
&&
mHadPlay
)
{
int
time
=
seekBar
.
getProgress
()
*
getDuration
()
/
100
;
GSYVideoManager
.
instance
().
getMediaPlayer
().
seekTo
(
time
);
}
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/StandardGSYVideoPlayer.java
浏览文件 @
4e708d89
...
...
@@ -412,15 +412,17 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
mLoadingProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
mLoadingProgressBar
.
reset
();
mThumbImageViewLayout
.
setVisibility
(
View
.
INVISIBLE
);
mCoverImageView
.
setVisibility
(
View
.
INVISIBLE
);
//
mCoverImageView.setVisibility(View.INVISIBLE);
mBottomProgressBar
.
setVisibility
(
View
.
INVISIBLE
);
updateStartImage
();
updatePauseCover
();
}
private
void
changeUiToPauseClear
()
{
Debuger
.
printfLog
(
"changeUiToPauseClear"
);
changeUiToClear
();
mBottomProgressBar
.
setVisibility
(
View
.
VISIBLE
);
updatePauseCover
();
}
private
void
changeUiToPlayingBufferingShow
()
{
...
...
@@ -514,6 +516,15 @@ public class StandardGSYVideoPlayer extends GSYVideoPlayer {
}
}
private
void
updatePauseCover
()
{
if
(
mFullPauseBitmap
==
null
||
mFullPauseBitmap
.
isRecycled
())
{
Point
point
=
CommonUtil
.
getPauseBitmapSize
(
getWidth
(),
getHeight
());
mFullPauseBitmap
=
mTextureView
.
getBitmap
(
point
.
x
,
point
.
y
);
}
showPauseCover
();
}
@Override
protected
void
showProgressDialog
(
float
deltaX
,
String
seekTime
,
int
seekTimePosition
,
String
totalTime
,
int
totalTimeDuration
)
{
super
.
showProgressDialog
(
deltaX
,
seekTime
,
seekTimePosition
,
totalTime
,
totalTimeDuration
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录