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

Commit

Permalink
Merge branch 'release/v6.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathen committed Nov 17, 2018
2 parents 2b051a4 + 8ed80fe commit eb8f3b7
Show file tree
Hide file tree
Showing 39 changed files with 936 additions and 565 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ build
/captures
*.asc
projectFilesBackup
release
release
_build
24 changes: 18 additions & 6 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
--
<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%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-6.3.1-green.svg"></a>
<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>
<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>

高度自定义的安卓视频播放器

Q群: 490442439 2群: 761899104 验证信息:jzvd

## 主要特点

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

## 效果
## 使用步骤

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

* [入门文档 1](https://www.jianshu.com/p/4c187a09b838)
* [入门文档 2](https://shimo.im/docs/xj5F85W1gqEEBXRJ)

## 效果

![Demo Screenshot][1]

Expand All @@ -36,10 +48,10 @@

1.添加类库
```gradle
compile 'cn.jzvd:jiaozivideoplayer:6.3.1'
compile 'cn.jzvd:jiaozivideoplayer:6.4.0'
```

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

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

Expand Down
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
--
<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%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-6.3.1-green.svg"></a>
<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>
<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>

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

Q群: 490442439 2群: 761899104 authentication information: jzvd
Q群: 490442439 2群: 761899104 验证信息:jzvd

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

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

## Demo apk
## Steps for usage

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).
1. Read through ReadMe
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
3. Download and debug the develop branch, and find the source code through the effect
4. See [custom-related WIKI](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),Realize your own needs

* [Getting Started Document 1](https://www.jianshu.com/p/4c187a09b838)
* [Getting Started Document 2](https://shimo.im/docs/xj5F85W1gqEEBXRJ)

## Screenshot

![Demo screenshot][1]

[small window effect on list sliding](http://weibo.com/tv/v/FtxpWgqmg?fid=1034:5cda6fc7f394b403d592bd9b1d5a9701).

## Usage

Only five steps to use the player:

1.Import library:
```gradle
compile 'cn.jzvd:jiaozivideoplayer:6.3.1'
implementation 'cn.jzvd:jiaozivideoplayer:6.4.0'
```

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

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

Expand Down
16 changes: 10 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "cn.jzvd.demo"
minSdkVersion 16
targetSdkVersion 28
versionCode 84
versionName "6.3.1"
versionCode 85
versionName "6.4.0"
}
signingConfigs {
releaseConfig {
Expand All @@ -25,6 +25,10 @@ android {
signingConfig signingConfigs.releaseConfig
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
lintOptions {
abortOnError false
}
Expand All @@ -33,12 +37,12 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation project(':jiaozivideoplayer')
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.4'
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.danikula:videocache:2.7.0'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.google.android.exoplayer:exoplayer:2.7.1'
implementation 'com.google.android.exoplayer:exoplayer:2.9.0'
}
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
android:name=".ApplicationDemo"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/jz_network_security_config_allow_cleartext"
android:theme="@style/AppTheme">
<activity
android:name=".ActivityMain"
Expand Down Expand Up @@ -98,6 +98,7 @@
android:name=".ActivityApiExtendsNormal"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />

</application>

</manifest>
1 change: 0 additions & 1 deletion app/src/main/java/cn/jzvd/demo/ActivityApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
/** ImageLoader **/
// ImageLoader.getInstance().displayImage(VideoConstant.videoThumbs[0][1],
// videoController1.thumbImageView);
/** volley Fresco omit **/
mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
mSensorEventListener = new Jzvd.JZAutoFullscreenListener();
}
Expand Down
35 changes: 5 additions & 30 deletions app/src/main/java/cn/jzvd/demo/ActivityApiCustomMediaPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,34 +69,19 @@ public void onClick(View view) {
switch (view.getId()) {
case R.id.change_to_ijkplayer:
Jzvd.releaseAllVideos();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Jzvd.setMediaInterface(new JZMediaIjkplayer());
}
}, 1000);
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaIjkplayer()), 1000);
Toast.makeText(ActivityApiCustomMediaPlayer.this, "Change to Ijkplayer", Toast.LENGTH_SHORT).show();
finish();
break;
case R.id.change_to_system_mediaplayer:
Jzvd.releaseAllVideos();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Jzvd.setMediaInterface(new JZMediaSystem());
}
}, 1000);
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
Toast.makeText(this, "Change to MediaPlayer", Toast.LENGTH_SHORT).show();
finish();
break;
case R.id.change_to_exo:
Jzvd.releaseAllVideos();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Jzvd.setMediaInterface(new JZExoPlayer());
}
}, 1000);
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZExoPlayer()), 1000);
Toast.makeText(this, "Change to ExoPlayer", Toast.LENGTH_SHORT).show();
finish();
break;
Expand All @@ -109,12 +94,7 @@ public void onBackPressed() {
return;
}
Jzvd.releaseAllVideos();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Jzvd.setMediaInterface(new JZMediaSystem());
}
}, 1000);
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
super.onBackPressed();
}

Expand All @@ -129,12 +109,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
Jzvd.releaseAllVideos();
handler.postDelayed(new Runnable() {
@Override
public void run() {
Jzvd.setMediaInterface(new JZMediaSystem());
}
}, 1000);
handler.postDelayed(() -> Jzvd.setMediaInterface(new JZMediaSystem()), 1000);
finish();
break;
}
Expand Down
33 changes: 17 additions & 16 deletions app/src/main/java/cn/jzvd/demo/ActivityApiUISmallChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import cn.jzvd.demo.CustomView.JzvdStdShowShareButtonAfterFullscreen;
import cn.jzvd.demo.CustomView.JzvdStdShowTextureViewAfterAutoComplete;
import cn.jzvd.demo.CustomView.JzvdStdShowTitleAfterFullscreen;
import cn.jzvd.demo.CustomView.JzvdStdSpeed;
import cn.jzvd.demo.CustomView.JzvdStdVolumeAfterFullscreen;

