Skip to content

Commit

Permalink
Merge branch 'release/v7.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
lipangit committed Jun 29, 2020
2 parents 9144411 + 1b7cee5 commit d3e9080
Show file tree
Hide file tree
Showing 86 changed files with 710 additions and 828 deletions.
8 changes: 4 additions & 4 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.4.1%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-7.4.1-green.svg"></a>
<a href="http://search.maven.org/#artifactdetails%7Ccn.jzvd%7Cjiaozivideoplayer%7C7.4.2%7Caar"><img src="https://img.shields.io/badge/Maven%20Central-7.4.2-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 @@ -11,7 +11,7 @@

## 置顶消息:

群主微信进饺子粉丝群,沟通重心从Q群转移到微信群。微信:lipanhelloworld备注JZVD,Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,QQ:1066666651,[Telegram](https://t.me/jiaozitoken)[Weibo](http://weibo.com/2342820395/profile?topnav=1&wvr=6&is_all=1)[公众号文章](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E5%85%AC%E4%BC%97%E5%8F%B7%E6%96%87%E7%AB%A0)
群主微信进饺子粉丝群,沟通重心从Q群转移到微信群。微信:lipangit备注JZVD,Q群:490442439, 2群:761899104, 验证信息:jzvd, 微信公众号:jzvdjzt,QQ:1066666651,[Telegram](https://t.me/jiaozitoken)[Weibo](http://weibo.com/2342820395/profile?topnav=1&wvr=6&is_all=1)[公众号文章](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E5%85%AC%E4%BC%97%E5%8F%B7%E6%96%87%E7%AB%A0)



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.4.1.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.4.1/jiaozivideoplayer-7.4.1.apk),仔细过一遍Demo
- [文档 - API](https://github.com/Jzvd/JiaoZiVideoPlayer/wiki/%E6%96%87%E6%A1%A3-%E2%80%94-API),下载安装[Demo jiaozivideoplayer-7.4.2.apk](https://github.com/Jzvd/JiaoZiVideoPlayer/releases/download/v7.4.2/jiaozivideoplayer-7.4.2.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.4.1'
implementation 'cn.jzvd:jiaozivideoplayer:7.4.2'
```

2.添加布局
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.android.tools.build:gradle:4.0.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
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 103
versionName "7.4.1"
versionCode 104
versionName "7.4.2"
ndk {
// add support lib
abiFilters 'armeabi-v7a' //, 'arm64-v8a'//, "mips" //,'armeabi''x86',, 'x86_64',
Expand Down
58 changes: 23 additions & 35 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:label="@string/app_name"
android:networkSecurityConfig="@xml/jz_network_security_config"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning,LockedOrientationActivity">
tools:ignore="GoogleAppIndexingWarning,LockedOrientationActivity,MissingTranslation">
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
Expand All @@ -25,105 +25,93 @@
</intent-filter>
</activity>
<activity
android:name=".DirectPlayActivity"
android:name=".Tab_4_More.DirectPlayActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".ListViewActivity"
android:name=".Tab_3_List.ListView.NormalListViewActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".ListView.NormalListViewActivity"
android:name=".Tab_3_List.ListView.ListViewFragmentViewPagerActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".ListView.ListViewFragmentViewPagerActivity"
android:name=".Tab_3_List.ListView.ListViewMultiHolderActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".ListView.ListViewMultiHolderActivity"
android:name=".Tab_3_List.TinyWindow.TinyWindowRecycleViewActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".TinyWindow.TinyWindowRecycleViewActivity"
android:name=".Tab_3_List.TinyWindow.TinyWindowActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".TinyWindow.TinyWindowActivity"
android:name=".Tab_3_List.TinyWindow.TinyWindowRecycleViewMultiHolderActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".TinyWindow.TinyWindowRecycleViewMultiHolderActivity"
android:name=".Tab_1_Basic.RotationVideoSizeActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.SmallChangeUiActivity"
android:name=".Tab_1_Basic.CustomMediaActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.BigChangeUiActivity"
android:name=".Tab_3_List.ListView.RecyclerViewActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.RotationVideoSizeActivity"
android:name=".Tab_4_More.WebViewActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.CustomMediaActivity"
android:name=".Tab_1_Basic.OrientationActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".ListView.RecyclerViewActivity"
android:name=".Tab_1_Basic.ExtendsNormalActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".WebViewActivity"
android:name=".Tab_1_Basic.PreloadingActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.OrientationActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.ExtendsNormalActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.PreloadingActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".ListView.tiktok.ActivityTikTok"
android:name=".Tab_3_List.ListView.tiktok.ActivityTikTok"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".ListView.ListViewToDetailActivity"
android:name=".Tab_3_List.ListView.ListViewToDetailActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".ListView.DetailListViewActivity"
android:name=".Tab_3_List.ListView.DetailListViewActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait"
android:theme="@style/TransparentWindow" />
<activity
android:name=".ListView.AutoPlayListViewActivity"
android:name=".Tab_3_List.ListView.AutoPlayListViewActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".LocalVideoActivity"
android:name=".Tab_4_More.LocalVideoActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.ScreenRotateActivity"
android:name=".Tab_1_Basic.ScreenRotateActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.BigUIChangeAG.UiBigChangeAGActivity"
android:name=".Tab_2_Custom.AGVideo.AGVideoActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
<activity
android:name=".api.GetGifActivity"
android:name=".Tab_3_List.GetGifActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="portrait" />
</application>
Expand Down
3 changes: 1 addition & 2 deletions demo/src/main/java/cn/jzvd/demo/ApplicationDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
import com.danikula.videocache.HttpProxyCacheServer;

/**
*
* 能不能干掉这个类
* 能不能干掉这个类,非常想干掉这个类,可以不可以移到MainActivity
* Created by Nathen
* On 2015/12/01 11:29
*/
Expand Down
17 changes: 12 additions & 5 deletions demo/src/main/java/cn/jzvd/demo/CustomJzvd/JzvdStdGetGif.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import java.io.File;

import cn.jzvd.JzvdStd;
import cn.jzvd.demo.Tab_3_List.GifCreateHelper;
import cn.jzvd.demo.R;
import cn.jzvd.demo.api.GifCreateHelper;

/**
* Created by dl on 2020/4/6.
Expand All @@ -28,6 +28,7 @@ public class JzvdStdGetGif extends JzvdStd implements GifCreateHelper.JzGifListe
ImageView convert_to_gif;

String saveGifPath;
long current;

public JzvdStdGetGif(Context context) {
super(context);
Expand All @@ -37,7 +38,6 @@ public JzvdStdGetGif(Context context, AttributeSet attrs) {
super(context, attrs);
}

long current;
@Override
public void init(Context context) {
super.init(context);
Expand All @@ -54,8 +54,8 @@ public void init(Context context) {

saveGifPath = Environment
.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) + "/jiaozi-" + System.currentTimeMillis() + ".gif";
mGifCreateHelper = new GifCreateHelper(this, this, 200, 1, 300,200, 5000, saveGifPath);
current=System.currentTimeMillis();
mGifCreateHelper = new GifCreateHelper(this, this, 200, 1, 300, 200, 5000, saveGifPath);
current = System.currentTimeMillis();
mGifCreateHelper.startGif();//这个函数里用了jzvd的两个参数。
try {
mediaInterface.pause();
Expand All @@ -73,7 +73,7 @@ public void init(Context context) {

@Override
public void process(int curPosition, int total, String status) {
Log.e("Jzvd-gif", status + " " + curPosition + "/" + total+" time: "+(System.currentTimeMillis()-current));
Log.e("Jzvd-gif", status + " " + curPosition + "/" + total + " time: " + (System.currentTimeMillis() - current));
post(() -> tv_hint.setText(curPosition + "/" + total + " " + status));
}

Expand Down Expand Up @@ -132,4 +132,11 @@ public void setScreenNormal() {
convert_to_gif.setVisibility(View.GONE);
}

@Override
public void reset() {
posterImageView.setImageBitmap(textureView.getBitmap());
super.reset();
cancelDismissControlViewTimer();
unregisterWifiListener(getApplicationContext());
}
}
4 changes: 2 additions & 2 deletions demo/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaExo.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

import cn.jzvd.JZMediaInterface;
import cn.jzvd.Jzvd;
import cn.jzvd.demo.api.BigUIChangeAG.AGVideo;
import cn.jzvd.demo.Tab_2_Custom.AGVideo.AGVideo;
import cn.jzvd.demo.R;

/**
Expand Down Expand Up @@ -67,7 +67,7 @@ public void prepare() {
release();
mMediaHandlerThread = new HandlerThread("JZVD");
mMediaHandlerThread.start();
mMediaHandler = new Handler(mMediaHandlerThread.getLooper());//主线程还是非主线程,就在这里
mMediaHandler = new Handler(context.getMainLooper());//主线程还是非主线程,就在这里
handler = new Handler();
mMediaHandler.post(() -> {
BandwidthMeter bandwidthMeter = new DefaultBandwidthMeter();
Expand Down
3 changes: 2 additions & 1 deletion demo/src/main/java/cn/jzvd/demo/CustomMedia/JZMediaIjk.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public void prepare() {
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "fflags", "fastseek");
//播放前的探测Size,默认是1M, 改小一点会出画面更快
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "probesize", 1024 * 10);

//1变速变调状态 0变速不变调状态
ijkMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "soundtouch", 1);

ijkMediaPlayer.setOnPreparedListener(JZMediaIjk.this);
ijkMediaPlayer.setOnVideoSizeChangedListener(JZMediaIjk.this);
Expand Down
Loading

0 comments on commit d3e9080

Please sign in to comment.