Skip to content

Commit

Permalink
Merge branch 'release/v7.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
lipangit committed Apr 25, 2020
2 parents e47c706 + 61612d4 commit 18b397b
Show file tree
Hide file tree
Showing 15 changed files with 312 additions and 220 deletions.
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ about: Create a report to help us improve

**什么jzvd版本

**什么播放器内核

**相关log是什么

**demo是否有这个问题
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
--
<p align="center">
<a href="http://developer.android.com/index.html"><img src="https://img.shields.io/badge/platform-android-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Ccn.jzvd%7Cjiaozivideoplayer%7C7.2.4%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-7.2.4-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Ccn.jzvd%7Cjiaozivideoplayer%7C7.3.0%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-7.3.0-green.svg"></a>
<a href="http://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/license-MIT-green.svg"></a>
<a href="https://android-arsenal.com/details/1/3269"><img src="https://img.shields.io/badge/Android%20Arsenal-jiaozivideoplayer-green.svg?style=true"></a>
</p>
Expand All @@ -23,7 +23,7 @@

## 文档

- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装demo[jiaozivideoplayer-7.2.4.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.2.4/jiaozivideoplayer-7.2.4.apk),仔细过一遍demo
- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装demo[jiaozivideoplayer-7.3.0.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.3.0/jiaozivideoplayer-7.3.0.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),测试哪个播放内核适合自己的项目

Expand All @@ -37,7 +37,7 @@

1.添加类库
```gradle
implementation 'cn.jzvd:jiaozivideoplayer:7.2.4'
implementation 'cn.jzvd:jiaozivideoplayer:7.3.0'
```

2.添加布局
Expand Down
4 changes: 2 additions & 2 deletions demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "cn.jzvd.demo"
minSdkVersion 16
targetSdkVersion 29
versionCode 99
versionName "7.2.4"
versionCode 100
versionName "7.3.0"
ndk {
// add support lib
abiFilters 'armeabi-v7a' //, 'arm64-v8a'//, "mips" //,'armeabi''x86',, 'x86_64',
Expand Down
2 changes: 1 addition & 1 deletion demo/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:onClick="clickCustomAgVideo"
android:text="Custom Ag Video !!" />
android:text="## Custom Ag Video" />

</LinearLayout>
</ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion gradle/build_upload.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ signing {

group = "cn.jzvd"
archivesBaseName = "jiaozivideoplayer"
version = "7.2.4"
version = "7.3.0"

uploadArchives {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 99
versionName "7.2.4"
versionCode 100
versionName "7.3.0"
}

compileOptions {
Expand Down
30 changes: 30 additions & 0 deletions library/src/main/java/cn/jzvd/JZUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
import android.content.Context;
import android.content.ContextWrapper;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.Window;
import android.view.WindowManager;

Expand Down Expand Up @@ -166,4 +169,31 @@ public static void showSystemUI(Context context) {
JZUtils.getWindow(context).getDecorView().setSystemUiVisibility(SYSTEM_UI);
}

//获取状态栏的高度
public static int getStatusBarHeight(Context context) {
Resources resources = context.getResources();
int resourceId = resources.getIdentifier("status_bar_height", "dimen", "android");
int height = resources.getDimensionPixelSize(resourceId);
return height;
}

//获取NavigationBar的高度
public static int getNavigationBarHeight(Context context) {
boolean var1 = ViewConfiguration.get(context).hasPermanentMenuKey();
int var2;
return (var2 = context.getResources().getIdentifier("navigation_bar_height", "dimen", "android")) > 0 && !var1 ? context.getResources().getDimensionPixelSize(var2) : 0;
}

//获取屏幕的宽度
public static int getScreenWidth(Context context) {
DisplayMetrics dm = context.getResources().getDisplayMetrics();
return dm.widthPixels;
}

//获取屏幕的高度
public static int getScreenHeight(Context context) {
DisplayMetrics dm = context.getResources().getDisplayMetrics();
return dm.heightPixels;
}

}
Loading

0 comments on commit 18b397b

Please sign in to comment.