/**
Expand All @@ -26,6 +27,7 @@ public class ActivityApiUISmallChange extends AppCompatActivity {
JzvdStdAutoCompleteAfterFullscreen jzvdStdAutoCompleteAfterFullscreen;
JzvdStdVolumeAfterFullscreen jzvdStdVolumeAfterFullscreen;
JzvdStdMp3 jzvdStdMp3;
JzvdStdSpeed jzvdStdSpeed;

JzvdStd jzvdStd_1_1, jzvdStd_16_9;

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

jzvdStdWithShareButton = findViewById(R.id.custom_videoplayer_standard_with_share_button);
jzvdStdWithShareButton.setUp(VideoConstant.videoUrlList[3], "饺子想呼吸", Jzvd.SCREEN_WINDOW_NORMAL
);
jzvdStdWithShareButton.setUp(VideoConstant.videoUrlList[3], "饺子想呼吸", Jzvd.SCREEN_WINDOW_NORMAL);
Glide.with(this)
.load(VideoConstant.videoThumbList[3])
.into(jzvdStdWithShareButton.thumbImageView);


jzvdStdShowTitleAfterFullscreen = findViewById(R.id.custom_videoplayer_standard_show_title_after_fullscreen);
jzvdStdShowTitleAfterFullscreen.setUp(VideoConstant.videoUrlList[4], "饺子想摇头", Jzvd.SCREEN_WINDOW_NORMAL
);
jzvdStdShowTitleAfterFullscreen.setUp(VideoConstant.videoUrlList[4], "饺子想摇头", Jzvd.SCREEN_WINDOW_NORMAL);
Glide.with(this)
.load(VideoConstant.videoThumbList[4])
.into(jzvdStdShowTitleAfterFullscreen.thumbImageView);

jzvdStdShowTextureViewAfterAutoComplete = findViewById(R.id.custom_videoplayer_standard_show_textureview_aoto_complete);
jzvdStdShowTextureViewAfterAutoComplete.setUp(VideoConstant.videoUrlList[5], "饺子想旅行", Jzvd.SCREEN_WINDOW_NORMAL
);
jzvdStdShowTextureViewAfterAutoComplete.setUp(VideoConstant.videoUrlList[5], "饺子想旅行", Jzvd.SCREEN_WINDOW_NORMAL);
Glide.with(this)
.load(VideoConstant.videoThumbList[5])
.into(jzvdStdShowTextureViewAfterAutoComplete.thumbImageView);

jzvdStdAutoCompleteAfterFullscreen = findViewById(R.id.custom_videoplayer_standard_aoto_complete);
jzvdStdAutoCompleteAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子没来", Jzvd.SCREEN_WINDOW_NORMAL
);
jzvdStdAutoCompleteAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子没来", Jzvd.SCREEN_WINDOW_NORMAL);
Glide.with(this)
.load(VideoConstant.videoThumbs[0][1])
.into(jzvdStdAutoCompleteAfterFullscreen.thumbImageView);

jzvdStd_1_1 = findViewById(R.id.jz_videoplayer_1_1);
jzvdStd_1_1.setUp(VideoConstant.videoUrls[0][1], "饺子有事吗", Jzvd.SCREEN_WINDOW_NORMAL
);
jzvdStd_1_1.setUp(VideoConstant.videoUrls[0][1], "饺子有事吗", Jzvd.SCREEN_WINDOW_NORMAL);
Glide.with(this)
.load(VideoConstant.videoThumbs[0][1])
.into(jzvdStd_1_1.thumbImageView);
jzvdStd_1_1.widthRatio = 1;
jzvdStd_1_1.heightRatio = 1;

jzvdStd_16_9 = findViewById(R.id.jz_videoplayer_16_9);
jzvdStd_16_9.setUp(VideoConstant.videoUrls[0][1], "饺子来不了", Jzvd.SCREEN_WINDOW_NORMAL
);
jzvdStd_16_9.setUp(VideoConstant.videoUrls[0][1], "饺子来不了", Jzvd.SCREEN_WINDOW_NORMAL);
Glide.with(this)
.load(VideoConstant.videoThumbs[0][1])
.into(jzvdStd_16_9.thumbImageView);
jzvdStd_16_9.widthRatio = 16;
jzvdStd_16_9.heightRatio = 9;

jzvdStdVolumeAfterFullscreen = findViewById(R.id.jz_videoplayer_volume);
jzvdStdVolumeAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子摇摆", Jzvd.SCREEN_WINDOW_NORMAL
);
jzvdStdVolumeAfterFullscreen.setUp(VideoConstant.videoUrls[0][1], "饺子摇摆", Jzvd.SCREEN_WINDOW_NORMAL);
Glide.with(this)
.load(VideoConstant.videoThumbs[0][1])
.into(jzvdStdVolumeAfterFullscreen.thumbImageView);

jzvdStdMp3 = findViewById(R.id.jz_videoplayer_mp3);
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
);
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);
Glide.with(this)
.load(VideoConstant.videoThumbs[0][1])
.into(jzvdStdMp3.thumbImageView);

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

}

Expand Down
Loading

0 comments on commit eb8f3b7

Please sign in to comment.