From c34da777c6f3a98fbccc5bd1f2910f9362c71333 Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Fri, 10 May 2019 00:42:10 +0800 Subject: [PATCH 01/10] upgrade gralde --- gradle/wrapper/gradle-wrapper.properties | 2 +- jiaozivideoplayer/src/main/java/cn/jzvd/JZUtils.java | 1 - jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java | 7 ++----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2b4308c22..7a33c7e96 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip diff --git a/jiaozivideoplayer/src/main/java/cn/jzvd/JZUtils.java b/jiaozivideoplayer/src/main/java/cn/jzvd/JZUtils.java index 477eeadb1..a649d7f43 100755 --- a/jiaozivideoplayer/src/main/java/cn/jzvd/JZUtils.java +++ b/jiaozivideoplayer/src/main/java/cn/jzvd/JZUtils.java @@ -15,7 +15,6 @@ import android.view.View; import android.view.Window; import android.view.WindowManager; -import android.widget.Toast; import java.util.Formatter; import java.util.Locale; diff --git a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java index 02ebac852..f40db8a68 100644 --- a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java +++ b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java @@ -244,12 +244,9 @@ public static void startFullscreenDirectly(Context context, Class _class, JZData } } - /** - * @param mediaInterface - */ - public void setMediaInterface(JZMediaInterface mediaInterface) { + public void setMediaInterface(Class mediaInterfaceClass) { reset(); - this.mediaInterface = mediaInterface; + this.mediaInterfaceClass = mediaInterfaceClass; } public abstract int getLayoutId(); From 5b9ddadac3e8b5cad70544dd0cd553619816c51a Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Sat, 11 May 2019 04:31:57 +0800 Subject: [PATCH 02/10] debug not proguard --- app/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6b0be97df..d43e8ff5b 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' From a0c5000a12643735b8f6be03fed1e53b5a38f59b Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Sat, 11 May 2019 15:59:07 +0800 Subject: [PATCH 03/10] setup function --- app/src/main/java/cn/jzvd/demo/ActivityMain.java | 2 +- jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/cn/jzvd/demo/ActivityMain.java b/app/src/main/java/cn/jzvd/demo/ActivityMain.java index 3a903eed2..3d0905da1 100644 --- a/app/src/main/java/cn/jzvd/demo/ActivityMain.java +++ b/app/src/main/java/cn/jzvd/demo/ActivityMain.java @@ -26,7 +26,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { myJzvdStd = findViewById(R.id.jz_video); myJzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4" - , "饺子快长大", JzvdStd.SCREEN_NORMAL); + , "饺子快长大"); Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(myJzvdStd.thumbImageView); } diff --git a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java index f40db8a68..9bd1d1ed1 100644 --- a/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java +++ b/jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java @@ -276,17 +276,22 @@ public void init(Context context) { currentState = STATE_IDLE; } + public void setUp(String url, String title) { + setUp(new JZDataSource(url, title), SCREEN_NORMAL); + } + public void setUp(String url, String title, int screen) { setUp(new JZDataSource(url, title), screen); } + public void setUp(JZDataSource jzDataSource, int screen) { + setUp(jzDataSource, screen, JZMediaSystem.class); + } + public void setUp(String url, String title, int screen, Class mediaInterfaceClass) { setUp(new JZDataSource(url, title), screen, mediaInterfaceClass); } - public void setUp(JZDataSource jzDataSource, int screen) { - setUp(jzDataSource, screen, JZMediaSystem.class); - } public void setUp(JZDataSource jzDataSource, int screen, Class mediaInterfaceClass) { if ((System.currentTimeMillis() - gobakFullscreenTime) < 200) return; From 8ddc5f6ae6fd1562e42ed84960c17650a4470d95 Mon Sep 17 00:00:00 2001 From: Nathen <1066666651@qq.com> Date: Sat, 11 May 2019 16:02:34 +0800 Subject: [PATCH 04/10] formate code --- app/src/main/assets/jzvd.html | 1 - app/src/main/java/cn/jzvd/demo/ActivityMain.java | 1 - app/src/main/java/cn/jzvd/demo/ActivityTinyWindow.java | 1 - .../main/java/cn/jzvd/demo/CustomJzvd/JzvdStdList.java | 1 - .../java/cn/jzvd/demo/CustomJzvd/JzvdStdTinyWindow.java | 1 - .../main/java/cn/jzvd/demo/CustomMedia/JZMediaExo.java | 1 - gradle/maven_push.gradle | 2 +- jiaozivideoplayer/src/main/java/cn/jzvd/JZUtils.java | 3 +-- jiaozivideoplayer/src/main/java/cn/jzvd/Jzvd.java | 9 --------- 9 files changed, 2 insertions(+), 18 deletions(-) diff --git a/app/src/main/assets/jzvd.html b/app/src/main/assets/jzvd.html index e19e9a7bf..257eca997 100644 --- a/app/src/main/assets/jzvd.html +++ b/app/src/main/assets/jzvd.html @@ -17,7 +17,6 @@