Skip to content
This repository was archived by the owner on Aug 9, 2022. It is now read-only.

Commit 32fe872

Browse files
II
authored andcommitted
Merge branch 'release/v6.4.1'
2 parents eb8f3b7 + da2d60a commit 32fe872

37 files changed

+239
-309
lines changed

README-ZH.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--
33
<p align="center">
44
<a href="http://developer.android.com/index.html"><img src="https://img.shields.io/badge/platform-android-green.svg"></a>
5-
<a href="http://search.maven.org/#artifactdetails%7Ccn.jzvd%7Cjiaozivideoplayer%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-6.4.0-green.svg"></a>
5+
<a href="http://search.maven.org/#artifactdetails%7Ccn.jzvd%7Cjiaozivideoplayer%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-6.4.1-green.svg"></a>
66
<a href="http://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/license-MIT-green.svg"></a>
77
<a href="https://android-arsenal.com/details/1/3269"><img src="https://img.shields.io/badge/Android%20Arsenal-jiaozivideoplayer-green.svg?style=true"></a>
88
</p>
@@ -25,11 +25,12 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd
2525
10. Home键退出界面暂停播放,返回界面继续播放
2626
11. WebView嵌套本地视频控件
2727
12. demo中添加视频缓存的例子
28+
13. 倍速播放
2829

2930
## 使用步骤
3031

3132
1. 通读ReadMe
32-
2. 下载安装demo apk [jiaozivideoplayer-6.4.0.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.0/jiaozivideoplayer-6.4.0.apk),各个页面都进入一次,各个按钮点一次
33+
2. 下载安装demo apk [jiaozivideoplayer-6.4.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.1/jiaozivideoplayer-6.4.1.apk),各个页面都进入一次,各个按钮点一次
3334
3. 下载调试develop分支,有针对性的通过效果找到实现的源码
3435
4.[自定义相关的WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),实现自己的需求
3536

@@ -48,10 +49,10 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd
4849

4950
1.添加类库
5051
```gradle
51-
compile 'cn.jzvd:jiaozivideoplayer:6.4.0'
52+
compile 'cn.jzvd:jiaozivideoplayer:6.4.1'
5253
```
5354

54-
或直接下载 [jar包](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.0) (不建议)
55+
或直接下载 [aar](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.1) (不建议)
5556

