Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ac13
GSYVideoPlayer
提交
bebf0c9d
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 搜索 >>
提交
bebf0c9d
编写于
11月 20, 2016
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.1.6
上级
f9b58da8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
195 addition
and
23 deletion
+195
-23
README.md
README.md
+14
-2
gradle.properties
gradle.properties
+1
-1
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
...c/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
+0
-1
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/ListVideoUtil.java
...in/java/com/shuyu/gsyvideoplayer/utils/ListVideoUtil.java
+161
-17
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
...va/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
+19
-2
未找到文件。
README.md
浏览文件 @
bebf0c9d
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
<dependency>
<dependency>
<groupId>com.shuyu</groupId>
<groupId>com.shuyu</groupId>
<artifactId>gsyVideoPlayer</artifactId>
<artifactId>gsyVideoPlayer</artifactId>
<version>1.1.
5
</version>
<version>1.1.
6
</version>
<type>pom</type>
<type>pom</type>
</dependency>
</dependency>
```
```
```
```
compile 'com.shuyu:gsyVideoPlayer:1.1.
5
'
compile 'com.shuyu:gsyVideoPlayer:1.1.
6
'
```
```
## 效果,录屏下的屏幕旋转和实际有些出入
## 效果,录屏下的屏幕旋转和实际有些出入
...
@@ -42,6 +42,18 @@ compile 'com.shuyu:gsyVideoPlayer:1.1.5'
...
@@ -42,6 +42,18 @@ compile 'com.shuyu:gsyVideoPlayer:1.1.5'
*
<h4>
3、详情模式
</h4>
*
<h4>
3、详情模式
</h4>
<img
src=
"https://github.com/CarGuo/GSYVideoPlayer/blob/master/04.gif"
width=
"240px"
height=
"426px"
/>
<img
src=
"https://github.com/CarGuo/GSYVideoPlayer/blob/master/04.gif"
width=
"240px"
height=
"426px"
/>
## 1.1.6 优化了第二种列表ListVideoUtil的全屏效果,和列表一的全屏效果一致,两种全屏效果增加是否打开关闭接口。
```
/**
* 全屏动画
*
* @param showFullAnimation 是否使用全屏动画效果
*/
public void setShowFullAnimation(boolean showFullAnimation)
```
## 1.1.5 优化了一些UI,增加了一些有趣的动画,比如播放按键。
## 1.1.5 优化了一些UI,增加了一些有趣的动画,比如播放按键。
*
推荐这个动画效果
<a
href=
"https://github.com/codeestX/ENViews"
>
ENViews
</a>
*
推荐这个动画效果
<a
href=
"https://github.com/codeestX/ENViews"
>
ENViews
</a>
...
...
gradle.properties
浏览文件 @
bebf0c9d
...
@@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx1536m
...
@@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx1536m
BINTRAY_USER
=
BINTRAY_USER
=
BINTRAY_KEY
=
BINTRAY_KEY
=
PROJ_GROUP
=
com.shuyu
PROJ_GROUP
=
com.shuyu
PROJ_VERSION
=
1.1.
5
PROJ_VERSION
=
1.1.
6
PROJ_NAME
=
gsyVideo
PROJ_NAME
=
gsyVideo
PROJ_WEBSITEURL
=
hhttps://github.com/CarGuo/GSYVideoPlayer
PROJ_WEBSITEURL
=
hhttps://github.com/CarGuo/GSYVideoPlayer
PROJ_ISSUETRACKERURL
=
PROJ_ISSUETRACKERURL
=
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
浏览文件 @
bebf0c9d
...
@@ -15,7 +15,6 @@ import com.shuyu.gsyvideoplayer.listener.GSYMediaPlayerListener;
...
@@ -15,7 +15,6 @@ import com.shuyu.gsyvideoplayer.listener.GSYMediaPlayerListener;
import
com.shuyu.gsyvideoplayer.model.GSYModel
;
import
com.shuyu.gsyvideoplayer.model.GSYModel
;
import
java.lang.ref.WeakReference
;
import
java.lang.ref.WeakReference
;
import
java.lang.reflect.Method
;
import
java.util.Map
;
import
java.util.Map
;
import
tv.danmaku.ijk.media.player.IMediaPlayer
;
import
tv.danmaku.ijk.media.player.IMediaPlayer
;
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/ListVideoUtil.java
浏览文件 @
bebf0c9d
...
@@ -6,14 +6,19 @@ import android.graphics.Color;
...
@@ -6,14 +6,19 @@ import android.graphics.Color;
import
android.os.Build
;
import
android.os.Build
;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.transition.TransitionManager
;
import
android.transition.TransitionManager
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.
ImageView
;
import
android.widget.
FrameLayout
;
import
com.shuyu.gsyvideoplayer.GSYVideoPlayer
;
import
com.shuyu.gsyvideoplayer.GSYVideoPlayer
;
import
com.shuyu.gsyvideoplayer.R
;
import
com.shuyu.gsyvideoplayer.R
;
import
com.shuyu.gsyvideoplayer.video.GSYBaseVideoPlayer
;
import
com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
;
import
com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
;
import
static
com
.
shuyu
.
gsyvideoplayer
.
utils
.
CommonUtil
.
getActionBarHeight
;
import
static
com
.
shuyu
.
gsyvideoplayer
.
utils
.
CommonUtil
.
getStatusBarHeight
;
/**
/**
* Created by shuyu on 2016/11/12.
* Created by shuyu on 2016/11/12.
*/
*/
...
@@ -24,6 +29,7 @@ public class ListVideoUtil {
...
@@ -24,6 +29,7 @@ public class ListVideoUtil {
private
StandardGSYVideoPlayer
gsyVideoPlayer
;
private
StandardGSYVideoPlayer
gsyVideoPlayer
;
private
ViewGroup
fullViewContainer
;
private
ViewGroup
fullViewContainer
;
private
ViewGroup
listParent
;
//记录列表中item的父布局
private
ViewGroup
listParent
;
//记录列表中item的父布局
private
ViewGroup
.
LayoutParams
listParams
;
private
OrientationUtils
orientationUtils
;
private
OrientationUtils
orientationUtils
;
private
Context
context
;
private
Context
context
;
private
int
playPosition
=
-
1
;
// 播放的位置
private
int
playPosition
=
-
1
;
// 播放的位置
...
@@ -33,6 +39,14 @@ public class ListVideoUtil {
...
@@ -33,6 +39,14 @@ public class ListVideoUtil {
private
boolean
hideStatusBar
;
//是否隐藏有状态bar
private
boolean
hideStatusBar
;
//是否隐藏有状态bar
private
boolean
hideActionBar
;
//是否隐藏有状态ActionBar
private
boolean
hideActionBar
;
//是否隐藏有状态ActionBar
protected
int
[]
listItemRect
;
//当前item框的屏幕位置
protected
int
[]
listItemSize
;
//当前item的大小
private
Handler
handler
=
new
Handler
();
private
boolean
showFullAnimation
=
true
;
public
ListVideoUtil
(
Context
context
)
{
public
ListVideoUtil
(
Context
context
)
{
gsyVideoPlayer
=
new
StandardGSYVideoPlayer
(
context
);
gsyVideoPlayer
=
new
StandardGSYVideoPlayer
(
context
);
this
.
context
=
context
;
this
.
context
=
context
;
...
@@ -111,7 +125,7 @@ public class ListVideoUtil {
...
@@ -111,7 +125,7 @@ public class ListVideoUtil {
if
(!
isFull
)
{
if
(!
isFull
)
{
resolveToFull
();
resolveToFull
();
}
else
{
}
else
{
resolve
ToNormal
(
);
resolve
MaterialToNormal
(
gsyVideoPlayer
);
}
}
}
}
...
@@ -122,12 +136,11 @@ public class ListVideoUtil {
...
@@ -122,12 +136,11 @@ public class ListVideoUtil {
CommonUtil
.
hideSupportActionBar
(
context
,
hideActionBar
,
hideStatusBar
);
CommonUtil
.
hideSupportActionBar
(
context
,
hideActionBar
,
hideStatusBar
);
isFull
=
true
;
isFull
=
true
;
ViewGroup
viewGroup
=
(
ViewGroup
)
gsyVideoPlayer
.
getParent
();
ViewGroup
viewGroup
=
(
ViewGroup
)
gsyVideoPlayer
.
getParent
();
listParams
=
gsyVideoPlayer
.
getLayoutParams
();
if
(
viewGroup
!=
null
)
{
if
(
viewGroup
!=
null
)
{
listParent
=
viewGroup
;
listParent
=
viewGroup
;
viewGroup
.
removeView
(
gsyVideoPlayer
);
viewGroup
.
removeView
(
gsyVideoPlayer
);
}
}
fullViewContainer
.
setBackgroundColor
(
Color
.
BLACK
);
fullViewContainer
.
addView
(
gsyVideoPlayer
);
gsyVideoPlayer
.
setIfCurrentIsFullscreen
(
true
);
gsyVideoPlayer
.
setIfCurrentIsFullscreen
(
true
);
gsyVideoPlayer
.
getFullscreenButton
().
setImageResource
(
R
.
drawable
.
video_shrink
);
gsyVideoPlayer
.
getFullscreenButton
().
setImageResource
(
R
.
drawable
.
video_shrink
);
gsyVideoPlayer
.
getBackButton
().
setVisibility
(
View
.
VISIBLE
);
gsyVideoPlayer
.
getBackButton
().
setVisibility
(
View
.
VISIBLE
);
...
@@ -137,36 +150,88 @@ public class ListVideoUtil {
...
@@ -137,36 +150,88 @@ public class ListVideoUtil {
gsyVideoPlayer
.
getBackButton
().
setOnClickListener
(
new
View
.
OnClickListener
()
{
gsyVideoPlayer
.
getBackButton
().
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
resolve
ToNormal
(
);
resolve
MaterialToNormal
(
gsyVideoPlayer
);
}
}
});
});
if
(
isFullLandFrist
())
{
if
(
showFullAnimation
&&
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
new
Handler
().
postDelayed
(
new
Runnable
()
{
if
(
fullViewContainer
instanceof
FrameLayout
)
{
@Override
//目前只做了frameLoayout的判断
public
void
run
()
{
resolveMaterialAnimation
();
if
(
orientationUtils
.
getIsLand
()
!=
1
)
{
}
else
{
orientationUtils
.
resolveByClick
();
resolveFullAdd
();
}
}
}
},
50
);
}
else
{
resolveFullAdd
();
}
}
}
}
/**
* 添加到全屏父布局里
*/
private
void
resolveFullAdd
()
{
fullViewContainer
.
setBackgroundColor
(
Color
.
BLACK
);
fullViewContainer
.
addView
(
gsyVideoPlayer
);
resolveChangeFirstLogic
(
50
);
}
/**
* 如果是5.0的动画开始位置
*/
private
void
resolveMaterialAnimation
()
{
listItemRect
=
new
int
[
2
];
listItemSize
=
new
int
[
2
];
saveLocationStatus
(
context
,
hideStatusBar
,
hideActionBar
);
FrameLayout
.
LayoutParams
lpParent
=
new
FrameLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
FrameLayout
frameLayout
=
new
FrameLayout
(
context
);
frameLayout
.
setBackgroundColor
(
Color
.
BLACK
);
FrameLayout
.
LayoutParams
lp
=
new
FrameLayout
.
LayoutParams
(
listItemSize
[
0
],
listItemSize
[
1
]);
lp
.
setMargins
(
listItemRect
[
0
],
listItemRect
[
1
],
0
,
0
);
frameLayout
.
addView
(
gsyVideoPlayer
,
lp
);
fullViewContainer
.
addView
(
frameLayout
,
lpParent
);
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
//开始动画
TransitionManager
.
beginDelayedTransition
(
fullViewContainer
);
resolveMaterialFullVideoShow
(
gsyVideoPlayer
);
resolveChangeFirstLogic
(
600
);
}
},
300
);
}
/**
* 如果是5.0的,要从原位置过度到全屏位置
*/
private
void
resolveMaterialFullVideoShow
(
GSYBaseVideoPlayer
gsyVideoPlayer
)
{
FrameLayout
.
LayoutParams
lp
=
(
FrameLayout
.
LayoutParams
)
gsyVideoPlayer
.
getLayoutParams
();
lp
.
setMargins
(
0
,
0
,
0
,
0
);
lp
.
height
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
;
lp
.
width
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
;
lp
.
gravity
=
Gravity
.
CENTER
;
gsyVideoPlayer
.
setLayoutParams
(
lp
);
gsyVideoPlayer
.
setIfCurrentIsFullscreen
(
true
);
}
/**
/**
* 处理正常逻辑
* 处理正常逻辑
*/
*/
private
void
resolveToNormal
()
{
private
void
resolveToNormal
()
{
CommonUtil
.
showSupportActionBar
(
context
,
hideActionBar
,
hideStatusBar
);
CommonUtil
.
showSupportActionBar
(
context
,
hideActionBar
,
hideStatusBar
);
int
delay
=
orientationUtils
.
backToProtVideo
();
int
delay
=
orientationUtils
.
backToProtVideo
();
new
Handler
()
.
postDelayed
(
new
Runnable
()
{
handler
.
postDelayed
(
new
Runnable
()
{
@Override
@Override
public
void
run
()
{
public
void
run
()
{
isFull
=
false
;
isFull
=
false
;
fullViewContainer
.
removeAllViews
();
fullViewContainer
.
removeAllViews
();
if
(
gsyVideoPlayer
.
getParent
()
!=
null
)
{
((
ViewGroup
)
gsyVideoPlayer
.
getParent
()).
removeView
(
gsyVideoPlayer
);
}
orientationUtils
.
setEnable
(
false
);
orientationUtils
.
setEnable
(
false
);
gsyVideoPlayer
.
setIfCurrentIsFullscreen
(
false
);
gsyVideoPlayer
.
setIfCurrentIsFullscreen
(
false
);
fullViewContainer
.
setBackgroundColor
(
Color
.
TRANSPARENT
);
fullViewContainer
.
setBackgroundColor
(
Color
.
TRANSPARENT
);
listParent
.
addView
(
gsyVideoPlayer
);
listParent
.
addView
(
gsyVideoPlayer
,
listParams
);
gsyVideoPlayer
.
getFullscreenButton
().
setImageResource
(
R
.
drawable
.
video_enlarge
);
gsyVideoPlayer
.
getFullscreenButton
().
setImageResource
(
R
.
drawable
.
video_enlarge
);
gsyVideoPlayer
.
getBackButton
().
setVisibility
(
View
.
GONE
);
gsyVideoPlayer
.
getBackButton
().
setVisibility
(
View
.
GONE
);
}
}
...
@@ -174,6 +239,71 @@ public class ListVideoUtil {
...
@@ -174,6 +239,71 @@ public class ListVideoUtil {
}
}
/**
* 动画回到正常效果
*/
private
void
resolveMaterialToNormal
(
final
GSYVideoPlayer
gsyVideoPlayer
)
{
if
(
showFullAnimation
&&
fullViewContainer
instanceof
FrameLayout
&&
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
int
delay
=
orientationUtils
.
backToProtVideo
();
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
TransitionManager
.
beginDelayedTransition
(
fullViewContainer
);
FrameLayout
.
LayoutParams
lp
=
(
FrameLayout
.
LayoutParams
)
gsyVideoPlayer
.
getLayoutParams
();
lp
.
setMargins
(
listItemRect
[
0
],
listItemRect
[
1
],
0
,
0
);
lp
.
width
=
listItemSize
[
0
];
lp
.
height
=
listItemSize
[
1
];
//注意配置回来,不然动画效果会不对
lp
.
gravity
=
Gravity
.
NO_GRAVITY
;
gsyVideoPlayer
.
setLayoutParams
(
lp
);
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
resolveToNormal
();
}
},
400
);
}
},
delay
);
}
else
{
resolveToNormal
();
}
}
/**
* 是否全屏一开始马上自动横屏
*/
private
void
resolveChangeFirstLogic
(
int
time
)
{
if
(
isFullLandFrist
())
{
handler
.
postDelayed
(
new
Runnable
()
{
@Override
public
void
run
()
{
if
(
orientationUtils
.
getIsLand
()
!=
1
)
{
orientationUtils
.
resolveByClick
();
}
}
},
time
);
}
}
/**
* 保存大小和状态
*/
private
void
saveLocationStatus
(
Context
context
,
boolean
statusBar
,
boolean
actionBar
)
{
listParent
.
getLocationOnScreen
(
listItemRect
);
int
statusBarH
=
getStatusBarHeight
(
context
);
int
actionBerH
=
getActionBarHeight
((
Activity
)
context
);
if
(
statusBar
)
{
listItemRect
[
1
]
=
listItemRect
[
1
]
-
statusBarH
;
}
if
(
actionBar
)
{
listItemRect
[
1
]
=
listItemRect
[
1
]
-
actionBerH
;
}
listItemSize
[
0
]
=
listParent
.
getWidth
();
listItemSize
[
1
]
=
listParent
.
getHeight
();
}
/**
/**
* 是否当前播放
* 是否当前播放
*/
*/
...
@@ -192,7 +322,7 @@ public class ListVideoUtil {
...
@@ -192,7 +322,7 @@ public class ListVideoUtil {
boolean
isFull
=
false
;
boolean
isFull
=
false
;
if
(
fullViewContainer
.
getChildCount
()
>
0
)
{
if
(
fullViewContainer
.
getChildCount
()
>
0
)
{
isFull
=
true
;
isFull
=
true
;
resolve
ToNormal
(
);
resolve
MaterialToNormal
(
gsyVideoPlayer
);
}
}
return
isFull
;
return
isFull
;
}
}
...
@@ -276,4 +406,18 @@ public class ListVideoUtil {
...
@@ -276,4 +406,18 @@ public class ListVideoUtil {
public
void
setHideActionBar
(
boolean
hideActionBar
)
{
public
void
setHideActionBar
(
boolean
hideActionBar
)
{
this
.
hideActionBar
=
hideActionBar
;
this
.
hideActionBar
=
hideActionBar
;
}
}
public
boolean
isShowFullAnimation
()
{
return
showFullAnimation
;
}
/**
* 全屏动画
*
* @param showFullAnimation 是否使用全屏动画效果
*/
public
void
setShowFullAnimation
(
boolean
showFullAnimation
)
{
this
.
showFullAnimation
=
showFullAnimation
;
}
}
}
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/video/GSYBaseVideoPlayer.java
浏览文件 @
bebf0c9d
...
@@ -46,6 +46,8 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
...
@@ -46,6 +46,8 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
protected
boolean
mCache
=
false
;
//是否播边边缓冲
protected
boolean
mCache
=
false
;
//是否播边边缓冲
private
boolean
mShowFullAnimation
=
true
;
//是否使用全屏动画效果
protected
int
[]
mListItemRect
;
//当前item框的屏幕位置
protected
int
[]
mListItemRect
;
//当前item框的屏幕位置
protected
int
[]
mListItemSize
;
//当前item的大小
protected
int
[]
mListItemSize
;
//当前item的大小
...
@@ -68,6 +70,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
...
@@ -68,6 +70,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
private
Handler
mHandler
=
new
Handler
();
private
Handler
mHandler
=
new
Handler
();
public
GSYBaseVideoPlayer
(
Context
context
)
{
public
GSYBaseVideoPlayer
(
Context
context
)
{
super
(
context
);
super
(
context
);
}
}
...
@@ -190,7 +193,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
...
@@ -190,7 +193,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
FrameLayout
frameLayout
=
new
FrameLayout
(
context
);
FrameLayout
frameLayout
=
new
FrameLayout
(
context
);
frameLayout
.
setBackgroundColor
(
Color
.
BLACK
);
frameLayout
.
setBackgroundColor
(
Color
.
BLACK
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
if
(
mShowFullAnimation
&&
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
FrameLayout
.
LayoutParams
lp
=
new
FrameLayout
.
LayoutParams
(
getWidth
(),
getHeight
());
FrameLayout
.
LayoutParams
lp
=
new
FrameLayout
.
LayoutParams
(
getWidth
(),
getHeight
());
lp
.
setMargins
(
mListItemRect
[
0
],
mListItemRect
[
1
],
0
,
0
);
lp
.
setMargins
(
mListItemRect
[
0
],
mListItemRect
[
1
],
0
,
0
);
frameLayout
.
addView
(
gsyVideoPlayer
,
lp
);
frameLayout
.
addView
(
gsyVideoPlayer
,
lp
);
...
@@ -264,7 +267,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
...
@@ -264,7 +267,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
final
GSYVideoPlayer
gsyVideoPlayer
;
final
GSYVideoPlayer
gsyVideoPlayer
;
if
(
oldF
!=
null
)
{
if
(
oldF
!=
null
)
{
gsyVideoPlayer
=
(
GSYVideoPlayer
)
oldF
;
gsyVideoPlayer
=
(
GSYVideoPlayer
)
oldF
;
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
if
(
mShowFullAnimation
&&
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
TransitionManager
.
beginDelayedTransition
(
vp
);
TransitionManager
.
beginDelayedTransition
(
vp
);
FrameLayout
.
LayoutParams
lp
=
(
FrameLayout
.
LayoutParams
)
gsyVideoPlayer
.
getLayoutParams
();
FrameLayout
.
LayoutParams
lp
=
(
FrameLayout
.
LayoutParams
)
gsyVideoPlayer
.
getLayoutParams
();
...
@@ -355,4 +358,18 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
...
@@ -355,4 +358,18 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
public
void
setRotateViewAuto
(
boolean
rotateViewAuto
)
{
public
void
setRotateViewAuto
(
boolean
rotateViewAuto
)
{
this
.
mRotateViewAuto
=
rotateViewAuto
;
this
.
mRotateViewAuto
=
rotateViewAuto
;
}
}
public
boolean
ismShowFullAnimation
()
{
return
mShowFullAnimation
;
}
/**
* 全屏动画
*
* @param showFullAnimation 是否使用全屏动画效果
*/
public
void
setShowFullAnimation
(
boolean
showFullAnimation
)
{
this
.
mShowFullAnimation
=
showFullAnimation
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录