Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ac13
GSYVideoPlayer
提交
3137e452
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 搜索 >>
提交
3137e452
编写于
11月 18, 2020
作者:
G
guoshuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update support isNeedRotateWithSystem with Detail
上级
93684300
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
7 deletion
+13
-7
app/src/main/java/com/example/gsyvideoplayer/DetailPlayer.java
...rc/main/java/com/example/gsyvideoplayer/DetailPlayer.java
+9
-3
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYBaseADActivityDetail.java
...ava/com/shuyu/gsyvideoplayer/GSYBaseADActivityDetail.java
+2
-2
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYBaseActivityDetail.java
.../java/com/shuyu/gsyvideoplayer/GSYBaseActivityDetail.java
+2
-2
未找到文件。
app/src/main/java/com/example/gsyvideoplayer/DetailPlayer.java
浏览文件 @
3137e452
...
...
@@ -149,9 +149,10 @@ public class DetailPlayer extends AppCompatActivity {
Debuger
.
printfError
(
"***** onPrepared **** "
+
objects
[
1
]);
super
.
onPrepared
(
url
,
objects
);
//开始播放了才能旋转和全屏
orientationUtils
.
setEnable
(
true
);
orientationUtils
.
setEnable
(
needRotateSystem
()
);
isPlay
=
true
;
//设置 seek 的临近帧。
if
(
detailPlayer
.
getGSYVideoManager
().
getPlayer
()
instanceof
Exo2PlayerManager
)
{
((
Exo2PlayerManager
)
detailPlayer
.
getGSYVideoManager
().
getPlayer
()).
setSeekParameter
(
SeekParameters
.
NEXT_SYNC
);
...
...
@@ -270,7 +271,7 @@ public class DetailPlayer extends AppCompatActivity {
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
)
{
detailPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
,
true
,
true
);
detailPlayer
.
onConfigurationChanged
(
this
,
newConfig
,
needRotateSystem
()
?
orientationUtils
:
null
,
true
,
true
);
}
}
...
...
@@ -323,7 +324,8 @@ public class DetailPlayer extends AppCompatActivity {
//String url = "http://video1.dgtle.com/backend%2F2020%2F3%2F0%2F%E6%88%91%E6%B2%A1%E6%9C%89%E7%BB%99%E4%B8%80%E5%8A%A08Pro%E5%81%9A%E8%AF%84%E6%B5%8B_%E5%8D%B4%E5%B8%A6%E7%9D%80%E5%AE%83%E6%BC%82%E6%B5%81.mp4_1080.mp4";
//String url = "http://yongtaizx.xyz/20191230/t2Axgh3k/index.m3u8";
//String url = "http://123.56.109.212:8035/users/bfe52074fba74247853caa764b522731/films/orig/aa4c3451-0468-452a-a189-bd064a1963e5-鹿鼎记下.mp4";
String
url
=
"https://pointshow.oss-cn-hangzhou.aliyuncs.com/McTk51586843620689.mp4"
;
//String url = "http://static.hnyequ.cn/yequ_iOS/4940735da1227890e6a261937223e0d2_828x1472.mp4";
String
url
=
"https://tx.hls.huya.com/src/78941969-2579769454-11080025436149776384-3144993630-10057-A-0-1-imgplus_2000.m3u8?wsSecret=3e6b5903368d02d0c591a57a07940cca&wsTime=5f4ca52f&u=0&seqid=15987721445850596&ctype=tars_mobile&fs=bgct&sphdcdn=al_7-tx_3-js_3-ws_7-bd_2-hw_2&sphdDC=huya&sphd=264_*&t=103"
;
//String url = "http://pointshow.oss-cn-hangzhou.aliyuncs.com/transcode/ORIGINAL/Mnbc61586842828593.mp4";
//ssl error
//String url = "https://file.shftz.cn:8443/filesystem/download/10/2019/3/26/ce2c7c66-e9eb-42be-adf6-f9008385ea8c.mov/play";
...
...
@@ -389,4 +391,8 @@ public class DetailPlayer extends AppCompatActivity {
intent
.
setType
(
"video/*"
);
startActivityForResult
(
intent
,
READ_REQUEST_CODE
);
}
private
boolean
needRotateSystem
()
{
return
false
;
}
}
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYBaseADActivityDetail.java
浏览文件 @
3137e452
...
...
@@ -137,10 +137,10 @@ public abstract class GSYBaseADActivityDetail<T extends GSYBaseVideoPlayer, R ex
public
void
onConfigurationChanged
(
Configuration
newConfig
)
{
//如果旋转了就全屏
boolean
backUpIsPlay
=
isPlay
;
if
(!
isPause
&&
getGSYADVideoPlayer
().
getVisibility
()
==
View
.
VISIBLE
&&
isNeedRotateWithSystem
()
)
{
if
(!
isPause
&&
getGSYADVideoPlayer
().
getVisibility
()
==
View
.
VISIBLE
)
{
if
(
isADStarted
())
{
isPlay
=
false
;
getGSYADVideoPlayer
().
getCurrentPlayer
().
onConfigurationChanged
(
this
,
newConfig
,
mADOrientationUtils
,
hideActionBarWhenFull
(),
hideStatusBarWhenFull
());
getGSYADVideoPlayer
().
getCurrentPlayer
().
onConfigurationChanged
(
this
,
newConfig
,
isNeedRotateWithSystem
()
?
mADOrientationUtils
:
null
,
hideActionBarWhenFull
(),
hideStatusBarWhenFull
());
}
}
super
.
onConfigurationChanged
(
newConfig
);
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYBaseActivityDetail.java
浏览文件 @
3137e452
...
...
@@ -118,8 +118,8 @@ public abstract class GSYBaseActivityDetail<T extends GSYBaseVideoPlayer> extend
public
void
onConfigurationChanged
(
Configuration
newConfig
)
{
super
.
onConfigurationChanged
(
newConfig
);
//如果旋转了就全屏
if
(
isPlay
&&
!
isPause
&&
isNeedRotateWithSystem
()
)
{
getGSYVideoPlayer
().
onConfigurationChanged
(
this
,
newConfig
,
orientationUtils
,
hideActionBarWhenFull
(),
hideStatusBarWhenFull
());
if
(
isPlay
&&
!
isPause
)
{
getGSYVideoPlayer
().
onConfigurationChanged
(
this
,
newConfig
,
isNeedRotateWithSystem
()
?
orientationUtils
:
null
,
hideActionBarWhenFull
(),
hideStatusBarWhenFull
());
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录