5657
2.添加布局
5758
```xml
@@ -137,8 +138,6 @@ protected void onPause() {
137138

138139
## [打赏](https://github.com/lipangit/JiaoZiVideoPlayer/wiki#%E6%89%93%E8%B5%8F%E5%92%8C%E5%92%A8%E8%AF%A2)
139140

140-
这项目是专门给中小app集成视频播放的,极大降低开发成本,如果给您节省了成吨的时间,建议零售价:打赏500元
141-
142141
![打赏][2]
143142

144143
## License MIT

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--
33
<p align="center">
44
<a href="http://developer.android.com/index.html"><img src="https://img.shields.io/badge/platform-android-green.svg"></a>
5-
<a href="http://search.maven.org/#artifactdetails%7Ccn.jzvd%7Cjiaozivideoplayer%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-6.4.0-green.svg"></a>
5+
<a href="http://search.maven.org/#artifactdetails%7Ccn.jzvd%7Cjiaozivideoplayer%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-6.4.1-green.svg"></a>
66
<a href="http://choosealicense.com/licenses/mit/"><img src="https://img.shields.io/badge/license-MIT-green.svg"></a>
77
<a href="https://android-arsenal.com/details/1/3269"><img src="https://img.shields.io/badge/Android%20Arsenal-jiaozivideoplayer-green.svg?style=true"></a>
88
</p>
@@ -30,11 +30,12 @@ Q群: 490442439 2群: 761899104 验证信息:jzvd
3030
10. Home key to exit the interface to suspend the playback, return to the interface to continue playing
3131
11. WebView Nested Local Video Controls
3232
12. VideoCache in demo
33+
13. PlayBack speed
3334

3435
## Steps for usage
3536

3637
1. Read through ReadMe
37-
2. Download and install the demo apk[jiaozivideoplayer-6.4.0.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.0/jiaozivideoplayer-6.4.0.apk), each page enters once, each button clicks once
38+
2. Download and install the demo apk[jiaozivideoplayer-6.4.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.4.1/jiaozivideoplayer-6.4.1.apk), each page enters once, each button clicks once
3839
3. Download and debug the develop branch, and find the source code through the effect
3940
4. See [custom-related WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),Realize your own needs
4041

@@ -53,10 +54,10 @@ Only five steps to use the player:
5354

5455
1.Import library:
5556
```gradle
56-
implementation 'cn.jzvd:jiaozivideoplayer:6.4.0'
57+
implementation 'cn.jzvd:jiaozivideoplayer:6.4.1'
5758
```
5859

59-
Or download [lib](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.0) (not recommended).
60+
Or download [aar](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.1) (not recommended).
6061

6162
2.Add `JZVideoPlayer` in your layout:
6263
```xml
@@ -119,8 +120,6 @@ protected void onPause() {
119120

120121
## Reward
121122

122-
This project is dedicated to the integration of small and medium video playback app, greatly reducing the cost of development. If you save tons of time, we suggest a retail price of 76 USD. (It's not expensive, get a two-year project worth more than that)
123-
124123
![Reward][2]
125124

126125
## License MIT

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "cn.jzvd.demo"
88
minSdkVersion 16
99
targetSdkVersion 28
10-
versionCode 85
11-
versionName "6.4.0"
10+
versionCode 86
11+
versionName "6.4.1"
1212
}
1313
signingConfigs {
1414
releaseConfig {
@@ -43,6 +43,6 @@ dependencies {
4343
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
4444
implementation 'com.android.support:recyclerview-v7:28.0.0'
4545
implementation 'com.danikula:videocache:2.7.0'
46-
implementation 'com.github.bumptech.glide:glide:4.6.1'
47-
implementation 'com.google.android.exoplayer:exoplayer:2.9.0'
46+
implementation 'com.github.bumptech.glide:glide:4.7.1'
47+
implementation 'com.google.android.exoplayer:exoplayer:2.9.1'
4848
}

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
android:allowBackup="false"
1010
android:icon="@mipmap/ic_launcher"
1111
android:label="@string/app_name"
12-
android:networkSecurityConfig="@xml/jz_network_security_config_allow_cleartext"
12+
android:networkSecurityConfig="@xml/jz_network_security_config"
1313
android:theme="@style/AppTheme">
1414
<activity
1515
android:name=".ActivityMain"

app/src/main/java/cn/jzvd/demo/ActivityApi.java

Lines changed: 27 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
/**
2828
* Created by Nathen on 16/7/31.
2929
*/
30-
public class ActivityApi extends AppCompatActivity implements View.OnClickListener {
31-
Button mSmallChange, mBigChange, mOrientation, mExtendsNormalActivity, mRationAndVideoSize, mCustomMediaPlayer;
30+
public class ActivityApi extends AppCompatActivity {
3231
JzvdStd mJzvdStd;
3332
Jzvd.JZAutoFullscreenListener mSensorEventListener;
3433
SensorManager mSensorManager;
@@ -43,21 +42,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
4342
getSupportActionBar().setTitle("Api");
4443
setContentView(R.layout.activity_api);
4544

46-
mSmallChange = findViewById(R.id.small_change);
47-
mBigChange = findViewById(R.id.big_change);
48-
mOrientation = findViewById(R.id.orientation);
49-
mExtendsNormalActivity = findViewById(R.id.extends_normal_activity);
50-
mRationAndVideoSize = findViewById(R.id.rotation_and_videosize);
51-
mCustomMediaPlayer = findViewById(R.id.custom_mediaplayer);
52-
53-
mSmallChange.setOnClickListener(this);
54-
mBigChange.setOnClickListener(this);
55-
mOrientation.setOnClickListener(this);
56-
mExtendsNormalActivity.setOnClickListener(this);
57-
mRationAndVideoSize.setOnClickListener(this);
58-
mCustomMediaPlayer.setOnClickListener(this);
59-
60-
6145
mJzvdStd = findViewById(R.id.jz_video);
6246
LinkedHashMap map = new LinkedHashMap();
6347

@@ -87,30 +71,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
8771
mSensorEventListener = new Jzvd.JZAutoFullscreenListener();
8872
}
8973

90-
@Override
91-
public void onClick(View v) {
92-
switch (v.getId()) {
93-
case R.id.small_change:
94-
startActivity(new Intent(ActivityApi.this, ActivityApiUISmallChange.class));
95-
break;
96-
case R.id.big_change:
97-
Toast.makeText(ActivityApi.this, "Comming Soon", Toast.LENGTH_SHORT).show();
98-
// startActivity(new Intent(ActivityApi.this, ActivityApiUIBigChange.class));
99-
break;
100-
case R.id.orientation:
101-
startActivity(new Intent(ActivityApi.this, ActivityApiOrientation.class));
102-
break;
103-
case R.id.extends_normal_activity:
104-
startActivity(new Intent(ActivityApi.this, ActivityApiExtendsNormal.class));
105-
break;
106-
case R.id.rotation_and_videosize:
107-
startActivity(new Intent(ActivityApi.this, ActivityApiRotationVideoSize.class));
108-
break;
109-
case R.id.custom_mediaplayer:
110-
startActivity(new Intent(ActivityApi.this, ActivityApiCustomMediaPlayer.class));
111-
break;
112-
}
113-
}
11474

11575
@Override
11676
protected void onResume() {
@@ -167,4 +127,30 @@ public void cpAssertVideoToLocalPath() {
167127
e.printStackTrace();
168128
}
169129
}
130+
131+
public void clickSmallChange(View view) {
132+
startActivity(new Intent(ActivityApi.this, ActivityApiUISmallChange.class));
133+
}
134+
135+
public void clickBigChange(View view) {
136+
Toast.makeText(ActivityApi.this, "Comming Soon", Toast.LENGTH_SHORT).show();
137+
// startActivity(new Intent(ActivityApi.this, ActivityApiUIBigChange.class));
138+
}
139+
140+
public void clickOrientation(View view) {
141+
startActivity(new Intent(ActivityApi.this, ActivityApiOrientation.class));
142+
143+
}
144+
145+
public void clickExtendsNormalActivity(View view) {
146+
startActivity(new Intent(ActivityApi.this, ActivityApiExtendsNormal.class));
147+
}
148+
149+
public void clickRotationAndVideoSize(View view) {
150+
startActivity(new Intent(ActivityApi.this, ActivityApiRotationVideoSize.class));
151+
}
152+
153+
public void clickCustomMediaPlayer(View view) {
154+
startActivity(new Intent(ActivityApi.this, ActivityApiCustomMediaPlayer.class));
155+
}
170156
}

app/src/main/java/cn/jzvd/demo/ActivityApiCustomMediaPlayer.java

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
* Created by Nathen on 2017/11/23.
2626
*/
2727

28-
public class ActivityApiCustomMediaPlayer extends AppCompatActivity implements View.OnClickListener {
29-
Button mChangeToIjk, mChangeToSystemMediaPlayer, mChangeToExo;
28+
public class ActivityApiCustomMediaPlayer extends AppCompatActivity {
3029
JzvdStd jzvdStd;
3130
Handler handler = new Handler();//这里其实并不需要handler,为了防止播放中切换播放器引擎导致的崩溃,实际使用时一般不会遇到,可以随时调用JZVideoPlayer.setMediaInterface();
3231

@@ -41,13 +40,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
4140
setContentView(R.layout.activity_api_custom_mediaplayer);
4241

4342
jzvdStd = findViewById(R.id.videoplayer);
44-
mChangeToIjk = findViewById(R.id.change_to_ijkplayer);
45-
mChangeToSystemMediaPlayer = findViewById(R.id.change_to_system_mediaplayer);
46-
mChangeToExo = findViewById(R.id.change_to_exo);
47-
48-
mChangeToIjk.setOnClickListener(this);
49-
mChangeToSystemMediaPlayer.setOnClickListener(this);
50-
mChangeToExo.setOnClickListener(this);
5143

5244
JZDataSource jzDataSource = null;
5345
try {
@@ -64,29 +56,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
6456
Jzvd.setMediaInterface(new CustomMediaPlayerAssertFolder());//进入此页面修改MediaInterface,让此页面的jzvd正常工作
6557
}
6658

67-
@Override
68-
public void onClick(View view) {
69-
switch (view.getId()) {
70-
case R.id.change_to_ijkplayer:
71-
Jzvd.releaseAllVideos();
72-
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaIjkplayer()), 1000);
73-
Toast.makeText(ActivityApiCustomMediaPlayer.this, "Change to Ijkplayer", Toast.LENGTH_SHORT).show();
74-
finish();
75-
break;
76-
case R.id.change_to_system_mediaplayer:
77-
Jzvd.releaseAllVideos();
78-
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
79-
Toast.makeText(this, "Change to MediaPlayer", Toast.LENGTH_SHORT).show();
80-
finish();
81-
break;
82-
case R.id.change_to_exo:
83-
Jzvd.releaseAllVideos();
84-
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZExoPlayer()), 1000);
85-
Toast.makeText(this, "Change to ExoPlayer", Toast.LENGTH_SHORT).show();
86-
finish();
87-
break;
88-
}
89-
}
9059

9160
@Override
9261
public void onBackPressed() {
@@ -116,4 +85,25 @@ public boolean onOptionsItemSelected(MenuItem item) {
11685
return super.onOptionsItemSelected(item);
11786
}
11887

88+
89+
public void clickChangeToIjkplayer(View view) {
90+
Jzvd.releaseAllVideos();
91+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaIjkplayer()), 1000);
92+
Toast.makeText(ActivityApiCustomMediaPlayer.this, "Change to Ijkplayer", Toast.LENGTH_SHORT).show();
93+
finish();
94+
}
95+
96+
public void clickChangeToSystemMediaPlayer(View view) {
97+
Jzvd.releaseAllVideos();
98+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
99+
Toast.makeText(this, "Change to MediaPlayer", Toast.LENGTH_SHORT).show();
100+
finish();
101+
}
102+
103+
public void clickChangeToExo(View view) {
104+
Jzvd.releaseAllVideos();
105+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZExoPlayer()), 1000);
106+
Toast.makeText(this, "Change to ExoPlayer", Toast.LENGTH_SHORT).show();
107+
finish();
108+
}
119109
}

