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

Commit eb8f3b7

Browse files
author
Nathen
committed
Merge branch 'release/v6.4.0'
2 parents 2b051a4 + 8ed80fe commit eb8f3b7

39 files changed

+936
-565
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ build
99
/captures
1010
*.asc
1111
projectFilesBackup
12-
release
12+
release
13+
_build

README-ZH.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
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.3.1-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>
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>
99

10+
高度自定义的安卓视频播放器
11+
12+
Q群: 490442439 2群: 761899104 验证信息:jzvd
13+
1014
## 主要特点
1115

1216
1. 可以完全自定义UI和任何功能
@@ -22,9 +26,17 @@
2226
11. WebView嵌套本地视频控件
2327
12. demo中添加视频缓存的例子
2428

25-
## 效果
29+
## 使用步骤
2630

27-
**[jiaozivideoplayer-6.3.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.3.1/jiaozivideoplayer-6.3.1.apk)**
31+
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+
3. 下载调试develop分支,有针对性的通过效果找到实现的源码
34+
4.[自定义相关的WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),实现自己的需求
35+
36+
* [入门文档 1](https://www.jianshu.com/p/4c187a09b838)
37+
* [入门文档 2](https://shimo.im/docs/xj5F85W1gqEEBXRJ)
38+
39+
## 效果
2840

2941
![Demo Screenshot][1]
3042

@@ -36,10 +48,10 @@
3648

3749
1.添加类库
3850
```gradle
39-
compile 'cn.jzvd:jiaozivideoplayer:6.3.1'
51+
compile 'cn.jzvd:jiaozivideoplayer:6.4.0'
4052
```
4153

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

4456
2.添加布局
4557
```xml
@@ -53,7 +65,7 @@ compile 'cn.jzvd:jiaozivideoplayer:6.3.1'
5365
```java
5466
JzvdStd jzvdStd = (JzvdStd) findViewById(R.id.videoplayer);
5567
jzvdStd.setUp("http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
56-
, Jzvd.SCREEN_WINDOW_NORMAL, "饺子闭眼睛");
68+
, "饺子闭眼睛", Jzvd.SCREEN_WINDOW_NORMAL);
5769
jzvdStd.thumbImageView.setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");
5870
```
5971

README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
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.3.1-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>
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>
99

10-
Perfect list sliding detection, one line of code to replace the system player with IJKplayer, ExoPlayer, Vitamio, etc.
10+
Highly customizable Android video player
1111

12-
Q群: 490442439 2群: 761899104 authentication information: jzvd
12+
Q群: 490442439 2群: 761899104 验证信息:jzvd
1313

1414
[Wiki](https://github.com/lipangit/JiaoZiVideoPlayer/wiki) [EnglishWiki](https://github.com/felipetorres/VideoPlayer-Wiki)
15-
[Chinese README](https://github.com/lipangit/JiaoZiVideoPlayer/blob/develop/README-ZH.md)
15+
[中文ReadMe](https://github.com/lipangit/JiaoZiVideoPlayer/blob/develop/README-ZH.md)
1616
[WorkPlan](https://github.com/lipangit/JiaoZiVideoPlayer/projects/2)
17-
[Video tutorial](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B)
1817
[Weibo](http://weibo.com/2342820395/profile?topnav=1&wvr=6&is_all=1)
1918

2019
## Features
@@ -32,22 +31,32 @@ Q群: 490442439 2群: 761899104 authentication information: jzvd
3231
11. WebView Nested Local Video Controls
3332
12. VideoCache in demo
3433

35-
## Demo apk
34+
## Steps for usage
3635

37-
A demo apk [jiaozivideoplayer-6.3.1.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v6.3.1/jiaozivideoplayer-6.3.1.apk) is available on Google Play showing all available features like this [small window effect on list sliding](http://weibo.com/tv/v/FtxpWgqmg?fid=1034:5cda6fc7f394b403d592bd9b1d5a9701).
36+
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+
3. Download and debug the develop branch, and find the source code through the effect
39+
4. See [custom-related WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),Realize your own needs
40+
41+
* [Getting Started Document 1](https://www.jianshu.com/p/4c187a09b838)
42+
* [Getting Started Document 2](https://shimo.im/docs/xj5F85W1gqEEBXRJ)
43+
44+
## Screenshot
3845

3946
![Demo screenshot][1]
4047

48+
[small window effect on list sliding](http://weibo.com/tv/v/FtxpWgqmg?fid=1034:5cda6fc7f394b403d592bd9b1d5a9701).
49+
4150
## Usage
4251

4352
Only five steps to use the player:
4453

4554
1.Import library:
4655
```gradle
47-
compile 'cn.jzvd:jiaozivideoplayer:6.3.1'
56+
implementation 'cn.jzvd:jiaozivideoplayer:6.4.0'
4857
```
4958

50-
Or download [lib](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.3.1) (not recommended).
59+
Or download [lib](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.4.0) (not recommended).
5160

5261
2.Add `JZVideoPlayer` in your layout:
5362
```xml
@@ -60,9 +69,8 @@ Or download [lib](https://github.com/lipangit/JiaoZiVideoPlayer/releases/tag/v6.
6069
3.Set the video uri, video thumb url and video title:
6170
```java
6271
JzvdStd jzvdStd = (JzvdStd) findViewById(R.id.videoplayer);
63-
jzvdStd.setUp("http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4",
64-
Jzvd.SCREEN_WINDOW_NORMAL,
65-
"饺子闭眼睛");
72+
jzvdStd.setUp("http://jzvd.nathen.cn/c6e3dc12a1154626b3476d9bf3bd7266/6b56c5f0dc31428083757a45764763b0-5287d2089db37e62345123a1be272f8b.mp4"
73+
, "饺子闭眼睛" , Jzvd.SCREEN_WINDOW_NORMAL);
6674
jzvdStd.thumbImageView.setImage("http://p.qpic.cn/videoyun/0/2449_43b6f696980311e59ed467f22794e792_1/640");
6775
```
6876

app/build.gradle

Lines changed: 10 additions & 6 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 84
11-
versionName "6.3.1"
10+
versionCode 85
11+
versionName "6.4.0"
1212
}
1313
signingConfigs {
1414
releaseConfig {
@@ -25,6 +25,10 @@ android {
2525
signingConfig signingConfigs.releaseConfig
2626
}
2727
}
28+
compileOptions {
29+
sourceCompatibility 1.8
30+
targetCompatibility 1.8
31+
}
2832
lintOptions {
2933
abortOnError false
3034
}
@@ -33,12 +37,12 @@ android {
3337
dependencies {
3438
implementation fileTree(include: ['*.jar'], dir: 'libs')
3539
testImplementation 'junit:junit:4.12'
36-
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
40+
implementation 'com.android.support:appcompat-v7:28.0.0'
3741
implementation project(':jiaozivideoplayer')
38-
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.4'
42+
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
3943
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
40-
implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
44+
implementation 'com.android.support:recyclerview-v7:28.0.0'
4145
implementation 'com.danikula:videocache:2.7.0'
4246
implementation 'com.github.bumptech.glide:glide:4.6.1'
43-
implementation 'com.google.android.exoplayer:exoplayer:2.7.1'
47+
implementation 'com.google.android.exoplayer:exoplayer:2.9.0'
4448
}

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
<uses-permission android:name="android.permission.INTERNET" />
66
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
7-
87
<application
98
android:name=".ApplicationDemo"
109
android:allowBackup="false"
1110
android:icon="@mipmap/ic_launcher"
1211
android:label="@string/app_name"
12+
android:networkSecurityConfig="@xml/jz_network_security_config_allow_cleartext"
1313
android:theme="@style/AppTheme">
1414
<activity
1515
android:name=".ActivityMain"
@@ -98,6 +98,7 @@
9898
android:name=".ActivityApiExtendsNormal"
9999
android:configChanges="orientation|screenSize|keyboardHidden"
100100
android:screenOrientation="portrait" />
101+
101102
</application>
102103

103104
</manifest>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
8383
/** ImageLoader **/
8484
// ImageLoader.getInstance().displayImage(VideoConstant.videoThumbs[0][1],
8585
// videoController1.thumbImageView);
86-
/** volley Fresco omit **/
8786
mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
8887
mSensorEventListener = new Jzvd.JZAutoFullscreenListener();
8988
}

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

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -69,34 +69,19 @@ public void onClick(View view) {
6969
switch (view.getId()) {
7070
case R.id.change_to_ijkplayer:
7171
Jzvd.releaseAllVideos();
72-
handler.postDelayed(new Runnable() {
73-
@Override
74-
public void run() {
75-
Jzvd.setMediaInterface(new JZMediaIjkplayer());
76-
}
77-
}, 1000);
72+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaIjkplayer()), 1000);
7873
Toast.makeText(ActivityApiCustomMediaPlayer.this, "Change to Ijkplayer", Toast.LENGTH_SHORT).show();
7974
finish();
8075
break;
8176
case R.id.change_to_system_mediaplayer:
8277
Jzvd.releaseAllVideos();
83-
handler.postDelayed(new Runnable() {
84-
@Override
85-
public void run() {
86-
Jzvd.setMediaInterface(new JZMediaSystem());
87-
}
88-
}, 1000);
78+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
8979
Toast.makeText(this, "Change to MediaPlayer", Toast.LENGTH_SHORT).show();
9080
finish();
9181
break;
9282
case R.id.change_to_exo:
9383
Jzvd.releaseAllVideos();
94-
handler.postDelayed(new Runnable() {
95-
@Override
96-
public void run() {
97-
Jzvd.setMediaInterface(new JZExoPlayer());
98-
}
99-
}, 1000);
84+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZExoPlayer()), 1000);
10085
Toast.makeText(this, "Change to ExoPlayer", Toast.LENGTH_SHORT).show();
10186
finish();
10287
break;
@@ -109,12 +94,7 @@ public void onBackPressed() {
10994
return;
11095
}
11196
Jzvd.releaseAllVideos();
112-
handler.postDelayed(new Runnable() {
113-
@Override
114-
public void run() {
115-
Jzvd.setMediaInterface(new JZMediaSystem());
116-
}
117-
}, 1000);
97+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
11898
super.onBackPressed();
11999
}
120100

