diff --git a/README-ZH.md b/README-ZH.md index c78fb02a0..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_preview.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.2/jiaozivideoplayer-7.0_preview.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版本是预览版本,还没开发完,还有问题,请先用6.4.3 +7.0.2不是非常稳定,感兴趣的可以尝试 1.添加类库 ```gradle -compile 'cn.jzvd:jiaozivideoplayer:7.0_preview' +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 e4237b7ca..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_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.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 version is a preview version. It has not been developed yet. There are still problems. Please use 6.4.3 first. +The 7.0.2 version is not very stable. 1.Import library: ```gradle -implementation 'cn.jzvd:jiaozivideoplayer:7.0_preview' +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 b13b54401..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 { @@ -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/app/proguard-rules.pro b/app/proguard-rules.pro index 2c5ba10ad..3e8b423ee 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -16,3 +16,12 @@ # public *; #} +-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 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); + } } } } 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 5b474fbb4..d0bcb9df2 100644 --- a/jiaozivideoplayer/build.gradle +++ b/jiaozivideoplayer/build.gradle @@ -6,15 +6,10 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 28 - versionCode 89 - versionName "7.0.1" - } - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } + versionCode 90 + versionName "7.0.2" } + 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 *; -#} 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() {