diff --git a/README.md b/README.md
index b2ae9e63..994de1fb 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
--
-
+
@@ -23,7 +23,7 @@
## 文档
-- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装[Demo jiaozivideoplayer-7.4.0.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.4.0/jiaozivideoplayer-7.4.0.apk),仔细过一遍Demo
+- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装[Demo jiaozivideoplayer-7.4.1.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.4.1/jiaozivideoplayer-7.4.1.apk),仔细过一遍Demo
- [文档 - 自定义Jzvd](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-%E8%87%AA%E5%AE%9A%E4%B9%89Jzvd),继承JzvdStd实现自己的播放器
- [文档 - 自定义播放内核](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-%E8%87%AA%E5%AE%9A%E4%B9%89%E6%92%AD%E6%94%BE%E5%86%85%E6%A0%B8),测试哪个播放内核适合自己的项目
@@ -37,19 +37,15 @@
1.添加类库
```gradle
-implementation 'cn.jzvd:jiaozivideoplayer:7.4.0'
+implementation 'cn.jzvd:jiaozivideoplayer:7.4.1'
```
2.添加布局
```xml
-
-
-
+ android:layout_height="200dp" />
```
3.设置视频地址、缩略图地址、标题
diff --git a/demo/build.gradle b/demo/build.gradle
index b888b879..a0100a43 100644
--- a/demo/build.gradle
+++ b/demo/build.gradle
@@ -8,8 +8,8 @@ android {
applicationId "cn.jzvd.demo"
minSdkVersion 16
targetSdkVersion 29
- versionCode 102
- versionName "7.4.0"
+ versionCode 103
+ versionName "7.4.1"
ndk {
// add support lib
abiFilters 'armeabi-v7a' //, 'arm64-v8a'//, "mips" //,'armeabi''x86',, 'x86_64',
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTitleAfterFullscreen.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTitleAfterFullscreen.java
index ae1d019d..4b2a03c2 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTitleAfterFullscreen.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdShowTitleAfterFullscreen.java
@@ -27,15 +27,15 @@ public void setUp(JZDataSource jzDataSource, int screen) {
}
@Override
- public void gotoScreenFullscreen() {
- super.gotoScreenFullscreen();
+ public void gotoFullscreen() {
+ super.gotoFullscreen();
titleTextView.setVisibility(View.VISIBLE);
}
@Override
- public void gotoScreenNormal() {
- super.gotoScreenNormal();
+ public void gotoNormalScreen() {
+ super.gotoNormalScreen();
titleTextView.setVisibility(View.INVISIBLE);
}
}
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTinyWindow.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTinyWindow.java
index 5b8d7228..536ac9e1 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTinyWindow.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdTinyWindow.java
@@ -28,14 +28,21 @@ public void setUp(JZDataSource jzDataSource, int screen, Class mediaInterface) {
super.setUp(jzDataSource, screen, mediaInterface);
}
- public void gotoScreenTiny() {
+ public void gotoTinyScreen() {
Log.i(TAG, "startWindowTiny " + " [" + this.hashCode() + "] ");
if (state == STATE_NORMAL || state == STATE_ERROR || state == STATE_AUTO_COMPLETE)
return;
ViewGroup vg = (ViewGroup) getParent();
+ jzvdContext = vg.getContext();
+ blockLayoutParams = getLayoutParams();
+ blockIndex = vg.indexOfChild(this);
+ blockWidth = getWidth();
+ blockHeight = getHeight();
+
vg.removeView(this);
cloneAJzvd(vg);
CONTAINER_LIST.add(vg);
+
ViewGroup vgg = (ViewGroup) (JZUtils.scanForActivity(getContext())).getWindow().getDecorView();//和他也没有关系
FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(400, 400);
lp.gravity = Gravity.RIGHT | Gravity.BOTTOM;
@@ -44,5 +51,4 @@ public void gotoScreenTiny() {
setScreenTiny();
}
-
}
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolumeAfterFullscreen.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolumeAfterFullscreen.java
index 82de59af..5ed7ff38 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolumeAfterFullscreen.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdVolumeAfterFullscreen.java
@@ -32,8 +32,8 @@ public void onPrepared() {
* 进入全屏模式的时候关闭静音模式
*/
@Override
- public void gotoScreenFullscreen() {
- super.gotoScreenFullscreen();
+ public void gotoFullscreen() {
+ super.gotoFullscreen();
}
@Override
diff --git a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStd.java b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStd.java
index a79a6bb3..bda5dcc2 100644
--- a/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStd.java
+++ b/demo/src/main/java/cn/jzvd/demo/CustomJzvd/MyJzvdStd.java
@@ -78,14 +78,14 @@ public void onStopTrackingTouch(SeekBar seekBar) {
}
@Override
- public void gotoScreenFullscreen() {
- super.gotoScreenFullscreen();
+ public void gotoFullscreen() {
+ super.gotoFullscreen();
Log.i(TAG, "goto Fullscreen");
}
@Override
- public void gotoScreenNormal() {
- super.gotoScreenNormal();
+ public void gotoNormalScreen() {
+ super.gotoNormalScreen();
Log.i(TAG, "quit Fullscreen");
}
diff --git a/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowActivity.java b/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowActivity.java
index 81710dfa..187ae96c 100644
--- a/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowActivity.java
@@ -69,7 +69,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
public void clickTinyWindow(View view) {
- jzvdStdTinyWindow.gotoScreenTiny();
+ jzvdStdTinyWindow.gotoTinyScreen();
}
public void clickAutoTinyListViewRecyclerView(View view) {
diff --git a/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewActivity.java b/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewActivity.java
index 2ce8ab0a..08ca2f4c 100644
--- a/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewActivity.java
@@ -67,7 +67,7 @@ public void onChildViewDetachedFromWindow(View view) {
if (Jzvd.CURRENT_JZVD.state == Jzvd.STATE_PAUSE) {
Jzvd.releaseAllVideos();
} else {
- ((JzvdStdTinyWindow) Jzvd.CURRENT_JZVD).gotoScreenTiny();
+ ((JzvdStdTinyWindow) Jzvd.CURRENT_JZVD).gotoTinyScreen();
}
}
}
diff --git a/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java b/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java
index 08bcdf1c..f6b83c81 100644
--- a/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java
+++ b/demo/src/main/java/cn/jzvd/demo/TinyWindow/TinyWindowRecycleViewMultiHolderActivity.java
@@ -72,7 +72,7 @@ public void onChildViewDetachedFromWindow(View view) {
if (Jzvd.CURRENT_JZVD.state == Jzvd.STATE_PAUSE) {
Jzvd.releaseAllVideos();
} else {
- ((JzvdStdTinyWindow) Jzvd.CURRENT_JZVD).gotoScreenTiny();
+ ((JzvdStdTinyWindow) Jzvd.CURRENT_JZVD).gotoTinyScreen();
}
}
}
diff --git a/demo/src/main/java/cn/jzvd/demo/api/BigUIChangeAG/AGVideo.java b/demo/src/main/java/cn/jzvd/demo/api/BigUIChangeAG/AGVideo.java
index 1a74b944..c8a6d2d1 100644
--- a/demo/src/main/java/cn/jzvd/demo/api/BigUIChangeAG/AGVideo.java
+++ b/demo/src/main/java/cn/jzvd/demo/api/BigUIChangeAG/AGVideo.java
@@ -322,7 +322,7 @@ public void onClick(View v) {
//quit fullscreen
backPress();
} else {
- gotoScreenFullscreen();
+ gotoFullscreen();
}
break;
case R.id.screen:
diff --git a/gradle/build_upload.gradle b/gradle/build_upload.gradle
index 445d2a54..a82ddf0c 100644
--- a/gradle/build_upload.gradle
+++ b/gradle/build_upload.gradle
@@ -8,7 +8,7 @@ signing {
group = "cn.jzvd"
archivesBaseName = "jiaozivideoplayer"
-version = "7.4.0"
+version = "7.4.1"
uploadArchives {
repositories {
diff --git a/library/build.gradle b/library/build.gradle
index 39047ab3..b8ac84b5 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
- versionCode 102
- versionName "7.4.0"
+ versionCode 103
+ versionName "7.4.1"
}
compileOptions {
diff --git a/library/src/main/java/cn/jzvd/Jzvd.java b/library/src/main/java/cn/jzvd/Jzvd.java
index b75a1e9a..5545dd75 100644
--- a/library/src/main/java/cn/jzvd/Jzvd.java
+++ b/library/src/main/java/cn/jzvd/Jzvd.java
@@ -220,7 +220,7 @@ public static void releaseAllVideos() {
public static boolean backPress() {
Log.i(TAG, "backPress");
if (CONTAINER_LIST.size() != 0 && CURRENT_JZVD != null) {//判断条件,因为当前所有goBack都是回到普通窗口
- CURRENT_JZVD.gotoScreenNormal();
+ CURRENT_JZVD.gotoNormalScreen();
return true;
} else if (CONTAINER_LIST.size() == 0 && CURRENT_JZVD != null && CURRENT_JZVD.screen != SCREEN_NORMAL) {//退出直接进入的全屏
CURRENT_JZVD.clearFloatScreen();
@@ -347,7 +347,7 @@ protected void clickFullscreen() {
backPress();
} else {
Log.d(TAG, "toFullscreenActivity [" + this.hashCode() + "] ");
- gotoScreenFullscreen();
+ gotoFullscreen();
}
}
@@ -439,7 +439,7 @@ protected void touchActionMove(float x, float y) {
}
} else {
//如果y轴滑动距离超过设置的处理范围,那么进行滑动事件处理
- if (mDownX < mScreenWidth * 0.5f) {//左侧改变亮度
+ if (mDownX < mScreenHeight * 0.5f) {//左侧改变亮度
mChangeBrightness = true;
WindowManager.LayoutParams lp = JZUtils.getWindow(getContext()).getAttributes();
if (lp.screenBrightness < 0) {
@@ -671,11 +671,9 @@ public void gotoNormalCompletion() {
ViewGroup vg = (ViewGroup) (JZUtils.scanForActivity(jzvdContext)).getWindow().getDecorView();
vg.removeView(this);
textureViewContainer.removeView(textureView);
- CONTAINER_LIST.getLast().removeAllViews();
- CONTAINER_LIST.getLast().addView(this, new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
+ CONTAINER_LIST.getLast().removeViewAt(blockIndex);//remove block
+ CONTAINER_LIST.getLast().addView(this, blockIndex, blockLayoutParams);
CONTAINER_LIST.pop();
-
setScreenNormal();
JZUtils.showStatusBar(jzvdContext);
JZUtils.setRequestedOrientation(jzvdContext, NORMAL_ORIENTATION);
@@ -961,15 +959,15 @@ public void cloneAJzvd(ViewGroup vg) {
/**
* 如果不在列表中可以不加block
*/
- ViewGroup.LayoutParams blockLayoutParams;
- int blockIndex;
- int blockWidth;
- int blockHeight;
+ protected ViewGroup.LayoutParams blockLayoutParams;
+ protected int blockIndex;
+ protected int blockWidth;
+ protected int blockHeight;
/**
* 如果全屏或者返回全屏的视图有问题,复写这两个函数gotoScreenNormal(),根据自己布局的情况重新布局。
*/
- public void gotoScreenFullscreen() {
+ public void gotoFullscreen() {
gotoFullscreenTime = System.currentTimeMillis();
ViewGroup vg = (ViewGroup) getParent();
jzvdContext = vg.getContext();
@@ -994,7 +992,7 @@ public void gotoScreenFullscreen() {
}
- public void gotoScreenNormal() {//goback本质上是goto
+ public void gotoNormalScreen() {//goback本质上是goto
gobakFullscreenTime = System.currentTimeMillis();//退出全屏
ViewGroup vg = (ViewGroup) (JZUtils.scanForActivity(jzvdContext)).getWindow().getDecorView();
vg.removeView(this);
@@ -1032,7 +1030,7 @@ public void autoFullscreen(float x) {//TODO写道demo中
} else {
JZUtils.setRequestedOrientation(getContext(), ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE);
}
- gotoScreenFullscreen();
+ gotoFullscreen();
}
}