From 06c496184df8ab67173e50105a46c96e63554146 Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Thu, 2 May 2019 14:34:32 +0800 Subject: [PATCH 1/9] readme --- README-ZH.md | 8 ++++---- README.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index c78fb02a0..27403e5d9 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -2,7 +2,7 @@ --
@@ -32,7 +32,7 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd ## 使用步骤 1. 通读ReadMe -2. 下载安装demo apk [jiaozivideoplayer-7.0_preview.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.2/jiaozivideoplayer-7.0_preview.apk),各个页面都进入一次,各个按钮点一次 +2. 下载安装demo apk [jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.2/jiaozivideoplayer-7.0.1.apk),各个页面都进入一次,各个按钮点一次 3. 下载调试develop分支,有针对性的通过效果找到实现的源码 4. 看[自定义相关的WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),实现自己的需求 @@ -49,11 +49,11 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd 即便是自定义UI,或者对Library有过修改,也是这五步骤来使用播放器。 -7.0版本是预览版本,还没开发完,还有问题,请先用6.4.3 +7.0.1不是非常稳定,感兴趣的可以尝试 1.添加类库 ```gradle -compile 'cn.jzvd:jiaozivideoplayer:7.0_preview' +compile 'cn.jzvd:jiaozivideoplayer:7.0.1' ``` 或直接下载 [aar](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.2) (不建议) diff --git a/README.md b/README.md index e4237b7ca..01af76c85 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -- @@ -38,7 +38,7 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd ## Steps for usage 1. Read through ReadMe -2. Download and install the demo apk[jiaozivideoplayer-7.0_preview.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.2/jiaozivideoplayer-7.0_preview.apk), each page enters once, each button clicks once +2. Download and install the demo apk[jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.2/jiaozivideoplayer-7.0.1.apk), each page enters once, each button clicks once 3. Download and debug the develop branch, and find the source code through the effect 4. See [custom-related WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),Realize your own needs @@ -55,11 +55,11 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd Only five steps to use the player: -The 7.0 version is a preview version. It has not been developed yet. There are still problems. Please use 6.4.3 first. +The 7.0.1 version is not very stable. 1.Import library: ```gradle -implementation 'cn.jzvd:jiaozivideoplayer:7.0_preview' +implementation 'cn.jzvd:jiaozivideoplayer:7.0.1' ``` Or download [aar](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.2) (not recommended). From 65181ac6a4e98cbd1f64397e33f257fd9a533fc8 Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Thu, 2 May 2019 14:41:43 +0800 Subject: [PATCH 2/9] readme --- README-ZH.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 27403e5d9..2e50a4b6e 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -32,7 +32,7 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd ## 使用步骤 1. 通读ReadMe -2. 下载安装demo apk [jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.2/jiaozivideoplayer-7.0.1.apk),各个页面都进入一次,各个按钮点一次 +2. 下载安装demo apk [jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.1/jiaozivideoplayer-7.0.1.apk),各个页面都进入一次,各个按钮点一次 3. 下载调试develop分支,有针对性的通过效果找到实现的源码 4. 看[自定义相关的WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),实现自己的需求 diff --git a/README.md b/README.md index 01af76c85..da26741d6 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd ## Steps for usage 1. Read through ReadMe -2. Download and install the demo apk[jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.2/jiaozivideoplayer-7.0.1.apk), each page enters once, each button clicks once +2. Download and install the demo apk[jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.1/jiaozivideoplayer-7.0.1.apk), each page enters once, each button clicks once 3. Download and debug the develop branch, and find the source code through the effect 4. See [custom-related WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),Realize your own needs From 313c5ed62e12ba87fbe207659f6ec593e99481d4 Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Tue, 7 May 2019 04:12:51 +0800 Subject: [PATCH 3/9] testing bug --- app/build.gradle | 5 +++++ jiaozivideoplayer/build.gradle | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index b13b54401..cc4620507 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,6 +19,11 @@ android { } } buildTypes { +// debug {//测试时会用到 +// minifyEnabled true +// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' +// signingConfig signingConfigs.releaseConfig +// } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' diff --git a/jiaozivideoplayer/build.gradle b/jiaozivideoplayer/build.gradle index 5b474fbb4..3bb219633 100644 --- a/jiaozivideoplayer/build.gradle +++ b/jiaozivideoplayer/build.gradle @@ -10,6 +10,10 @@ android { versionName "7.0.1" } buildTypes { +// debug {//测试时会用到 +// minifyEnabled true +// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' +// } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' From c7f6f3f67ab5fa6ed7807d6bf22241b3c9f4ca7b Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Tue, 7 May 2019 05:05:59 +0800 Subject: [PATCH 4/9] fix can proguard bug --- app/proguard-rules.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 2c5ba10ad..cf8d8df34 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -16,3 +16,4 @@ # public *; #} +-keep public class cn.jzvd.JZMediaSystem {*; } \ No newline at end of file From 902357540b9a6cc911caffed11f44fa6f0ee334a Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Tue, 7 May 2019 05:14:39 +0800 Subject: [PATCH 5/9] rm bad code --- jiaozivideoplayer/build.gradle | 11 +---------- jiaozivideoplayer/proguard-rules.pro | 17 ----------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 jiaozivideoplayer/proguard-rules.pro diff --git a/jiaozivideoplayer/build.gradle b/jiaozivideoplayer/build.gradle index 3bb219633..b9533d6f6 100644 --- a/jiaozivideoplayer/build.gradle +++ b/jiaozivideoplayer/build.gradle @@ -9,16 +9,7 @@ android { versionCode 89 versionName "7.0.1" } - buildTypes { -// debug {//测试时会用到 -// minifyEnabled true -// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' -// } - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } + compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 diff --git a/jiaozivideoplayer/proguard-rules.pro b/jiaozivideoplayer/proguard-rules.pro deleted file mode 100644 index 19da422d0..000000000 --- a/jiaozivideoplayer/proguard-rules.pro +++ /dev/null @@ -1,17 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /Users/Nathen/WorkEnv/android-sdk-macosx/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} From be5808fa7fbdbd119f280ea07b77c82d6acac08f Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Tue, 7 May 2019 05:17:25 +0800 Subject: [PATCH 6/9] fix nullpoint bug --- jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java index d45cece89..02ebac852 100644 --- a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java +++ b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java @@ -663,7 +663,7 @@ public void reset() { AudioManager mAudioManager = (AudioManager) getApplicationContext().getSystemService(Context.AUDIO_SERVICE); mAudioManager.abandonAudioFocus(onAudioFocusChangeListener); JZUtils.scanForActivity(getContext()).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - mediaInterface.release(); + if (mediaInterface != null) mediaInterface.release(); } public void addTextureView() { From 784fcc032ecf97c2ece26cde350eac800653bb4b Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Tue, 7 May 2019 05:19:37 +0800 Subject: [PATCH 7/9] fix crash --- app/build.gradle | 10 +++++----- .../java/cn/jzvd/demo/CustomMedia/JZMediaExo.java | 14 ++++++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index cc4620507..82516fa01 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,11 +19,11 @@ android { } } buildTypes { -// debug {//测试时会用到 -// minifyEnabled true -// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' -// signingConfig signingConfigs.releaseConfig -// } + debug {//测试时会用到 + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + signingConfig signingConfigs.releaseConfig + } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' diff --git a/app/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaExo.java b/app/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaExo.java index e43a4a526..dfe1d3602 100755 --- a/app/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaExo.java +++ b/app/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaExo.java @@ -293,12 +293,14 @@ public void onSurfaceTextureUpdated(SurfaceTexture surface) { private class onBufferingUpdate implements Runnable { @Override public void run() { - final int percent = simpleExoPlayer.getBufferedPercentage(); - handler.post(() -> jzvd.setBufferProgress(percent)); - if (percent < 100) { - handler.postDelayed(callback, 300); - } else { - handler.removeCallbacks(callback); + if (simpleExoPlayer != null) { + final int percent = simpleExoPlayer.getBufferedPercentage(); + handler.post(() -> jzvd.setBufferProgress(percent)); + if (percent < 100) { + handler.postDelayed(callback, 300); + } else { + handler.removeCallbacks(callback); + } } } } From 979e4424226ea49e6fb0a89f4f5e88e144f21fbb Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Tue, 7 May 2019 05:25:49 +0800 Subject: [PATCH 8/9] prugurad rules --- app/proguard-rules.pro | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index cf8d8df34..3e8b423ee 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -16,4 +16,12 @@ # public *; #} --keep public class cn.jzvd.JZMediaSystem {*; } \ No newline at end of file +-keep public class cn.jzvd.JZMediaSystem {*; } +-keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; } +-keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; } +-keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; } + + +-keep class tv.danmaku.ijk.media.player.** {*; } +-dontwarn tv.danmaku.ijk.media.player.* +-keep interface tv.danmaku.ijk.media.player.** { *; } \ No newline at end of file From 41ea5d6573623264165191b9ec8c46335754abbe Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Thu, 9 May 2019 12:03:10 +0800 Subject: [PATCH 9/9] v7.0.2 --- README-ZH.md | 8 ++++---- README.md | 8 ++++---- app/build.gradle | 4 ++-- gradle/maven_push.gradle | 10 +++++----- jiaozivideoplayer/build.gradle | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 2e50a4b6e..24381cee5 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -2,7 +2,7 @@ -- @@ -32,7 +32,7 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd ## 使用步骤 1. 通读ReadMe -2. 下载安装demo apk [jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.1/jiaozivideoplayer-7.0.1.apk),各个页面都进入一次,各个按钮点一次 +2. 下载安装demo apk [jiaozivideoplayer-7.0.2.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.2/jiaozivideoplayer-7.0.2.apk),各个页面都进入一次,各个按钮点一次 3. 下载调试develop分支,有针对性的通过效果找到实现的源码 4. 看[自定义相关的WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),实现自己的需求 @@ -49,11 +49,11 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd 即便是自定义UI,或者对Library有过修改,也是这五步骤来使用播放器。 -7.0.1不是非常稳定,感兴趣的可以尝试 +7.0.2不是非常稳定,感兴趣的可以尝试 1.添加类库 ```gradle -compile 'cn.jzvd:jiaozivideoplayer:7.0.1' +compile 'cn.jzvd:jiaozivideoplayer:7.0.2' ``` 或直接下载 [aar](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.2) (不建议) diff --git a/README.md b/README.md index da26741d6..dd32b75bc 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -- @@ -38,7 +38,7 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd ## Steps for usage 1. Read through ReadMe -2. Download and install the demo apk[jiaozivideoplayer-7.0.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.1/jiaozivideoplayer-7.0.1.apk), each page enters once, each button clicks once +2. Download and install the demo apk[jiaozivideoplayer-7.0.2.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.2/jiaozivideoplayer-7.0.2.apk), each page enters once, each button clicks once 3. Download and debug the develop branch, and find the source code through the effect 4. See [custom-related WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),Realize your own needs @@ -55,11 +55,11 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd Only five steps to use the player: -The 7.0.1 version is not very stable. +The 7.0.2 version is not very stable. 1.Import library: ```gradle -implementation 'cn.jzvd:jiaozivideoplayer:7.0.1' +implementation 'cn.jzvd:jiaozivideoplayer:7.0.2' ``` Or download [aar](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.2) (not recommended). diff --git a/app/build.gradle b/app/build.gradle index 82516fa01..6b0be97df 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "cn.jzvd.demo" minSdkVersion 16 targetSdkVersion 28 - versionCode 89 - versionName "7.0.1" + versionCode 90 + versionName "7.0.2" } signingConfigs { releaseConfig { diff --git a/gradle/maven_push.gradle b/gradle/maven_push.gradle index 829b75690..6d5c3d88f 100644 --- a/gradle/maven_push.gradle +++ b/gradle/maven_push.gradle @@ -22,17 +22,17 @@ signing { group = "cn.jzvd" archivesBaseName = "jiaozivideoplayer" -version = "7.0.1" +version = "7.0.2" uploadArchives { repositories { mavenDeployer { beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } -// repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { -// authentication(userName: getProperty('ossrhUsername'), -// password: getProperty('ossrhPassword')) -// } + repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { + authentication(userName: getProperty('ossrhUsername'), + password: getProperty('ossrhPassword')) + } pom.project { name 'jiaozivideoplayer' diff --git a/jiaozivideoplayer/build.gradle b/jiaozivideoplayer/build.gradle index b9533d6f6..d0bcb9df2 100644 --- a/jiaozivideoplayer/build.gradle +++ b/jiaozivideoplayer/build.gradle @@ -6,8 +6,8 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 28 - versionCode 89 - versionName "7.0.1" + versionCode 90 + versionName "7.0.2" } compileOptions {