@@ -129,12 +109,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
129109
switch (item.getItemId()) {
130110
case android.R.id.home:
131111
Jzvd.releaseAllVideos();
132-
handler.postDelayed(new Runnable() {
133-
@Override
134-
public void run() {
135-
Jzvd.setMediaInterface(new JZMediaSystem());
136-
}
137-
}, 1000);
112+
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
138113
finish();
139114
break;
140115
}

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import cn.jzvd.demo.CustomView.JzvdStdShowShareButtonAfterFullscreen;
1515
import cn.jzvd.demo.CustomView.JzvdStdShowTextureViewAfterAutoComplete;
1616
import cn.jzvd.demo.CustomView.JzvdStdShowTitleAfterFullscreen;
17+
import cn.jzvd.demo.CustomView.JzvdStdSpeed;
1718
import cn.jzvd.demo.CustomView.JzvdStdVolumeAfterFullscreen;
1819

1920
/**
@@ -26,6 +27,7 @@ public class ActivityApiUISmallChange extends AppCompatActivity {
2627
JzvdStdAutoCompleteAfterFullscreen jzvdStdAutoCompleteAfterFullscreen;
2728
JzvdStdVolumeAfterFullscreen jzvdStdVolumeAfterFullscreen;
2829
JzvdStdMp3 jzvdStdMp3;
30+
JzvdStdSpeed jzvdStdSpeed;
2931

3032
JzvdStd jzvdStd_1_1, jzvdStd_16_9;
3133

@@ -40,66 +42,65 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
4042
setContentView(R.layout.activity_ui_small_change);
4143

4244
jzvdStdWithShareButton = findViewById(R.id.custom_videoplayer_standard_with_share_button);
43-
jzvdStdWithShareButton.setUp(VideoConstant.videoUrlList[3], "饺子想呼吸", Jzvd.SCREEN_WINDOW_NORMAL
44-
);
45+
jzvdStdWithShareButton.setUp(VideoConstant.videoUrlList[3], "饺子想呼吸", Jzvd.SCREEN_WINDOW_NORMAL);
4546
Glide.with(this)
4647
.load(VideoConstant.videoThumbList[3])
4748
.into(jzvdStdWithShareButton.thumbImageView);
4849

4950

5051
jzvdStdShowTitleAfterFullscreen = findViewById(R.id.custom_videoplayer_standard_show_title_after_fullscreen);
51-
jzvdStdShowTitleAfterFullscreen.setUp(VideoConstant.videoUrlList[4], "饺子想摇头", Jzvd.SCREEN_WINDOW_NORMAL
52-
);
52+
jzvdStdShowTitleAfterFullscreen.setUp(VideoConstant.videoUrlList[4], "饺子想摇头", Jzvd.SCREEN_WINDOW_NORMAL);
5353
Glide.with(this)
5454
.load(VideoConstant.videoThumbList[4])
5555
.into(jzvdStdShowTitleAfterFullscreen.thumbImageView);
5656

5757
jzvdStdShowTextureViewAfterAutoComplete = findViewById(R.id.custom_videoplayer_standard_show_textureview_aoto_complete);
58-
jzvdStdShowTextureViewAfterAutoComplete.setUp(VideoConstant.videoUrlList[5], "饺子想旅行", Jzvd.SCREEN_WINDOW_NORMAL
59-
);
58+
jzvdStdShowTextureViewAfterAutoComplete.setUp(VideoConstant.videoUrlList[5], "饺子想旅行", Jzvd.SCREEN_WINDOW_NORMAL);
6059
Glide.with(this)
6160
.load(VideoConstant.videoThumbList[5])
6261
.into(jzvdStdShowTextureViewAfterAutoComplete.thumbImageView);
6362

6463
jzvdStdAutoCompleteAfterFullscreen = findViewById(R.id.custom_videoplayer_standard_aoto_complete);
65-
jzvdStdAutoCompleteAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子没来", Jzvd.SCREEN_WINDOW_NORMAL
66-
);
64+
jzvdStdAutoCompleteAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子没来", Jzvd.SCREEN_WINDOW_NORMAL);
6765
Glide.with(this)
6866
.load(VideoConstant.videoThumbs[0][1])
6967
.into(jzvdStdAutoCompleteAfterFullscreen.thumbImageView);
7068

7169
jzvdStd_1_1 = findViewById(R.id.jz_videoplayer_1_1);
72-
jzvdStd_1_1.setUp(VideoConstant.videoUrls[0][1], "饺子有事吗", Jzvd.SCREEN_WINDOW_NORMAL
73-
);
70+
jzvdStd_1_1.setUp(VideoConstant.videoUrls[0][1], "饺子有事吗", Jzvd.SCREEN_WINDOW_NORMAL);
7471
Glide.with(this)
7572
.load(VideoConstant.videoThumbs[0][1])
7673
.into(jzvdStd_1_1.thumbImageView);
7774
jzvdStd_1_1.widthRatio = 1;
7875
jzvdStd_1_1.heightRatio = 1;
7976

8077
jzvdStd_16_9 = findViewById(R.id.jz_videoplayer_16_9);
81-
jzvdStd_16_9.setUp(VideoConstant.videoUrls[0][1], "饺子来不了", Jzvd.SCREEN_WINDOW_NORMAL
82-
);
78+
jzvdStd_16_9.setUp(VideoConstant.videoUrls[0][1], "饺子来不了", Jzvd.SCREEN_WINDOW_NORMAL);
8379
Glide.with(this)
8480
.load(VideoConstant.videoThumbs[0][1])
8581
.into(jzvdStd_16_9.thumbImageView);
8682
jzvdStd_16_9.widthRatio = 16;
8783
jzvdStd_16_9.heightRatio = 9;
8884

8985
jzvdStdVolumeAfterFullscreen = findViewById(R.id.jz_videoplayer_volume);
90-
jzvdStdVolumeAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子摇摆", Jzvd.SCREEN_WINDOW_NORMAL
91-
);
86+
jzvdStdVolumeAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子摇摆", Jzvd.SCREEN_WINDOW_NORMAL);
9287
Glide.with(this)
9388
.load(VideoConstant.videoThumbs[0][1])
9489
.into(jzvdStdVolumeAfterFullscreen.thumbImageView);
9590

9691
jzvdStdMp3 = findViewById(R.id.jz_videoplayer_mp3);
97-
jzvdStdMp3.setUp("https://in-20170815011809382-q34ludd68h.oss-cn-shanghai.aliyuncs.com/video/401edae1-16431aa8156-0007-1823-c86-de200.mp3?Expires=1532102862&OSSAccessKeyId=LTAIPZHZDaUNpnca&Signature=apruidffjNeN0O584VJiz8q1mJ4%3D", "饺子摇摆", Jzvd.SCREEN_WINDOW_NORMAL
98-
);
92+
jzvdStdMp3.setUp("https://in-20170815011809382-q34ludd68h.oss-cn-shanghai.aliyuncs.com/video/401edae1-16431aa8156-0007-1823-c86-de200.mp3?Expires=1532102862&OSSAccessKeyId=LTAIPZHZDaUNpnca&Signature=apruidffjNeN0O584VJiz8q1mJ4%3D",
93+
"饺子你听", Jzvd.SCREEN_WINDOW_NORMAL);
9994
Glide.with(this)
10095
.load(VideoConstant.videoThumbs[0][1])
10196
.into(jzvdStdMp3.thumbImageView);
10297

98+
jzvdStdSpeed = findViewById(R.id.jz_videoplayer_speed);
99+
jzvdStdSpeed.setUp(VideoConstant.videoUrls[0][1],
100+
"饺子快点", Jzvd.SCREEN_WINDOW_NORMAL);
101+
Glide.with(this)
102+
.load(VideoConstant.videoThumbs[0][1])
103+
.into(jzvdStdSpeed.thumbImageView);
103104

104105
}
105106

0 commit comments

Comments
 (0)