Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_26386469
GSYVideoPlayer
提交
0ae79fdd
G
GSYVideoPlayer
项目概览
qq_26386469
/
GSYVideoPlayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
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 搜索 >>
提交
0ae79fdd
编写于
8月 28, 2017
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改了demo (2017-08-28)
上级
b496a434
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
36 addition
and
91 deletion
+36
-91
app/src/main/java/com/example/gsyvideoplayer/DanmkuVideoActivity.java
.../java/com/example/gsyvideoplayer/DanmkuVideoActivity.java
+1
-13
app/src/main/java/com/example/gsyvideoplayer/DetailControlActivity.java
...ava/com/example/gsyvideoplayer/DetailControlActivity.java
+1
-13
app/src/main/java/com/example/gsyvideoplayer/DetailListPlayer.java
...ain/java/com/example/gsyvideoplayer/DetailListPlayer.java
+1
-13
app/src/main/java/com/example/gsyvideoplayer/DetailMoreTypeActivity.java
...va/com/example/gsyvideoplayer/DetailMoreTypeActivity.java
+1
-13
app/src/main/java/com/example/gsyvideoplayer/DetailPlayer.java
...rc/main/java/com/example/gsyvideoplayer/DetailPlayer.java
+1
-13
app/src/main/java/com/example/gsyvideoplayer/InputUrlDetailActivity.java
...va/com/example/gsyvideoplayer/InputUrlDetailActivity.java
+1
-13
app/src/main/java/com/example/gsyvideoplayer/WebDetailActivity.java
...in/java/com/example/gsyvideoplayer/WebDetailActivity.java
+1
-13
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYBaseVideoPlayer.java
...m/shuyu/gsyvideoplayer/video/base/GSYBaseVideoPlayer.java
+29
-0
未找到文件。
app/src/main/java/com/example/gsyvideoplayer/DanmkuVideoActivity.java
浏览文件 @
0ae79fdd
...
...
@@ -168,19 +168,7 @@ public class DanmkuVideoActivity extends AppCompatActivity {
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
)
{
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
danmakuVideoPlayer
.
isIfCurrentIsFullscreen
())
{
danmakuVideoPlayer
.
startWindowFullscreen
(
DanmkuVideoActivity
.
this
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
danmakuVideoPlayer
.
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
this
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
danmakuVideoPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
);
}
}
...
...
app/src/main/java/com/example/gsyvideoplayer/DetailControlActivity.java
浏览文件 @
0ae79fdd
...
...
@@ -184,19 +184,7 @@ public class DetailControlActivity extends AppCompatActivity {
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
)
{
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
detailPlayer
.
isIfCurrentIsFullscreen
())
{
detailPlayer
.
startWindowFullscreen
(
DetailControlActivity
.
this
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
detailPlayer
.
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
this
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
detailPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
);
}
}
...
...
app/src/main/java/com/example/gsyvideoplayer/DetailListPlayer.java
浏览文件 @
0ae79fdd
...
...
@@ -174,19 +174,7 @@ public class DetailListPlayer extends AppCompatActivity {
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
)
{
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
detailPlayer
.
isIfCurrentIsFullscreen
())
{
detailPlayer
.
startWindowFullscreen
(
DetailListPlayer
.
this
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
detailPlayer
.
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
this
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
detailPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
);
}
}
...
...
app/src/main/java/com/example/gsyvideoplayer/DetailMoreTypeActivity.java
浏览文件 @
0ae79fdd
...
...
@@ -179,19 +179,7 @@ public class DetailMoreTypeActivity extends AppCompatActivity{
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
)
{
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
detailPlayer
.
isIfCurrentIsFullscreen
())
{
detailPlayer
.
startWindowFullscreen
(
DetailMoreTypeActivity
.
this
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
detailPlayer
.
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
this
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
detailPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
);
}
}
...
...
app/src/main/java/com/example/gsyvideoplayer/DetailPlayer.java
浏览文件 @
0ae79fdd
...
...
@@ -198,19 +198,7 @@ public class DetailPlayer extends AppCompatActivity {
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
)
{
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
detailPlayer
.
isIfCurrentIsFullscreen
())
{
detailPlayer
.
startWindowFullscreen
(
DetailPlayer
.
this
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
detailPlayer
.
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
this
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
detailPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
);
}
}
...
...
app/src/main/java/com/example/gsyvideoplayer/InputUrlDetailActivity.java
浏览文件 @
0ae79fdd
...
...
@@ -176,19 +176,7 @@ public class InputUrlDetailActivity extends AppCompatActivity {
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
)
{
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
detailPlayer
.
isIfCurrentIsFullscreen
())
{
detailPlayer
.
startWindowFullscreen
(
InputUrlDetailActivity
.
this
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
detailPlayer
.
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
this
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
detailPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
);
}
}
...
...
app/src/main/java/com/example/gsyvideoplayer/WebDetailActivity.java
浏览文件 @
0ae79fdd
...
...
@@ -200,19 +200,7 @@ public class WebDetailActivity extends AppCompatActivity {
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
&&
!
isSamll
)
{
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
webPlayer
.
isIfCurrentIsFullscreen
())
{
webPlayer
.
startWindowFullscreen
(
WebDetailActivity
.
this
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
webPlayer
.
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
this
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
webPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
);
}
}
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/base/GSYBaseVideoPlayer.java
浏览文件 @
0ae79fdd
...
...
@@ -2,6 +2,8 @@ package com.shuyu.gsyvideoplayer.video.base;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.pm.ActivityInfo
;
import
android.content.res.Configuration
;
import
android.graphics.Color
;
import
android.graphics.Point
;
import
android.util.AttributeSet
;
...
...
@@ -17,6 +19,7 @@ import com.shuyu.gsyvideoplayer.SmallVideoTouch;
import
com.shuyu.gsyvideoplayer.utils.CommonUtil
;
import
com.shuyu.gsyvideoplayer.utils.Debuger
;
import
com.shuyu.gsyvideoplayer.utils.OrientationUtils
;
import
com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
;
import
com.transitionseverywhere.TransitionManager
;
import
java.lang.reflect.Constructor
;
...
...
@@ -396,6 +399,32 @@ public abstract class GSYBaseVideoPlayer extends GSYVideoControlView {
/************************* 开放接口 *************************/
/**
* 旋转处理
*
* @param activity 页面
* @param newConfig 配置
* @param orientationUtils 旋转工具类
*/
public
void
onConfigurationChanged
(
Activity
activity
,
Configuration
newConfig
,
OrientationUtils
orientationUtils
)
{
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
newConfig
.
orientation
==
ActivityInfo
.
SCREEN_ORIENTATION_USER
)
{
if
(!
isIfCurrentIsFullscreen
())
{
startWindowFullscreen
(
activity
,
true
,
true
);
}
}
else
{
//新版本isIfCurrentIsFullscreen的标志位内部提前设置了,所以不会和手动点击冲突
if
(
isIfCurrentIsFullscreen
())
{
StandardGSYVideoPlayer
.
backFromWindowFull
(
activity
);
}
if
(
orientationUtils
!=
null
)
{
orientationUtils
.
setEnable
(
true
);
}
}
}
/**
* 利用window层播放全屏效果
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录