提交 e25aa4d8 编写于 作者: S shuyu

1.1.4

上级 72801552
......@@ -15,13 +15,13 @@
<dependency>
<groupId>com.shuyu</groupId>
<artifactId>gsyVideoPlayer</artifactId>
<version>1.1.3</version>
<version>1.1.4</version>
<type>pom</type>
</dependency>
```
```
compile 'com.shuyu:gsyVideoPlayer:1.1.3'
compile 'com.shuyu:gsyVideoPlayer:1.1.4'
```
## 效果,录屏下的屏幕旋转和实际有些出入
......@@ -37,13 +37,23 @@ compile 'com.shuyu:gsyVideoPlayer:1.1.3'
* <h4>3、详情模式</h4>
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/04.gif" width="240px" height="426px"/>
## 1.1.3
## 1.1.4
* 优化了第一种列表的全屏动画,5.0以上展开和返回过渡顺畅,支持自动旋转的开启与关闭
* 修改了全屏下的滑动接口不正常问题,全屏下自动变为滑动的,非全屏可以设置。
* GIF 效果
</p>
<img src="https://github.com/CarGuo/GSYVideoPlayer/blob/master/0034.gif" width="240px" height="426px"/>
```
/**
* 是否可以滑动界面改变进度,声音等
*/
public void setIsTouchWiget(boolean isTouchWiget)
```
## 1.1.2
* 增加了TAG和position来实现第一种list列表(非ListVideoUtil模式的列表实现)的滑动错位问题
......
......@@ -53,6 +53,8 @@ public class DetailPlayer extends AppCompatActivity {
orientationUtils = new OrientationUtils(this, detailPlayer);
orientationUtils.setEnable(false);
detailPlayer.setIsTouchWiget(true);
detailPlayer.getFullscreenButton().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......
......@@ -72,6 +72,9 @@ public class PlayActivity extends AppCompatActivity {
}
});
//是否可以滑动调整
videoPlayer.setIsTouchWiget(true);
//设置返回按键功能
videoPlayer.getBackButton().setOnClickListener(new View.OnClickListener() {
@Override
......
......@@ -18,7 +18,7 @@ org.gradle.jvmargs=-Xmx1536m
BINTRAY_USER=
BINTRAY_KEY=
PROJ_GROUP=com.shuyu
PROJ_VERSION=1.1.3
PROJ_VERSION=1.1.4
PROJ_NAME=gsyVideo
PROJ_WEBSITEURL=hhttps://github.com/CarGuo/GSYVideoPlayer
PROJ_ISSUETRACKERURL=
......
......@@ -64,7 +64,6 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
public static boolean WIFI_TIP_DIALOG_SHOWED = false;
protected static Timer UPDATE_PROGRESS_TIMER;
......@@ -116,8 +115,6 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
protected boolean mTouchingProgressBar = false;
protected boolean mIfCurrentIsFullscreen = false;
protected boolean mIsTouchWiget = false;
protected boolean mChangeVolume = false;//是否改变音量
......@@ -880,6 +877,9 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
return mIsTouchWiget;
}
/**
* 是否可以滑动界面改变进度,声音等
*/
public void setIsTouchWiget(boolean isTouchWiget) {
this.mIsTouchWiget = isTouchWiget;
}
......
......@@ -128,6 +128,7 @@ public class ListVideoUtil {
}
fullViewContainer.setBackgroundColor(Color.BLACK);
fullViewContainer.addView(gsyVideoPlayer);
gsyVideoPlayer.setIfCurrentIsFullscreen(true);
gsyVideoPlayer.getFullscreenButton().setImageResource(R.drawable.video_shrink);
gsyVideoPlayer.getBackButton().setVisibility(View.VISIBLE);
//设置旋转
......@@ -163,6 +164,7 @@ public class ListVideoUtil {
isFull = false;
fullViewContainer.removeAllViews();
orientationUtils.setEnable(false);
gsyVideoPlayer.setIfCurrentIsFullscreen(false);
fullViewContainer.setBackgroundColor(Color.TRANSPARENT);
listParent.addView(gsyVideoPlayer);
gsyVideoPlayer.getFullscreenButton().setImageResource(R.drawable.video_enlarge);
......
......@@ -54,6 +54,8 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
protected boolean mRotateViewAuto = true; //是否自动旋转
protected boolean mIfCurrentIsFullscreen = false;
protected Context mContext;
protected String mUrl;
......@@ -123,6 +125,7 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
lp.gravity = Gravity.CENTER;
gsyVideoPlayer.setLayoutParams(lp);
gsyVideoPlayer.setIfCurrentIsFullscreen(true);
mOrientationUtils = new OrientationUtils((Activity) context, gsyVideoPlayer);
mOrientationUtils.setEnable(mRotateViewAuto);
}
......@@ -337,6 +340,15 @@ public abstract class GSYBaseVideoPlayer extends FrameLayout implements GSYMedia
return mRotateViewAuto;
}
public boolean isIfCurrentIsFullscreen() {
return mIfCurrentIsFullscreen;
}
public void setIfCurrentIsFullscreen(boolean ifCurrentIsFullscreen) {
this.mIfCurrentIsFullscreen = ifCurrentIsFullscreen;
}
/**
* 自动旋转
*/
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/player_thumb_t" android:state_pressed="true" />
<item android:drawable="@drawable/player_thumb_n" />
<item android:state_pressed="true" android:drawable="@drawable/video_seek_thumb_pressed" />
<item android:drawable="@drawable/video_seek_thumb_normal" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff"/>
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffffff" />
<size
android:height="14.0dp"
android:width="14.0dp"/>
android:height="14.0dip"
android:width="14.0dip" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="oval"
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fff0f0f0"/>
xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#fff0f0f0" />
<size
android:height="14.0dp"
android:width="14.0dp"/>
android:height="14.0dip"
android:width="14.0dip" />
</shape>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="style_color">#f77500</color><!--主题色-->
<color name="style_color">#005fff</color><!--主题色-->
</resources>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册