Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
GSYVideoPlayer
提交
f0cf7bb9
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 搜索 >>
提交
f0cf7bb9
编写于
6月 24, 2017
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加旋转使能后是否跟随系统设置 (2017-06-24)
上级
54d28fd8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
47 addition
and
3 deletion
+47
-3
UPDATE_VERSION.md
UPDATE_VERSION.md
+12
-0
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/OrientationUtils.java
...java/com/shuyu/gsyvideoplayer/utils/OrientationUtils.java
+18
-3
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
...va/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
+17
-0
未找到文件。
UPDATE_VERSION.md
浏览文件 @
f0cf7bb9
## 下方个版本说明,可以当做简单的wiki使用~,效果可参考DEMO。
### 1.6.8(2017-06-24)
*
fix listVideoUtils title错乱问题
*
fix setSpeed无法重置的问题
*
增加旋转使能后是否跟随系统设置
```
/**
* 是否更新系统旋转,false的话,系统禁止旋转也会跟着旋转
* @param rotateWithSystem 默认true
*/
public void setRotateWithSystem(boolean rotateWithSystem)
```
### 1.6.7(2017-06-16)
*
fix bug #265,全屏按返回按键之后的虚拟按键显示问题
*
so编译配置增加protocol crypto
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/OrientationUtils.java
浏览文件 @
f0cf7bb9
...
...
@@ -18,12 +18,14 @@ public class OrientationUtils {
private
Activity
activity
;
private
GSYBaseVideoPlayer
gsyVideoPlayer
;
private
OrientationEventListener
orientationEventListener
;
private
int
screenType
=
ActivityInfo
.
SCREEN_ORIENTATION_PORTRAIT
;
private
OrientationEventListener
orientationEventListener
;
private
boolean
mClick
,
mClickLand
,
mClickPort
;
private
int
mIsLand
;
private
boolean
mClick
,
mClickLand
,
mClickPort
;
private
boolean
mEnable
=
true
;
private
boolean
mRotateWithSystem
=
true
;
//是否跟随系统
/**
* @param activity
...
...
@@ -40,7 +42,7 @@ public class OrientationUtils {
@Override
public
void
onOrientationChanged
(
int
rotation
)
{
boolean
autoRotateOn
=
(
android
.
provider
.
Settings
.
System
.
getInt
(
activity
.
getContentResolver
(),
Settings
.
System
.
ACCELEROMETER_ROTATION
,
0
)
==
1
);
if
(!
autoRotateOn
)
{
if
(!
autoRotateOn
&&
mRotateWithSystem
)
{
//if (mIsLand == 0) {
return
;
//}
...
...
@@ -213,4 +215,17 @@ public class OrientationUtils {
public
void
setScreenType
(
int
screenType
)
{
this
.
screenType
=
screenType
;
}
public
boolean
isRotateWithSystem
()
{
return
mRotateWithSystem
;
}
/**
* 是否更新系统旋转,false的话,系统禁止旋转也会跟着旋转
* @param rotateWithSystem 默认true
*/
public
void
setRotateWithSystem
(
boolean
rotateWithSystem
)
{
this
.
mRotateWithSystem
=
rotateWithSystem
;
}
}
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
浏览文件 @
f0cf7bb9
...
...
@@ -101,6 +101,8 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
protected
boolean
mShowPauseCover
=
true
;
//是否显示暂停图片
protected
boolean
mRotateWithSystem
=
true
;
//旋转使能后是否跟随系统设置
protected
Context
mContext
;
protected
String
mOriginUrl
;
//原来的url
...
...
@@ -211,6 +213,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
gsyVideoPlayer
.
setIfCurrentIsFullscreen
(
true
);
mOrientationUtils
=
new
OrientationUtils
((
Activity
)
context
,
gsyVideoPlayer
);
mOrientationUtils
.
setEnable
(
mRotateViewAuto
);
mOrientationUtils
.
setRotateWithSystem
(
mRotateWithSystem
);
gsyVideoPlayer
.
mOrientationUtils
=
mOrientationUtils
;
if
(
isShowFullAnimation
())
{
...
...
@@ -369,6 +372,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
gsyVideoPlayer
.
mRotate
=
mRotate
;
gsyVideoPlayer
.
mShowPauseCover
=
mShowPauseCover
;
gsyVideoPlayer
.
mSeekRatio
=
mSeekRatio
;
gsyVideoPlayer
.
mRotateWithSystem
=
mRotateWithSystem
;
gsyVideoPlayer
.
setUp
(
mOriginUrl
,
mCache
,
mCachePath
,
mMapHeadData
,
mObjects
);
gsyVideoPlayer
.
setStateAndUi
(
mCurrentState
);
gsyVideoPlayer
.
addTextureView
();
...
...
@@ -852,4 +856,17 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
return
mSeekRatio
;
}
public
boolean
isRotateWithSystem
()
{
return
mRotateWithSystem
;
}
/**
* 是否更新系统旋转,false的话,系统禁止旋转也会跟着旋转
* @param rotateWithSystem 默认true
*/
public
void
setRotateWithSystem
(
boolean
rotateWithSystem
)
{
this
.
mRotateWithSystem
=
rotateWithSystem
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录