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/v7.0.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
lipangit committed Jul 14, 2019
2 parents 02ebc04 + ffa37f3 commit 8b8e153
Show file tree
Hide file tree
Showing 34 changed files with 272 additions and 104 deletions.
10 changes: 7 additions & 3 deletions README-EN.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%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-7.0.4-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-7.0.5-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 @@ -28,7 +28,7 @@
## Steps for usage

1. Read through ReadMe
2. Download and install the demo apk[jiaozivideoplayer-7.0.4.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.4/jiaozivideoplayer-7.0.4.apk), each page enters once, each button clicks once
2. Download and install the demo apk[jiaozivideoplayer-7.0.5.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.5/jiaozivideoplayer-7.0.5.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

Expand All @@ -41,11 +41,15 @@

## Usage

#### Note:
1.7.0 version of the bread layer outside the JzvdStd layout
2.If the import configuration fails, check whether the Java8 configuration is added according to the failed log, or upgrade the environment to the latest stable version.

Only five steps to use the player:

1.Import library:
```gradle
implementation 'cn.jzvd:jiaozivideoplayer:7.0.4'
implementation 'cn.jzvd:jiaozivideoplayer:7.0.5'
```


Expand Down
40 changes: 23 additions & 17 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%7C5.8.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-7.0.4-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-7.0.5-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 Down Expand Up @@ -31,27 +31,35 @@ Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,微
12. demo中添加视频缓存的例子
13. 倍速播放

## 使用必读
## 必读

#### 首先

1. 通读ReadMe
2. 下载安装demo apk [jiaozivideoplayer-7.0.4.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.4/jiaozivideoplayer-7.0.4.apk),各个页面都进入一次,各个按钮点一次
2. 下载安装demo apk [jiaozivideoplayer-7.0.5.apk](https://github.com/lipangit/JiaoZiVideoPlayer/releases/download/v7.0.5/jiaozivideoplayer-7.0.5.apk),各个页面都进入一次,各个按钮点一次
3. 下载调试develop分支,有针对性的通过效果找到实现的源码
4. 继承JzvdStd,实现自己的需求
5. 请仔细阅读相关文档和博客,可以把相关链接填在这里。

#### 必读文章

- [入门文档 1](https://juejin.im/entry/5cb838b5518825186d65430a)
- [入门文档 2](https://shimo.im/docs/xj5F85W1gqEEBXRJ)
- [Wiki](https://github.com/lipangit/JiaoZiVideoPlayer/wiki),很久没更新了
- [EnglishWiki](https://github.com/felipetorres/VideoPlayer-Wiki)
- [English Wiki](https://github.com/felipetorres/VideoPlayer-Wiki)
- [Weibo](http://weibo.com/2342820395/profile?topnav=1&wvr=6&is_all=1)
- [常见问题](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/常见问题),已经解决的,常见问题列表
- [未解决问题](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/未解决问题),群主解决不了的,需要大家帮助的问题

- [公众号文章](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/%E5%85%AC%E4%BC%97%E5%8F%B7%E6%96%87%E7%AB%A0)

6.如果还有疑问
#### 提问必读

- [常见问题](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/常见问题),查找已经解决的问题
- 有问题请到Issue提问,我会第一时间回复,然后加我QQ微信(请备注)。
- 到群里提问,请按照Issue模板,说清楚问题的情况,有管理员接应,解决不了的再找群主。

#### 参与项目必读

* 有问题请到Issue提问,我会第一时间回复,着急的QQ微信通知我一声,随时随地回复。微信:lipanhelloworld QQ:1066666651
* 复杂的问题可以到群里讨论,有管理员接应,解决不了找群主
- [加入我们](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/加入我们)
- [未解决问题](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/未解决问题),群主解决不了的,需要大家帮助的问题

## 效果

Expand All @@ -61,9 +69,13 @@ Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,微

即便是自定义UI,或者对Library有过修改,把自定义的逻辑写到继承JzvdStd的类中,然后依然通过如下骤调用播放器。

#### 注意:
1.7.0版本之后要在JzvdStd外面包一层Layout
2.如果引入配置失败,根据失败的log检查是否添加了Java8的配置,或者升级环境到最新的稳定版

1.添加类库
```gradle
compile 'cn.jzvd:jiaozivideoplayer:7.0.4'
compile 'cn.jzvd:jiaozivideoplayer:7.0.5'
```

2.添加布局
Expand Down Expand Up @@ -123,12 +135,6 @@ protected void onPause() {
```



## [加入我们](https://github.com/lipangit/JiaoZiVideoPlayer/wiki/加入我们)

老臣精力能力有限,希望和志同道合的朋友一起把项目做好,感兴趣的同学随时和我报名


## License MIT

Copyright (c) 2015-2019 李盼
Expand Down
4 changes: 2 additions & 2 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 92
versionName "7.0.4"
versionCode 93
versionName "7.0.5"
}
signingConfigs {
releaseConfig {
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />

<!--<activity-->
<!--android:name=".ActivityPreloading"-->
<!--android:configChanges="orientation|screenSize|keyboardHidden"-->
<!--android:screenOrientation="portrait" />-->


</application>

</manifest>
5 changes: 4 additions & 1 deletion app/src/main/java/cn/jzvd/demo/ActivityApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
, JzvdStd.SCREEN_NORMAL);
Glide.with(this).load(VideoConstant.videoThumbList[0]).into(mJzvdStd.thumbImageView);
// mJzvdStd.seekToInAdvance = 20000;
// Jzvd.SAVE_PROGRESS = false;
// Jzvd.SAVE_PROGRESS = false;//把这些注释的代码放到按钮上,让它可操作可见。

/** Play video in local path, eg:record by system camera **/
// cpAssertVideoToLocalPath();
Expand Down Expand Up @@ -165,4 +165,7 @@ public void clickCustomMediaPlayer(View view) {
startActivity(new Intent(ActivityApi.this, ActivityApiCustomMedia.class));
}

public void clickPreloading(View view) {
startActivity(new Intent(ActivityApi.this, ActivityPreloading.class));
}
}
8 changes: 4 additions & 4 deletions app/src/main/java/cn/jzvd/demo/ActivityApiCustomMedia.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,23 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {


public void clickChangeToIjkplayer(View view) {
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子快长大", JzvdStd.SCREEN_NORMAL, JZMediaIjk.class);
jzvdStd.startVideo();
Toast.makeText(this, "Change to Ijkplayer", Toast.LENGTH_SHORT).show();
}

public void clickChangeToSystem(View view) {
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子快长大", JzvdStd.SCREEN_NORMAL, JZMediaSystem.class);
jzvdStd.startVideo();
Toast.makeText(this, "Change to MediaPlayer", Toast.LENGTH_SHORT).show();
}

public void clickChangeToExo(View view) {
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子快长大", JzvdStd.SCREEN_NORMAL, JZMediaExo.class);
jzvdStd.startVideo();
Expand All @@ -96,7 +96,7 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}
}
2 changes: 1 addition & 1 deletion app/src/main/java/cn/jzvd/demo/ActivityApiOrientation.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();

//Change these two variables back
Jzvd.FULLSCREEN_ORIENTATION = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
Jzvd.setVideoImageDisplayType(Jzvd.VIDEO_IMAGE_DISPLAY_TYPE_ADAPTER);
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/cn/jzvd/demo/ActivityApiUIBigChange.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/cn/jzvd/demo/ActivityDirectPlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand All @@ -53,7 +53,7 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse

@Override
public void onPageSelected(int position) {
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCoun
if (currentPlayPosition >= 0) {
if ((currentPlayPosition < firstVisibleItem || currentPlayPosition > (lastVisibleItem - 1))) {
if (Jzvd.CURRENT_JZVD.screen != Jzvd.SCREEN_FULLSCREEN) {
Jzvd.resetAllVideos();//为什么最后一个视频横屏会调用这个,其他地方不会
Jzvd.releaseAllVideos();//为什么最后一个视频横屏会调用这个,其他地方不会
}
}
}
Expand All @@ -75,7 +75,7 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/cn/jzvd/demo/ActivityListViewNormal.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCoun
if (currentPlayPosition >= 0) {
if ((currentPlayPosition < firstVisibleItem || currentPlayPosition > (lastVisibleItem - 1))) {
if (Jzvd.CURRENT_JZVD.screen != Jzvd.SCREEN_FULLSCREEN) {
Jzvd.resetAllVideos();//为什么最后一个视频横屏会调用这个,其他地方不会
Jzvd.releaseAllVideos();//为什么最后一个视频横屏会调用这个,其他地方不会
}
}
}
Expand Down Expand Up @@ -82,7 +82,7 @@ protected void onResume() {
protected void onPause() {
super.onPause();
sensorManager.unregisterListener(sensorEventListener);
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void onChildViewDetachedFromWindow(View view) {
if (jzvd != null && Jzvd.CURRENT_JZVD != null &&
jzvd.jzDataSource.containsTheUrl(Jzvd.CURRENT_JZVD.jzDataSource.getCurrentUrl())) {
if (Jzvd.CURRENT_JZVD != null && Jzvd.CURRENT_JZVD.screen != Jzvd.SCREEN_FULLSCREEN) {
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}
}
}
Expand All @@ -62,7 +62,7 @@ public void onBackPressed() {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/cn/jzvd/demo/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
@Override
protected void onPause() {
super.onPause();
Jzvd.resetAllVideos();
Jzvd.releaseAllVideos();
}

@Override
Expand Down
61 changes: 61 additions & 0 deletions app/src/main/java/cn/jzvd/demo/ActivityPreloading.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package cn.jzvd.demo;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.bumptech.glide.Glide;

import cn.jzvd.Jzvd;
import cn.jzvd.JzvdStd;
import cn.jzvd.demo.CustomMedia.JZMediaIjk;

public class ActivityPreloading extends AppCompatActivity {

JzvdStd jzvdStd;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_preloading);
jzvdStd = findViewById(R.id.jz_video);

// jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
// , "饺子快长大", Jzvd.SCREEN_NORMAL, JZMediaIjk.class);
jzvdStd.setUp("http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4"
, "饺子快长大", Jzvd.SCREEN_NORMAL, JZMediaIjk.class);


// jzvdStd.setUp("http://jzvd.nathen.cn/342a5f7ef6124a4a8faf00e738b8bee4/cf6d9db0bd4d41f59d09ea0a81e918fd-5287d2089db37e62345123a1be272f8b.mp4"
// , "饺子快长大");
// jzvdStd.setUp("http://jzvd.nathen.cn/4f965ad507ef4194a60a943a34cfe147/32af151ea132471f92c9ced2cff785ea-5287d2089db37e62345123a1be272f8b.mp4"
// , "饺子快长大");
Glide.with(this).load("http://jzvd-pic.nathen.cn/jzvd-pic/1bb2ebbe-140d-4e2e-abd2-9e7e564f71ac.png").into(jzvdStd.thumbImageView);

}

public void clickStartPreloading(View view) {
jzvdStd.startPreloading();
}

public void clickStartVideoAfterPreloading(View view) {
jzvdStd.startVideoAfterPreloading();
}

@Override
protected void onPause() {
super.onPause();
Jzvd.releaseAllVideos();
}

@Override
public void onBackPressed() {
if (Jzvd.backPress()) {
return;
}
super.onBackPressed();
}


}
Loading

0 comments on commit 8b8e153

Please sign in to comment.