diff --git a/README-ZH.md b/README-ZH.md index 81287d736..1731cb9d5 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -1,7 +1,7 @@ #节操视频播放器 [![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html) -[![Maven Central](https://img.shields.io/badge/Maven%20Central-2.0-green.svg)](http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C2.0%7Caar) +[![Maven Central](https://img.shields.io/badge/Maven%20Central-2.0_final-green.svg)](http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C2.0_final%7Caar) [![Licenses](https://img.shields.io/badge/license-MIT-green.svg)](http://choosealicense.com/licenses/mit/) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-jiecaovideoplayer-green.svg?style=true)](https://android-arsenal.com/details/1/3269) [![GitHub stars](https://img.shields.io/github/stars/lipangit/jiecaovideoplayer.svg?style=social&label=Star)]() @@ -20,7 +20,7 @@ ##效果 -**[jiecaovideoplayer-2.0-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0-demo.apk)** +**[jiecaovideoplayer-2.0_final-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final-demo.apk)** ![Demo Screenshot][1] @@ -29,14 +29,14 @@ ##使用 1.添加类库 ```gradle -compile 'fm.jiecao:jiecaovideoplayer:2.0' +compile 'fm.jiecao:jiecaovideoplayer:2.0_final' ``` 或直接下载 -* [jiecaovideoplayer-2.0.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0.aar) -* [jiecaovideoplayer-2.0-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0-javadoc.jar) -* [jiecaovideoplayer-2.0-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0-sources.jar) +* [jiecaovideoplayer-2.0_final.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final.aar) +* [jiecaovideoplayer-2.0_final-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final-javadoc.jar) +* [jiecaovideoplayer-2.0_final-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final-sources.jar) 2.添加布局 ```xml diff --git a/README.md b/README.md index 060b9a785..6196d135d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Jiecao Video Player [![Platform](https://img.shields.io/badge/platform-android-green.svg)](http://developer.android.com/index.html) -[![Maven Central](https://img.shields.io/badge/Maven%20Central-2.0-green.svg)](http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C2.0%7Caar) +[![Maven Central](https://img.shields.io/badge/Maven%20Central-2.0_final-green.svg)](http://search.maven.org/#artifactdetails%7Cfm.jiecao%7Cjiecaovideoplayer%7C2.0_final%7Caar) [![Licenses](https://img.shields.io/badge/license-MIT-green.svg)](http://choosealicense.com/licenses/mit/) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-jiecaovideoplayer-green.svg?style=true)](https://android-arsenal.com/details/1/3269) [![GitHub stars](https://img.shields.io/github/stars/lipangit/jiecaovideoplayer.svg?style=social&label=Star)]() @@ -22,7 +22,7 @@ This is the real android video player view with fullscreen function, we are dedi ## Effect -**[jiecaovideoplayer-2.0-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0-demo.apk)** +**[jiecaovideoplayer-2.0_final-demo.apk](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final-demo.apk)** ![Demo Screenshot][1] @@ -31,14 +31,14 @@ Demo video : http://v.youku.com/v_show/id_XMTQ2NzUwOTcyNA==.html ## Usage 1.Import library ```gradle -compile 'fm.jiecao:jiecaovideoplayer:2.0' +compile 'fm.jiecao:jiecaovideoplayer:2.0_final' ``` Or download lib -* [jiecaovideoplayer-2.0.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0.aar) -* [jiecaovideoplayer-2.0-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0-javadoc.jar) -* [jiecaovideoplayer-2.0-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0-sources.jar) +* [jiecaovideoplayer-2.0_final.aar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final.aar) +* [jiecaovideoplayer-2.0_final-javadoc.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final-javadoc.jar) +* [jiecaovideoplayer-2.0_final-sources.jar](https://raw.githubusercontent.com/lipangit/jiecaovideoplayer/develop/downloads/jiecaovideoplayer-2.0_final-sources.jar) 2.Add JCVideoPlayer in your layout ```xml diff --git a/app/build.gradle b/app/build.gradle index 3e182ecfa..8b235f1cf 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,7 +9,7 @@ android { minSdkVersion 16 targetSdkVersion 23 versionCode 22 - versionName "2.0" + versionName "2.0_final" } buildTypes { release { diff --git a/downloads/jiecaovideoplayer-2.0-demo.apk b/downloads/jiecaovideoplayer-2.0-demo_final.apk similarity index 74% rename from downloads/jiecaovideoplayer-2.0-demo.apk rename to downloads/jiecaovideoplayer-2.0-demo_final.apk index e72ea11d4..9d6d50eb4 100644 Binary files a/downloads/jiecaovideoplayer-2.0-demo.apk and b/downloads/jiecaovideoplayer-2.0-demo_final.apk differ diff --git a/downloads/jiecaovideoplayer-2.0-javadoc.jar b/downloads/jiecaovideoplayer-2.0-javadoc.jar deleted file mode 100644 index 83be5f889..000000000 Binary files a/downloads/jiecaovideoplayer-2.0-javadoc.jar and /dev/null differ diff --git a/downloads/jiecaovideoplayer-2.0-sources.jar b/downloads/jiecaovideoplayer-2.0-sources.jar deleted file mode 100644 index 7d6b6baeb..000000000 Binary files a/downloads/jiecaovideoplayer-2.0-sources.jar and /dev/null differ diff --git a/downloads/jiecaovideoplayer-2.0_final-javadoc.jar b/downloads/jiecaovideoplayer-2.0_final-javadoc.jar new file mode 100644 index 000000000..e5d95d491 Binary files /dev/null and b/downloads/jiecaovideoplayer-2.0_final-javadoc.jar differ diff --git a/downloads/jiecaovideoplayer-2.0_final-sources.jar b/downloads/jiecaovideoplayer-2.0_final-sources.jar new file mode 100644 index 000000000..c7d4f4c5f Binary files /dev/null and b/downloads/jiecaovideoplayer-2.0_final-sources.jar differ diff --git a/downloads/jiecaovideoplayer-2.0.aar b/downloads/jiecaovideoplayer-2.0_final.aar similarity index 50% rename from downloads/jiecaovideoplayer-2.0.aar rename to downloads/jiecaovideoplayer-2.0_final.aar index be8b5d9df..e5ec8207d 100644 Binary files a/downloads/jiecaovideoplayer-2.0.aar and b/downloads/jiecaovideoplayer-2.0_final.aar differ diff --git a/gradle/maven_push.gradle b/gradle/maven_push.gradle index 3a5670791..59bf57317 100644 --- a/gradle/maven_push.gradle +++ b/gradle/maven_push.gradle @@ -22,7 +22,7 @@ signing { group = "fm.jiecao" archivesBaseName = "jiecaovideoplayer" -version = "2.0" +version = "2.0_final" uploadArchives { repositories { diff --git a/jcvideoplayer-lib/build.gradle b/jcvideoplayer-lib/build.gradle index 0a7c0e2b8..f69ab9a3c 100644 --- a/jcvideoplayer-lib/build.gradle +++ b/jcvideoplayer-lib/build.gradle @@ -8,7 +8,7 @@ android { minSdkVersion 14 targetSdkVersion 23 versionCode 22 - versionName "2.0" + versionName "2.0_final" } buildTypes { release { diff --git a/jcvideoplayer-lib/src/main/java/fm/jiecao/jcvideoplayer_lib/JCVideoPlayer.java b/jcvideoplayer-lib/src/main/java/fm/jiecao/jcvideoplayer_lib/JCVideoPlayer.java index cc884c6ab..2ee5f5f9b 100644 --- a/jcvideoplayer-lib/src/main/java/fm/jiecao/jcvideoplayer_lib/JCVideoPlayer.java +++ b/jcvideoplayer-lib/src/main/java/fm/jiecao/jcvideoplayer_lib/JCVideoPlayer.java @@ -229,6 +229,8 @@ public void onClick(View v) { } } if (CURRENT_STATE == CURRENT_STATE_NORMAL || CURRENT_STATE == CURRENT_STATE_ERROR) { + touchingProgressBar = false;//This should not be here , but this can improve accident bug . + addSurfaceView(); if (JCMediaManager.intance().listener != null) { @@ -614,9 +616,12 @@ public void quitFullScreen() { JCMediaManager.intance().mediaPlayer.pause(); JCMediaManager.intance().mediaPlayer.setDisplay(null); //这个view释放了, - JCMediaManager.intance().listener = JCMediaManager.intance().lastListener; JCMediaManager.intance().lastState = CURRENT_STATE; - JCMediaManager.intance().listener.onBackFullscreen(); + + if (JCMediaManager.intance().lastListener != null) { + JCMediaManager.intance().listener = JCMediaManager.intance().lastListener; + JCMediaManager.intance().listener.onBackFullscreen(); + } if (getContext() instanceof JCFullScreenActivity) { ((JCFullScreenActivity) getContext()).finish(); @@ -771,6 +776,7 @@ public static void toFullscreenActivity(Context context, String url, String titl @Override public void onPrepared() { + if (surfaceHolder.getSurface() == null || !surfaceHolder.getSurface().isValid()) return; if (CURRENT_STATE != CURRENT_STATE_PREPAREING) return; JCMediaManager.intance().mediaPlayer.setDisplay(surfaceHolder); JCMediaManager.intance().mediaPlayer.start();