Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ac13
GSYVideoPlayer
提交
8e6106d6
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 搜索 >>
提交
8e6106d6
编写于
11月 28, 2016
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.2.7
上级
b672fec8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
16 deletion
+58
-16
README.md
README.md
+5
-2
gradle.properties
gradle.properties
+1
-1
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java
...rc/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java
+12
-2
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/CommonUtil.java
.../main/java/com/shuyu/gsyvideoplayer/utils/CommonUtil.java
+38
-11
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
...va/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
+2
-0
未找到文件。
README.md
浏览文件 @
8e6106d6
...
...
@@ -17,13 +17,13 @@
<dependency>
<groupId>com.shuyu</groupId>
<artifactId>gsyVideoPlayer</artifactId>
<version>1.2.
6
</version>
<version>1.2.
7
</version>
<type>pom</type>
</dependency>
```
```
compile 'com.shuyu:gsyVideoPlayer:1.2.
6
'
compile 'com.shuyu:gsyVideoPlayer:1.2.
7
'
```
## 效果,录屏下的屏幕旋转和实际有些出入
...
...
@@ -44,6 +44,9 @@ compile 'com.shuyu:gsyVideoPlayer:1.2.6'
<img
src=
"https://github.com/CarGuo/GSYVideoPlayer/blob/master/04.gif"
width=
"240px"
height=
"426px"
/>
### 1.2.7 修改了循环播放的时候,重新播放不弹出控制UI;修改了FragmentActivity的actionBar问题
### 1.2.6 修正了StandardGSYVideoPlayer的接口全屏回调问题,增加了循环播放的接口
```
...
...
gradle.properties
浏览文件 @
8e6106d6
...
...
@@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx1536m
BINTRAY_USER
=
BINTRAY_KEY
=
PROJ_GROUP
=
com.shuyu
PROJ_VERSION
=
1.2.
6
PROJ_VERSION
=
1.2.
7
PROJ_NAME
=
gsyVideo
PROJ_WEBSITEURL
=
hhttps://github.com/CarGuo/GSYVideoPlayer
PROJ_ISSUETRACKERURL
=
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoPlayer.java
浏览文件 @
8e6106d6
...
...
@@ -678,6 +678,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
Debuger
.
printfLog
(
"onPrepared"
);
mVideoAllCallBack
.
onPrepared
(
mUrl
,
mObjects
);
}
mHadPlay
=
true
;
}
@Override
...
...
@@ -760,10 +761,18 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
public
void
onInfo
(
int
what
,
int
extra
)
{
if
(
what
==
MediaPlayer
.
MEDIA_INFO_BUFFERING_START
)
{
BACKUP_PLAYING_BUFFERING_STATE
=
mCurrentState
;
setStateAndUi
(
CURRENT_STATE_PLAYING_BUFFERING_START
);
if
(
mLooping
&&
mHadPlay
)
{
//循环在播放的不显示
}
else
{
setStateAndUi
(
CURRENT_STATE_PLAYING_BUFFERING_START
);
}
}
else
if
(
what
==
MediaPlayer
.
MEDIA_INFO_BUFFERING_END
)
{
if
(
BACKUP_PLAYING_BUFFERING_STATE
!=
-
1
)
{
setStateAndUi
(
BACKUP_PLAYING_BUFFERING_STATE
);
if
(
mLooping
&&
mHadPlay
)
{
//循环在播放的不显示
}
else
{
setStateAndUi
(
BACKUP_PLAYING_BUFFERING_STATE
);
}
BACKUP_PLAYING_BUFFERING_STATE
=
-
1
;
}
}
else
if
(
what
==
IMediaPlayer
.
MEDIA_INFO_VIDEO_ROTATION_CHANGED
)
{
...
...
@@ -902,6 +911,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
(
System
.
currentTimeMillis
()
-
CLICK_QUIT_FULLSCREEN_TIME
)
>
FULL_SCREEN_NORMAL_DELAY
)
{
releaseAllVideos
();
}
mHadPlay
=
false
;
}
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/CommonUtil.java
浏览文件 @
8e6106d6
...
...
@@ -5,6 +5,7 @@ import android.content.Context;
import
android.content.ContextWrapper
;
import
android.net.ConnectivityManager
;
import
android.net.NetworkInfo
;
import
android.support.v4.app.FragmentActivity
;
import
android.support.v7.app.ActionBar
;
import
android.support.v7.app.AppCompatActivity
;
import
android.support.v7.internal.view.ContextThemeWrapper
;
...
...
@@ -99,28 +100,54 @@ public class CommonUtil {
public
static
void
hideSupportActionBar
(
Context
context
,
boolean
actionBar
,
boolean
statusBar
)
{
if
(
actionBar
)
{
ActionBar
ab
=
CommonUtil
.
getAppCompActivity
(
context
).
getSupportActionBar
();
if
(
ab
!=
null
)
{
ab
.
setShowHideAnimationEnabled
(
false
);
ab
.
hide
();
if
(
context
instanceof
FragmentActivity
)
{
FragmentActivity
fragmentActivity
=
(
FragmentActivity
)
context
;
android
.
app
.
ActionBar
ab
=
fragmentActivity
.
getActionBar
();
if
(
ab
!=
null
)
{
ab
.
hide
();
}
}
else
{
ActionBar
ab
=
CommonUtil
.
getAppCompActivity
(
context
).
getSupportActionBar
();
if
(
ab
!=
null
)
{
ab
.
setShowHideAnimationEnabled
(
false
);
ab
.
hide
();
}
}
}
if
(
statusBar
)
{
CommonUtil
.
getAppCompActivity
(
context
).
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
if
(
context
instanceof
FragmentActivity
)
{
FragmentActivity
fragmentActivity
=
(
FragmentActivity
)
context
;
fragmentActivity
.
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
}
else
{
CommonUtil
.
getAppCompActivity
(
context
).
getWindow
().
setFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
,
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
}
}
}
public
static
void
showSupportActionBar
(
Context
context
,
boolean
actionBar
,
boolean
statusBar
)
{
if
(
actionBar
)
{
ActionBar
ab
=
CommonUtil
.
getAppCompActivity
(
context
).
getSupportActionBar
();
if
(
ab
!=
null
)
{
ab
.
setShowHideAnimationEnabled
(
false
);
ab
.
show
();
if
(
context
instanceof
FragmentActivity
)
{
FragmentActivity
fragmentActivity
=
(
FragmentActivity
)
context
;
android
.
app
.
ActionBar
ab
=
fragmentActivity
.
getActionBar
();
if
(
ab
!=
null
)
{
ab
.
show
();
}
}
else
{
ActionBar
ab
=
CommonUtil
.
getAppCompActivity
(
context
).
getSupportActionBar
();
if
(
ab
!=
null
)
{
ab
.
setShowHideAnimationEnabled
(
false
);
ab
.
show
();
}
}
}
if
(
statusBar
)
{
CommonUtil
.
getAppCompActivity
(
context
).
getWindow
().
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
if
(
context
instanceof
FragmentActivity
)
{
FragmentActivity
fragmentActivity
=
(
FragmentActivity
)
context
;
fragmentActivity
.
getWindow
().
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
}
else
{
CommonUtil
.
getAppCompActivity
(
context
).
getWindow
().
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_FULLSCREEN
);
}
}
}
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
浏览文件 @
8e6106d6
...
...
@@ -67,6 +67,8 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
protected
boolean
mLooping
=
false
;
//循环
protected
boolean
mHadPlay
=
false
;
//是否播放过
protected
Context
mContext
;
protected
String
mOriginUrl
;
//原来的url
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录