app/src/main/java/cn/jzvd/demo/ActivityApiOrientation.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
3232
Glide.with(this)
3333
.load(VideoConstant.videoThumbList[0])
3434
.into(mJzvdStd.thumbImageView);
35+
}
3536

36-
Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
37+
@Override
38+
protected void onResume() {
39+
super.onResume();
40+
Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
3741
Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
38-
3942
}
4043

4144
@Override
@@ -52,7 +55,7 @@ protected void onPause() {
5255
Jzvd.releaseAllVideos();
5356

5457
//Change these two variables back
55-
Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
58+
Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
5659
Jzvd.NORMAL_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
5760
}
5861

app/src/main/java/cn/jzvd/demo/ActivityApiRotationVideoSize.java

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
* Created by Nathen on 2017/11/2.
1717
*/
1818

19-
public class ActivityApiRotationVideoSize extends AppCompatActivity implements View.OnClickListener {
19+
public class ActivityApiRotationVideoSize extends AppCompatActivity {
2020

2121
JzvdStd myJzvdStd;
22-
Button mBtnRotation, mBtnFillParent, mBtnFillCrop, mBtnOriginal;
2322

2423
@Override
2524
protected void onCreate(@Nullable Bundle savedInstanceState) {
@@ -39,38 +38,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
3938
.into(myJzvdStd.thumbImageView);
4039
// The Point IS
4140
myJzvdStd.videoRotation = 180;
42-
43-
mBtnRotation = findViewById(R.id.rotation_to_90);
44-
mBtnFillParent = findViewById(R.id.video_image_display_fill_parent);
45-
mBtnFillCrop = findViewById(R.id.video_image_display_fill_crop);
46-
mBtnOriginal = findViewById(R.id.video_image_diaplay_original);
47-
mBtnRotation.setOnClickListener(this);
48-
mBtnFillParent.setOnClickListener(this);
49-
mBtnFillCrop.setOnClickListener(this);
50-
mBtnOriginal.setOnClickListener(this);
5141
}
5242

53-
@Override
54-
public void onClick(View view) {
55-
switch (view.getId()) {
56-
case R.id.rotation_to_90:
57-
Jzvd.setTextureViewRotation(90);
58-
59-
break;
60-
case R.id.video_image_display_fill_parent:
61-
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_PARENT);
62-
63-
break;
64-
case R.id.video_image_display_fill_crop:
65-
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_SCROP);
66-
67-
break;
68-
case R.id.video_image_diaplay_original:
69-
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ORIGINAL);
70-
71-
break;
72-
}
73-
}
7443

7544
@Override
7645
protected void onPause() {
@@ -97,4 +66,19 @@ public boolean onOptionsItemSelected(MenuItem item) {
9766
return super.onOptionsItemSelected(item);
9867
}
9968

69+
public void clickRotationToNinety(View view) {
70+
Jzvd.setTextureViewRotation(90);
71+
}
72+
73+
public void clickVideoImageDisplayFillParent(View view) {
74+
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_PARENT);
75+
}
76+
77+
public void clickVideoImageDisplayFillCrop(View view) {
78+
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_FILL_SCROP);
79+
}
80+
81+
public void clickVideoImageDiaplayOriginal(View view) {
82+
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ORIGINAL);
83+
}
10084
}

0 commit comments

Comments
 (0)